diff --git a/tests/wpt/metadata/DOMEvents/tests/approved/dispatchEvent.click.checkbox.html.ini b/tests/wpt/metadata/DOMEvents/tests/approved/dispatchEvent.click.checkbox.html.ini index 05518aca247..7319314e7f2 100644 --- a/tests/wpt/metadata/DOMEvents/tests/approved/dispatchEvent.click.checkbox.html.ini +++ b/tests/wpt/metadata/DOMEvents/tests/approved/dispatchEvent.click.checkbox.html.ini @@ -2,3 +2,4 @@ type: testharness [Test Description: MouseEvent: Default action is performed when a synthetic click event is dispatched on a checkbox element] expected: FAIL + diff --git a/tests/wpt/metadata/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.click.checkbox.html.ini b/tests/wpt/metadata/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.click.checkbox.html.ini index 05518aca247..7319314e7f2 100644 --- a/tests/wpt/metadata/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.click.checkbox.html.ini +++ b/tests/wpt/metadata/DOMEvents/tests/submissions/Microsoft/converted/dispatchEvent.click.checkbox.html.ini @@ -2,3 +2,4 @@ type: testharness [Test Description: MouseEvent: Default action is performed when a synthetic click event is dispatched on a checkbox element] expected: FAIL + diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json index 56ecc3be95b..12e5be2479a 100644 --- a/tests/wpt/metadata/MANIFEST.json +++ b/tests/wpt/metadata/MANIFEST.json @@ -4219,6 +4219,276 @@ ], "url": "/html/dom/elements/global-attributes/style-01.html" }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002a-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002c-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006c-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html" + }, + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html" + }, { "path": "html/editing/the-hidden-attribute/hidden-2.svg", "references": [ @@ -4229,6 +4499,16 @@ ], "url": "/html/editing/the-hidden-attribute/hidden-2.svg" }, + { + "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html", + "references": [ + [ + "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", + "==" + ] + ], + "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html" + }, { "path": "html/rendering/bindings/the-select-element-0/option-label.html", "references": [ @@ -11951,6 +12231,22 @@ "path": "XMLHttpRequest/formdata-blob.htm", "url": "/XMLHttpRequest/formdata-blob.htm" }, + { + "path": "XMLHttpRequest/formdata-delete.htm", + "url": "/XMLHttpRequest/formdata-delete.htm" + }, + { + "path": "XMLHttpRequest/formdata-get.htm", + "url": "/XMLHttpRequest/formdata-get.htm" + }, + { + "path": "XMLHttpRequest/formdata-has.htm", + "url": "/XMLHttpRequest/formdata-has.htm" + }, + { + "path": "XMLHttpRequest/formdata-set.htm", + "url": "/XMLHttpRequest/formdata-set.htm" + }, { "path": "XMLHttpRequest/formdata.htm", "url": "/XMLHttpRequest/formdata.htm" @@ -12523,10 +12819,6 @@ "path": "battery-status/battery-interface-idlharness.html", "url": "/battery-status/battery-interface-idlharness.html" }, - { - "path": "battery-status/battery-interface.html", - "url": "/battery-status/battery-interface.html" - }, { "path": "battery-status/battery-promise.html", "url": "/battery-status/battery-promise.html" @@ -17787,6 +18079,10 @@ "path": "html/semantics/embedded-content/the-img-element/srcset/select-an-image-source.html", "url": "/html/semantics/embedded-content/the-img-element/srcset/select-an-image-source.html" }, + { + "path": "html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html", + "url": "/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html" + }, { "path": "html/semantics/embedded-content/the-img-element/update-the-source-set.html", "url": "/html/semantics/embedded-content/the-img-element/update-the-source-set.html" @@ -17923,6 +18219,10 @@ "path": "html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html", "url": "/html/semantics/forms/textfieldselection/textfieldselection-setSelectionRange.html" }, + { + "path": "html/semantics/forms/the-button-element/button-activate.html", + "url": "/html/semantics/forms/the-button-element/button-activate.html" + }, { "path": "html/semantics/forms/the-button-element/button-events.html", "url": "/html/semantics/forms/the-button-element/button-events.html" @@ -17967,6 +18267,10 @@ "path": "html/semantics/forms/the-form-element/form-elements-nameditem-02.html", "url": "/html/semantics/forms/the-form-element/form-elements-nameditem-02.html" }, + { + "path": "html/semantics/forms/the-form-element/form-elements-sameobject.html", + "url": "/html/semantics/forms/the-form-element/form-elements-sameobject.html" + }, { "path": "html/semantics/forms/the-form-element/form-nameditem.html", "url": "/html/semantics/forms/the-form-element/form-nameditem.html" @@ -18307,6 +18611,22 @@ "path": "html/semantics/scripting-1/the-script-element/async_011.htm", "url": "/html/semantics/scripting-1/the-script-element/async_011.htm" }, + { + "path": "html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html", + "url": "/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html" + }, + { + "path": "html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html", + "url": "/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html" + }, + { + "path": "html/semantics/scripting-1/the-script-element/fetch-src/empty.html", + "url": "/html/semantics/scripting-1/the-script-element/fetch-src/empty.html" + }, + { + "path": "html/semantics/scripting-1/the-script-element/fetch-src/failure.html", + "url": "/html/semantics/scripting-1/the-script-element/fetch-src/failure.html" + }, { "path": "html/semantics/scripting-1/the-script-element/script-before-after-events.html", "url": "/html/semantics/scripting-1/the-script-element/script-before-after-events.html" @@ -18619,6 +18939,10 @@ "path": "html/syntax/parsing-html-fragments/the-input-byte-stream-038.html", "url": "/html/syntax/parsing-html-fragments/the-input-byte-stream-038.html" }, + { + "path": "html/syntax/parsing/DOMContentLoaded-defer.html", + "url": "/html/syntax/parsing/DOMContentLoaded-defer.html" + }, { "path": "html/syntax/parsing/Document.getElementsByTagName-foreign-01.html", "url": "/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html" @@ -21267,6 +21591,10 @@ "path": "quirks-mode/percentage-height-calculation.html", "url": "/quirks-mode/percentage-height-calculation.html" }, + { + "path": "quirks-mode/supports.html", + "url": "/quirks-mode/supports.html" + }, { "path": "quirks-mode/table-cell-nowrap-minimum-width-calculation.html", "url": "/quirks-mode/table-cell-nowrap-minimum-width-calculation.html" @@ -25963,6 +26291,10 @@ "path": "selectors/attribute-selectors/attribute-case/syntax.html", "url": "/selectors/attribute-selectors/attribute-case/syntax.html" }, + { + "path": "service-workers/cache-storage/serviceworker/credentials.html", + "url": "/service-workers/cache-storage/serviceworker/credentials.html" + }, { "path": "shadow-dom/Element-interface-attachShadow.html", "url": "/shadow-dom/Element-interface-attachShadow.html" @@ -26671,6 +27003,2718 @@ "path": "webgl/compressedTexSubImage2D.html", "url": "/webgl/compressedTexSubImage2D.html" }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html", + "url": "/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/buffers/index-validation.html", + "url": "/webgl/conformance-1.0.3/conformance/buffers/index-validation.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/canvas-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html", + "url": "/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/constants-and-properties.html", + "url": "/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-creation.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-creation.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-lost-restored.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-lost.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-lost.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/context-type-test.html", + "url": "/webgl/conformance-1.0.3/conformance/context/context-type-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html", + "url": "/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/methods.html", + "url": "/webgl/conformance-1.0.3/conformance/context/methods.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html", + "url": "/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html", + "url": "/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/get-extension.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/get-extension.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html", + "url": "/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/shared.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html", + "url": "/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html", + "url": "/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html", + "url": "/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html", + "url": "/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html", + "url": "/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/error-reporting.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/error-reporting.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/instanceof-test.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/is-object.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/is-object.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/misc/webgl-specific.html", + "url": "/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/constants.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/constants.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/getContext.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/methods.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/methods.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html", + "url": "/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bufferData.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/drawElements.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/isTests.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/isTests.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/readPixels.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformf.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformi.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html", + "url": "/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html", + "url": "/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html", + "url": "/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html" + }, + { + "path": "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", + "url": "/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" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html", + "url": "/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/get-active-test.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/get-active-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/program-test.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/program-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html", + "url": "/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html", + "url": "/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html", + "url": "/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html", + "url": "/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html", + "url": "/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html", + "url": "/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html", + "url": "/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html", + "url": "/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/culling.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/culling.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-clear.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/point-size.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/point-size.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/simple.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/simple.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/rendering/triangle.html", + "url": "/webgl/conformance-1.0.3/conformance/rendering/triangle.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-get-calls.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-geterror.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-geterror.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-getstring.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-getstring.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html", + "url": "/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html", + "url": "/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/default-texture.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/default-texture.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/gl-teximage.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texparameter-test.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-clear.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-clear.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-complete.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-complete.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-mips.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-mips.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-npot.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-npot.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-size.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-size.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html", + "url": "/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html", + "url": "/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html" + }, + { + "path": "webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html", + "url": "/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html" + }, { "path": "webgl/texImage2D.html", "url": "/webgl/texImage2D.html" @@ -27487,10 +30531,6 @@ "path": "websockets/eventhandlers.html", "url": "/websockets/eventhandlers.html" }, - { - "path": "websockets/interfaces.html", - "url": "/websockets/interfaces.html" - }, { "path": "websockets/interfaces/CloseEvent/clean-close.html", "url": "/websockets/interfaces/CloseEvent/clean-close.html" @@ -30172,5078 +33212,8 @@ }, "local_changes": { "deleted": [], - "items": { - "reftest": { - "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm": [ - { - "path": "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm", - "references": [ - [ - "/2dcontext/building-paths/canvas_complexshapes_arcto_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/building-paths/canvas_complexshapes_arcto_001.htm" - } - ], - "2dcontext/building-paths/canvas_complexshapes_beziercurveto_001.htm": [ - { - "path": "2dcontext/building-paths/canvas_complexshapes_beziercurveto_001.htm", - "references": [ - [ - "/2dcontext/building-paths/canvas_complexshapes_beziercurveto_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/building-paths/canvas_complexshapes_beziercurveto_001.htm" - } - ], - "2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm": [ - { - "path": "2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm", - "references": [ - [ - "/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/compositing/canvas_compositing_globalcompositeoperation_001.htm" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_1.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_1.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_1_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_1.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_10.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_10.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_10_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_10.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_11.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_11.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_11_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_11.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_12.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_12.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_12_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_12.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_2.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_2.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_2_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_2.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_3.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_3.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_3_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_3.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_4.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_4.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_4_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_4.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_5.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_5.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_5_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_5.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_6.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_6.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_6_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_6.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_7.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_7.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_7_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_7.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_8.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_8.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_8_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_8.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_9.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_canvas_9.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_9_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_canvas_9.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_1.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_10.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_10.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_10_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_10.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_11.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_12.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_12.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_12_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_12.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_13.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_13.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_13_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_13.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_2.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_2.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_2_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_2.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_3.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_3.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_3_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_3.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_4.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_4.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_4_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_4.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_5.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_5.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_5_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_5.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_6.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_6.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_6_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_6.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_7.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_7.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_7_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_7.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_8.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_8.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_8_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_8.html" - } - ], - "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html": [ - { - "path": "2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html", - "references": [ - [ - "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9_ref.html", - "==" - ] - ], - "url": "/2dcontext/drawing-images-to-the-canvas/drawimage_html_image_9.html" - } - ], - "2dcontext/line-styles/canvas_linestyles_linecap_001.htm": [ - { - "path": "2dcontext/line-styles/canvas_linestyles_linecap_001.htm", - "references": [ - [ - "/2dcontext/line-styles/canvas_linestyles_linecap_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/line-styles/canvas_linestyles_linecap_001.htm" - } - ], - "2dcontext/line-styles/lineto_a.html": [ - { - "path": "2dcontext/line-styles/lineto_a.html", - "references": [ - [ - "/2dcontext/line-styles/lineto_ref.html", - "==" - ] - ], - "url": "/2dcontext/line-styles/lineto_a.html" - } - ], - "2dcontext/shadows/canvas_shadows_002.htm": [ - { - "path": "2dcontext/shadows/canvas_shadows_002.htm", - "references": [ - [ - "/2dcontext/shadows/canvas_shadows_002-ref.htm", - "==" - ] - ], - "url": "/2dcontext/shadows/canvas_shadows_002.htm" - } - ], - "2dcontext/the-canvas-state/canvas_state_restore_001.htm": [ - { - "path": "2dcontext/the-canvas-state/canvas_state_restore_001.htm", - "references": [ - [ - "/2dcontext/the-canvas-state/canvas_state_restore_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/the-canvas-state/canvas_state_restore_001.htm" - } - ], - "2dcontext/transformations/canvas_transformations_reset_001.html": [ - { - "path": "2dcontext/transformations/canvas_transformations_reset_001.html", - "references": [ - [ - "/2dcontext/transformations/canvas_transformations_reset_001-ref.html", - "==" - ] - ], - "url": "/2dcontext/transformations/canvas_transformations_reset_001.html" - } - ], - "2dcontext/transformations/canvas_transformations_scale_001.htm": [ - { - "path": "2dcontext/transformations/canvas_transformations_scale_001.htm", - "references": [ - [ - "/2dcontext/transformations/canvas_transformations_scale_001-ref.htm", - "==" - ] - ], - "url": "/2dcontext/transformations/canvas_transformations_scale_001.htm" - } - ], - "2dcontext/transformations/transform_a.html": [ - { - "path": "2dcontext/transformations/transform_a.html", - "references": [ - [ - "/2dcontext/transformations/transform_ref.html", - "==" - ] - ], - "url": "/2dcontext/transformations/transform_a.html" - } - ], - "FileAPI/url/url_xmlhttprequest_img.html": [ - { - "path": "FileAPI/url/url_xmlhttprequest_img.html", - "references": [ - [ - "/FileAPI/url/url_xmlhttprequest_img-ref.html", - "==" - ] - ], - "url": "/FileAPI/url/url_xmlhttprequest_img.html" - } - ], - "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html": [ - { - "path": "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html", - "references": [ - [ - "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag-ref.html", - "==" - ] - ], - "url": "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-custom-tag.html" - } - ], - "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html": [ - { - "path": "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html", - "references": [ - [ - "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag-ref.html", - "==" - ] - ], - "url": "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-custom-tag.html" - } - ], - "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html": [ - { - "path": "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html", - "references": [ - [ - "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension-ref.html", - "==" - ] - ], - "url": "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-registered-type-extension.html" - } - ], - "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html": [ - { - "path": "custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html", - "references": [ - [ - "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension-ref.html", - "==" - ] - ], - "url": "/custom-elements/registering-custom-elements/unresolved-element-pseudoclass/unresolved-element-pseudoclass-css-test-type-extension.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-N-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-N-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-N-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-N-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-N-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-N-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-N-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-N-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-N-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-N-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-N-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-N-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-N-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-bdi-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-bdi-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-bdi-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-bdi-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-bdi-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-bdi-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-bdi-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-dir-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-dir-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-dir-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-dir-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-dir_auto-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-script-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-script-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-script-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-script-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-script-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-script-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-script-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-script-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-style-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-style-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-style-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-style-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-style-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-style-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-style-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-style-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-textarea-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-textarea-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-textarea-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-contained-textarea-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-contained-textarea-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-contained-textarea-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-contained-textarea-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-N-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-N-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-N-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-N-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-N-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-N-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-N-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-N-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-N-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-N-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-N-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-L.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-N-L.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-L-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-N-L.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-N-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-N-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-N-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-N-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-input-script-R.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-input-script-R.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-input-script-R-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-input-script-R.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-isolate.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-isolate.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-isolate-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-isolate.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-pre-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-pre-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-pre-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-pre-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-pre-N-between-Rs.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-pre-mixed.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-pre-mixed.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-pre-mixed-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-pre-mixed.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-N-between-Rs.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-mixed.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-mixed.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-mixed-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-mixed.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-EN.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-script-N-between-Rs.html" - } - ], - "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed.html": [ - { - "path": "html/dom/elements/global-attributes/dir_auto-textarea-script-mixed.html", - "references": [ - [ - "/html/dom/elements/global-attributes/dir_auto-textarea-script-mixed-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/dir_auto-textarea-script-mixed.html" - } - ], - "html/dom/elements/global-attributes/lang-xmllang-01.html": [ - { - "path": "html/dom/elements/global-attributes/lang-xmllang-01.html", - "references": [ - [ - "/html/dom/elements/global-attributes/lang-xmllang-01-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/lang-xmllang-01.html" - } - ], - "html/dom/elements/global-attributes/lang-xyzzy.html": [ - { - "path": "html/dom/elements/global-attributes/lang-xyzzy.html", - "references": [ - [ - "/html/dom/elements/global-attributes/lang-xyzzy-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/lang-xyzzy.html" - } - ], - "html/dom/elements/global-attributes/style-01.html": [ - { - "path": "html/dom/elements/global-attributes/style-01.html", - "references": [ - [ - "/html/dom/elements/global-attributes/style-01-ref.html", - "==" - ] - ], - "url": "/html/dom/elements/global-attributes/style-01.html" - } - ], - "html/editing/the-hidden-attribute/hidden-2.svg": [ - { - "path": "html/editing/the-hidden-attribute/hidden-2.svg", - "references": [ - [ - "/html/editing/the-hidden-attribute/hidden-2-ref.svg", - "==" - ] - ], - "url": "/html/editing/the-hidden-attribute/hidden-2.svg" - } - ], - "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html": [ - { - "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html", - "references": [ - [ - "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html" - } - ], - "html/rendering/bindings/the-select-element-0/option-label.html": [ - { - "path": "html/rendering/bindings/the-select-element-0/option-label.html", - "references": [ - [ - "/html/rendering/bindings/the-select-element-0/option-label-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-select-element-0/option-label.html" - } - ], - "html/rendering/bindings/the-textarea-element-0/cols-default.html": [ - { - "path": "html/rendering/bindings/the-textarea-element-0/cols-default.html", - "references": [ - [ - "/html/rendering/bindings/the-textarea-element-0/textarea-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-textarea-element-0/cols-default.html" - } - ], - "html/rendering/bindings/the-textarea-element-0/cols-zero.html": [ - { - "path": "html/rendering/bindings/the-textarea-element-0/cols-zero.html", - "references": [ - [ - "/html/rendering/bindings/the-textarea-element-0/textarea-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-textarea-element-0/cols-zero.html" - } - ], - "html/rendering/bindings/the-textarea-element-0/rows-default.html": [ - { - "path": "html/rendering/bindings/the-textarea-element-0/rows-default.html", - "references": [ - [ - "/html/rendering/bindings/the-textarea-element-0/textarea-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-textarea-element-0/rows-default.html" - } - ], - "html/rendering/bindings/the-textarea-element-0/rows-zero.html": [ - { - "path": "html/rendering/bindings/the-textarea-element-0/rows-zero.html", - "references": [ - [ - "/html/rendering/bindings/the-textarea-element-0/textarea-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-textarea-element-0/rows-zero.html" - } - ], - "html/rendering/non-replaced-elements/flow-content-0/figure.html": [ - { - "path": "html/rendering/non-replaced-elements/flow-content-0/figure.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/flow-content-0/figure-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/flow-content-0/figure.html" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-supported.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-supported.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-supported.html" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-supported.xhtml": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-supported.xhtml", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-supported.xhtml" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-unsupported-lower-roman.html" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/li-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/li-type-unsupported-upper-roman.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-supported.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-supported.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-supported.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-supported.xhtml": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-supported.xhtml", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-supported.xhtml" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-circle.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-roman.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-none.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-none.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-none.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-round.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-round.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-round.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-square.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-square.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-square.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-upper-roman.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-supported.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-supported.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-supported.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-supported.xhtml": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-supported.xhtml", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-supported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-supported.xhtml" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-roman.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-alpha.html" - } - ], - "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman.html": [ - { - "path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-upper-roman.html" - } - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html": [ - { - "path": "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-a.html" - } - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html": [ - { - "path": "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-q.html" - } - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html": [ - { - "path": "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-s.html" - } - ], - "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml": [ - { - "path": "html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml", - "references": [ - [ - "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/phrasing-content-0/font-element-text-decoration-color/001-x.xhtml" - } - ], - "html/rendering/non-replaced-elements/tables/table-border-1.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-border-1.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-border-1-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-border-1.html" - } - ], - "html/rendering/non-replaced-elements/tables/table-border-2.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-border-2.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-border-2-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-border-2.html" - } - ], - "html/rendering/non-replaced-elements/tables/table-cell-width.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-cell-width.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-cell-width-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-cell-width.html" - } - ], - "html/rendering/non-replaced-elements/tables/table-layout.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-layout.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-layout-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-layout.html" - } - ], - "html/rendering/non-replaced-elements/tables/table-width-150percent.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-width-150percent.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-width-150percent-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-width-150percent.html" - } - ], - "html/rendering/non-replaced-elements/tables/table-width.html": [ - { - "path": "html/rendering/non-replaced-elements/tables/table-width.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/tables/table-width-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/tables/table-width.html" - } - ], - "html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html": [ - { - "path": "html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/the-fieldset-element-0/ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/the-fieldset-element-0/min-width-not-important.html" - } - ], - "html/rendering/non-replaced-elements/the-hr-element-0/color.html": [ - { - "path": "html/rendering/non-replaced-elements/the-hr-element-0/color.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/the-hr-element-0/color-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/the-hr-element-0/color.html" - } - ], - "html/rendering/non-replaced-elements/the-hr-element-0/width.html": [ - { - "path": "html/rendering/non-replaced-elements/the-hr-element-0/width.html", - "references": [ - [ - "/html/rendering/non-replaced-elements/the-hr-element-0/width-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/the-hr-element-0/width.html" - } - ], - "html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml": [ - { - "path": "html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml", - "references": [ - [ - "/html/rendering/non-replaced-elements/the-page/body_text_00ffff-ref.html", - "==" - ] - ], - "url": "/html/rendering/non-replaced-elements/the-page/body_text_00ffff.xhtml" - } - ], - "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border_percent.xhtml": [ - { - "path": "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border_percent.xhtml", - "references": [ - [ - "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border-ref.xhtml", - "==" - ] - ], - "url": "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/img_border_percent.xhtml" - } - ], - "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_perc.xhtml": [ - { - "path": "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_perc.xhtml", - "references": [ - [ - "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border-ref.xhtml", - "==" - ] - ], - "url": "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_perc.xhtml" - } - ], - "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_pixel.xhtml": [ - { - "path": "html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_pixel.xhtml", - "references": [ - [ - "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border-ref.xhtml", - "==" - ] - ], - "url": "/html/rendering/replaced-elements/attributes-for-embedded-content-and-images/object_border_pixel.xhtml" - } - ], - "html/rendering/replaced-elements/images/space.html": [ - { - "path": "html/rendering/replaced-elements/images/space.html", - "references": [ - [ - "/html/rendering/replaced-elements/images/space-ref.html", - "==" - ] - ], - "url": "/html/rendering/replaced-elements/images/space.html" - } - ], - "html/semantics/document-metadata/the-style-element/html_style_in_comment.xhtml": [ - { - "path": "html/semantics/document-metadata/the-style-element/html_style_in_comment.xhtml", - "references": [ - [ - "/html/semantics/document-metadata/the-style-element/html_style_in_comment-ref.html", - "==" - ] - ], - "url": "/html/semantics/document-metadata/the-style-element/html_style_in_comment.xhtml" - } - ], - "html/semantics/embedded-content/the-audio-element/audio_001.htm": [ - { - "path": "html/semantics/embedded-content/the-audio-element/audio_001.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-audio-element/audio_content-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-audio-element/audio_001.htm" - } - ], - "html/semantics/embedded-content/the-audio-element/audio_002.htm": [ - { - "path": "html/semantics/embedded-content/the-audio-element/audio_002.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-audio-element/audio_content-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-audio-element/audio_002.htm" - } - ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01.html": [ - { - "path": "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01.html", - "references": [ - [ - "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-ref.html", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-01.html" - } - ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-02.html": [ - { - "path": "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-02.html", - "references": [ - [ - "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-ref.html", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-02.html" - } - ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-03.html": [ - { - "path": "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-03.html", - "references": [ - [ - "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-ref.html", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-03.html" - } - ], - "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html": [ - { - "path": "html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html", - "references": [ - [ - "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-ref.html", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-embed-element/embed-represent-nothing-04.html" - } - ], - "html/semantics/embedded-content/the-video-element/video_content_image.htm": [ - { - "path": "html/semantics/embedded-content/the-video-element/video_content_image.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-video-element/video_content-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-video-element/video_content_image.htm" - } - ], - "html/semantics/embedded-content/the-video-element/video_content_text.htm": [ - { - "path": "html/semantics/embedded-content/the-video-element/video_content_text.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-video-element/video_content-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-video-element/video_content_text.htm" - } - ], - "html/semantics/embedded-content/the-video-element/video_dynamic_poster_absolute.htm": [ - { - "path": "html/semantics/embedded-content/the-video-element/video_dynamic_poster_absolute.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-video-element/video_dynamic_poster-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-video-element/video_dynamic_poster_absolute.htm" - } - ], - "html/semantics/embedded-content/the-video-element/video_dynamic_poster_relative.htm": [ - { - "path": "html/semantics/embedded-content/the-video-element/video_dynamic_poster_relative.htm", - "references": [ - [ - "/html/semantics/embedded-content/the-video-element/video_dynamic_poster-ref.htm", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-video-element/video_dynamic_poster_relative.htm" - } - ], - "html/semantics/embedded-content/the-video-element/video_initially_paused.html": [ - { - "path": "html/semantics/embedded-content/the-video-element/video_initially_paused.html", - "references": [ - [ - "/html/semantics/embedded-content/the-video-element/video_initially_paused-ref.html", - "==" - ] - ], - "url": "/html/semantics/embedded-content/the-video-element/video_initially_paused.html" - } - ], - "html/semantics/forms/the-input-element/image01.html": [ - { - "path": "html/semantics/forms/the-input-element/image01.html", - "references": [ - [ - "/html/semantics/forms/the-input-element/image01-ref.html", - "==" - ] - ], - "url": "/html/semantics/forms/the-input-element/image01.html" - } - ], - "html/semantics/forms/the-textarea-element/textarea-newline-bidi.html": [ - { - "path": "html/semantics/forms/the-textarea-element/textarea-newline-bidi.html", - "references": [ - [ - "/html/semantics/forms/the-textarea-element/textarea-newline-bidi-ref.html", - "==" - ] - ], - "url": "/html/semantics/forms/the-textarea-element/textarea-newline-bidi.html" - } - ], - "html/semantics/grouping-content/the-li-element/grouping-li-reftest-002.html": [ - { - "path": "html/semantics/grouping-content/the-li-element/grouping-li-reftest-002.html", - "references": [ - [ - "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002-ref.html", - "==" - ] - ], - "url": "/html/semantics/grouping-content/the-li-element/grouping-li-reftest-002.html" - } - ], - "html/semantics/grouping-content/the-ol-element/reversed-2.html": [ - { - "path": "html/semantics/grouping-content/the-ol-element/reversed-2.html", - "references": [ - [ - "/html/semantics/grouping-content/the-ol-element/reversed-2-ref.html", - "==" - ] - ], - "url": "/html/semantics/grouping-content/the-ol-element/reversed-2.html" - } - ], - "html/semantics/grouping-content/the-pre-element/pre-newline-bidi.html": [ - { - "path": "html/semantics/grouping-content/the-pre-element/pre-newline-bidi.html", - "references": [ - [ - "/html/semantics/grouping-content/the-pre-element/pre-newline-bidi-ref.html", - "==" - ] - ], - "url": "/html/semantics/grouping-content/the-pre-element/pre-newline-bidi.html" - } - ], - "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001.html": [ - { - "path": "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001.html", - "references": [ - [ - "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001.html" - } - ], - "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-002.html": [ - { - "path": "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-002.html", - "references": [ - [ - "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-002.html" - } - ], - "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-003.html": [ - { - "path": "html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-003.html", - "references": [ - [ - "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/scripting-1/the-template-element/additions-to-the-css-user-agent-style-sheet/css-user-agent-style-sheet-test-003.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-auto-dir-default.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-missing-pdf.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-nested.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-number.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-separate.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-1.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-another-bdi-2.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-1.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-following-2.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-1.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-letter-preceding-2.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-1.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-number-following-2.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-to-surrounding-run.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-neutral-wrapped.html" - } - ], - "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdi-element/bdi-paragraph-level-container.html" - } - ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-child.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdo-element/bdo-child.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdo-element/bdo-child.html" - } - ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-ltr.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdo-element/bdo-ltr.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdo-element/bdo-ltr.html" - } - ], - "html/semantics/text-level-semantics/the-bdo-element/bdo-override.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdo-element/bdo-override.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdo-element/bdo-override.html" - } - ], - "html/semantics/text-level-semantics/the-bdo-element/bidi-001.html": [ - { - "path": "html/semantics/text-level-semantics/the-bdo-element/bidi-001.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-bdo-element/bidi-001-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-bdo-element/bidi-001.html" - } - ], - "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors.html": [ - { - "path": "html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-br-element/br-bidi-in-inline-ancestors.html" - } - ], - "html/semantics/text-level-semantics/the-br-element/br-bidi.html": [ - { - "path": "html/semantics/text-level-semantics/the-br-element/br-bidi.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-br-element/br-bidi-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-br-element/br-bidi.html" - } - ], - "html/semantics/text-level-semantics/the-wbr-element/wbr-element.html": [ - { - "path": "html/semantics/text-level-semantics/the-wbr-element/wbr-element.html", - "references": [ - [ - "/html/semantics/text-level-semantics/the-wbr-element/wbr-element-ref.html", - "==" - ] - ], - "url": "/html/semantics/text-level-semantics/the-wbr-element/wbr-element.html" - } - ], - "shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-001.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-001.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-001-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-001.html" - } - ], - "shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-002.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-002.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-002-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/lower-boundary-encapsulation/distribution-002.html" - } - ], - "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/nested-shadow-trees/nested_tree_reftest.html" - } - ], - "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-001.html" - } - ], - "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-002.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/reprojection/reprojection-002.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-002-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/reprojection/reprojection-002.html" - } - ], - "shadow-dom/untriaged/shadow-trees/shadow-root-001.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/shadow-root-001.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/shadow-root-001-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/shadow-root-001.html" - } - ], - "shadow-dom/untriaged/shadow-trees/shadow-root-002.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/shadow-root-002.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/shadow-root-002-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/shadow-root-002.html" - } - ], - "shadow-dom/untriaged/shadow-trees/text-decoration-001.html": [ - { - "path": "shadow-dom/untriaged/shadow-trees/text-decoration-001.html", - "references": [ - [ - "/shadow-dom/untriaged/shadow-trees/text-decoration-001-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/shadow-trees/text-decoration-001.html" - } - ], - "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001.html": [ - { - "path": "shadow-dom/untriaged/styles/not-apply-in-shadow-root-001.html", - "references": [ - [ - "/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001-ref.html", - "==" - ] - ], - "url": "/shadow-dom/untriaged/styles/not-apply-in-shadow-root-001.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_completely_move_up.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_down.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/2_cues_overlapping_partially_move_up.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/2_tracks.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/2_tracks.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/2_tracks-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/2_tracks.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/3_tracks.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/3_tracks.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/3_tracks-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/3_tracks.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_end.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_end.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_end-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_end.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_end_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_end_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_end_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_end_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle_position_50.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle_position_50.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_50-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_50.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle_position_gt_50.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle_position_gt_50.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_gt_50-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_gt_50.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50_size_gt_maximum_size.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50_size_gt_maximum_size.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50_size_gt_maximum_size-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle_position_lt_50_size_gt_maximum_size.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_middle_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_middle_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_middle_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_middle_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_start.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_start.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_start-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_start.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/align_start_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/align_start_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/align_start_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/align_start_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/audio_has_no_subtitles.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/audio_has_no_subtitles.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/audio_has_no_subtitles-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/audio_has_no_subtitles.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/basic.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/basic.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/basic-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/basic.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/bidi_ruby.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/bidi_ruby.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/bidi_ruby-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/bidi_ruby.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_LF_u05D0.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_LF_u05D0.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_LF_u05D0-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_LF_u05D0.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2028_u05D0.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2028_u05D0.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2028_u05D0-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2028_u05D0.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2029_u05D0.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2029_u05D0.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2029_u05D0-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u002E_u2029_u05D0.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u0041_first.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u0041_first.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u0041_first-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u0041_first.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u05D0_first.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u05D0_first.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u05D0_first-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u05D0_first.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u0628_first.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u0628_first.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u0628_first-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u0628_first.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/bidi/u06E9_no_strong_dir.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/bidi/u06E9_no_strong_dir.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/bidi/u06E9_no_strong_dir-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/bidi/u06E9_no_strong_dir.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/cue_too_long.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/cue_too_long.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/cue_too_long-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/cue_too_long.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/decode_escaped_entities.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/decode_escaped_entities.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/decode_escaped_entities-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/decode_escaped_entities.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/disable_controls_reposition.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/disable_controls_reposition.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/disable_controls_reposition-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/disable_controls_reposition.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_align_position_line_size_while_paused.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_line.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text_while_paused.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text_while_paused.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text_while_paused-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_cue_text_while_paused.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/dom_override_remove_cue_while_paused.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/dom_override_remove_cue_while_paused.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/dom_override_remove_cue_while_paused-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/dom_override_remove_cue_while_paused.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/enable_controls_reposition.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/enable_controls_reposition.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/enable_controls_reposition-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/enable_controls_reposition.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely_all_cues_have_same_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely_all_cues_have_same_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely_all_cues_have_same_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/9_cues_overlapping_completely_all_cues_have_same_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/media_404_omit_subtitles.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/media_404_omit_subtitles.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/media_404_omit_subtitles-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/media_404_omit_subtitles.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/media_height_19.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/media_height_19.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/media_height_19-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/media_height_19.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/single_quote.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/single_quote.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/single_quote-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/single_quote.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/size_90.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/size_90.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/size_90-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/size_90.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/evil/size_99.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/evil/size_99.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/evil/size_99-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/evil/size_99.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_-2_wrapped_cue_grow_upwards.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_-2_wrapped_cue_grow_upwards.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_-2_wrapped_cue_grow_upwards-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_-2_wrapped_cue_grow_upwards.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_0_is_top.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_0_is_top.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_0_is_top-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_0_is_top.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_1_wrapped_cue_grow_downwards.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_1_wrapped_cue_grow_downwards.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_1_wrapped_cue_grow_downwards-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_1_wrapped_cue_grow_downwards.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_50_percent.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_50_percent.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_50_percent-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_50_percent.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap_move_up.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap_move_up.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap_move_up-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_integer_and_percent_mixed_overlap_move_up.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap_move_up.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap_move_up.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap_move_up-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/line_percent_and_integer_mixed_overlap_move_up.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/media_height400_with_controls.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/media_height400_with_controls.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/media_height400_with_controls-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/media_height400_with_controls.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/media_with_controls.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/media_with_controls.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/media_with_controls-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/media_with_controls.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/navigate_cue_position.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/navigate_cue_position.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/navigate_cue_position-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/navigate_cue_position.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/one_line_cue_plus_wrapped_cue.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/one_line_cue_plus_wrapped_cue.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/one_line_cue_plus_wrapped_cue-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/one_line_cue_plus_wrapped_cue.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/repaint.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/repaint.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/repaint-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/repaint.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand_css_relative_url.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand_css_relative_url.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand_css_relative_url-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/background_shorthand_css_relative_url.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hex.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hex.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hex-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hex.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hsla.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hsla.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hsla-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_hsla.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_rgba.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_rgba.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_rgba-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/color_rgba.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/cue_selector_single_colon.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/cue_selector_single_colon.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/cue_selector_single_colon-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/cue_selector_single_colon.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/inherit_values_from_media_element.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/inherit_values_from_media_element.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/inherit_values_from_media_element-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/inherit_values_from_media_element.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline_underline_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline_underline_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline_underline_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_overline_underline_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_underline.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_underline.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_underline-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-decoration_underline.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_nowrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_nowrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_nowrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_nowrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue/white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_box.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_box.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_box-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_box.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand_css_relative_url.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand_css_relative_url.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand_css_relative_url-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/background_shorthand_css_relative_url.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_animation_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_animation_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_animation_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_animation_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_future.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_future.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_future-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_future.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_past.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_past.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_past-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_timestamp_past.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_transition_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_transition_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_transition_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_transition_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_nowrap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_nowrap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_nowrap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_nowrap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class_object_specific_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class_object_specific_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class_object_specific_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/bold_object/bold_with_class_object_specific_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_animation_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_animation_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_animation_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_animation_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_future.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_future.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_future-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_future.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_past.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_past.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_past-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_past.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_transition_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_transition_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_transition_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_transition_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_nowrap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_nowrap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_nowrap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_nowrap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class_object_specific_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class_object_specific_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class_object_specific_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class_object_specific_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hex.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hex.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hex-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hex.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hsla.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hsla.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hsla-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_hsla.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_rgba.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_rgba.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_rgba-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/color_rgba.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/cue_func_selector_single_colon.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/cue_func_selector_single_colon.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/cue_func_selector_single_colon-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/cue_func_selector_single_colon.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/id_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/id_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/id_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/id_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/inherit_values_from_media_element.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/inherit_values_from_media_element.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/inherit_values_from_media_element-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/inherit_values_from_media_element.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_animation_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_animation_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_animation_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_animation_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_future.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_future.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_future-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_future.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_past.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_past.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_past-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_timestamp_past.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_transition_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_transition_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_transition_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_transition_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_nowrap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_nowrap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_nowrap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_nowrap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class_object_specific_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class_object_specific_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class_object_specific_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/italic_object/italic_with_class_object_specific_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_allowed_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_allowed_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_allowed_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_allowed_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_root_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_root_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_root_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/not_root_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/root_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline_underline_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline_underline_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline_underline_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_overline_underline_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_underline.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_underline.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_underline-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-decoration_underline.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/type_selector_root.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/type_selector_root.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/type_selector_root-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/type_selector_root.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_animation_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_animation_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_animation_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_animation_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_future.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_future.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_future-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_future.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_past.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_past.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_past-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_timestamp_past.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_transition_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_transition_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_transition_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_transition_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_nowrap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_nowrap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_nowrap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_nowrap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class_object_specific_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class_object_specific_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class_object_specific_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/underline_object/underline_with_class_object_specific_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_animation_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_animation_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_animation_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_animation_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_background_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_color.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_color.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_color-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_color.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_font_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_namespace.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_namespace.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_namespace-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_namespace.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_properties.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_properties.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_properties-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_properties.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_shorthand.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_shorthand.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_shorthand-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_outline_shorthand.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-decoration_line-through.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-decoration_line-through.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-decoration_line-through-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-decoration_line-through.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-shadow.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-shadow.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-shadow-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_text-shadow.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_future.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_future.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_future-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_future.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_past.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_past.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_past-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_timestamp_past.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_transition_with_timestamp.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_transition_with_timestamp.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_transition_with_timestamp-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_transition_with_timestamp.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_voice_attribute.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_voice_attribute.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_voice_attribute-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_voice_attribute.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_nowrap.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_nowrap.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_nowrap-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_nowrap.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class_object_specific_selector.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class_object_specific_selector.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class_object_specific_selector-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/voice_object/voice_with_class_object_specific_selector.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_normal_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_normal_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_normal_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_normal_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_nowrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_nowrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_nowrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_nowrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-line_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-line_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-line_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-line_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-wrap_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-wrap_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-wrap_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-wrap_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/white-space_pre_wrapped.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/bold_object_default_font-style.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/bold_object_default_font-style.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/bold_object_default_font-style-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/bold_object_default_font-style.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/inherit_as_default_value_inherits_values_from_media_element.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/inherit_as_default_value_inherits_values_from_media_element.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/inherit_as_default_value_inherits_values_from_media_element-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/inherit_as_default_value_inherits_values_from_media_element.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/italic_object_default_font-style.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/italic_object_default_font-style.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/italic_object_default_font-style-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/italic_object_default_font-style.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/underline_object_default_font-style.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/underline_object_default_font-style.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/underline_object_default_font-style-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/selectors/default_styles/underline_object_default_font-style.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/size_50.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/size_50.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/size_50-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/size_50.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/too_many_cues.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/too_many_cues.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/too_many_cues-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/too_many_cues.html" - } - ], - "webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html": [ - { - "path": "webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html", - "references": [ - [ - "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped-ref.html", - "==" - ] - ], - "url": "/webvtt/rendering/cues-with-video/processing-model/too_many_cues_wrapped.html" - } - ] - }, - "testharness": { - "XMLHttpRequest/formdata-delete.htm": [ - { - "path": "XMLHttpRequest/formdata-delete.htm", - "url": "/XMLHttpRequest/formdata-delete.htm" - } - ], - "XMLHttpRequest/formdata-get.htm": [ - { - "path": "XMLHttpRequest/formdata-get.htm", - "url": "/XMLHttpRequest/formdata-get.htm" - } - ], - "XMLHttpRequest/formdata-has.htm": [ - { - "path": "XMLHttpRequest/formdata-has.htm", - "url": "/XMLHttpRequest/formdata-has.htm" - } - ], - "XMLHttpRequest/formdata-set.htm": [ - { - "path": "XMLHttpRequest/formdata-set.htm", - "url": "/XMLHttpRequest/formdata-set.htm" - } - ], - "html/semantics/forms/the-button-element/button-activate.html": [ - { - "path": "html/semantics/forms/the-button-element/button-activate.html", - "url": "/html/semantics/forms/the-button-element/button-activate.html" - } - ], - "html/semantics/forms/the-form-element/form-elements-sameobject.html": [ - { - "path": "html/semantics/forms/the-form-element/form-elements-sameobject.html", - "url": "/html/semantics/forms/the-form-element/form-elements-sameobject.html" - } - ] - } - }, - "reftest_nodes": { - "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html": [ - { - "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", - "references": [ - [ - "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html" - } - ], - "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html": [ - { - "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html", - "references": [ - [ - "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", - "==" - ] - ], - "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html" - } - ] - } + "items": {}, + "reftest_nodes": {} }, "reftest_nodes": { "2dcontext/building-paths/canvas_complexshapes_arcto_001.htm": [ @@ -36902,6 +34872,330 @@ "url": "/html/dom/elements/global-attributes/style-01.html" } ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002a-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002c-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006c-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html" + } + ], + "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html": [ + { + "path": "html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html", + "references": [ + [ + "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html", + "==" + ] + ], + "url": "/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html" + } + ], "html/editing/the-hidden-attribute/hidden-2.svg": [ { "path": "html/editing/the-hidden-attribute/hidden-2.svg", @@ -36914,6 +35208,30 @@ "url": "/html/editing/the-hidden-attribute/hidden-2.svg" } ], + "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html": [ + { + "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", + "references": [ + [ + "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", + "==" + ] + ], + "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html" + } + ], + "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html": [ + { + "path": "html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html", + "references": [ + [ + "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type-ref.html", + "==" + ] + ], + "url": "/html/rendering/bindings/the-input-element-as-a-text-entry-widget/unrecognized-type-should-fallback-as-text-type.html" + } + ], "html/rendering/bindings/the-select-element-0/option-label.html": [ { "path": "html/rendering/bindings/the-select-element-0/option-label.html", @@ -40983,7 +39301,7 @@ } ] }, - "rev": "887399d3d0a85d0e27a6688ae384459376adf7ca", + "rev": "78862c14a70cabb48c685144666912f08e726390", "url_base": "/", "version": 2 } diff --git a/tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini b/tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini index 4e18f0491b6..9a54faf4a75 100644 --- a/tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini +++ b/tests/wpt/metadata/XMLHttpRequest/FormData-append.html.ini @@ -2,6 +2,7 @@ type: testharness [Passing a String object to FormData.append should work.] expected: FAIL + [testFormDataAppendEmptyBlob] expected: FAIL diff --git a/tests/wpt/metadata/XMLHttpRequest/formdata-delete.htm.ini b/tests/wpt/metadata/XMLHttpRequest/formdata-delete.htm.ini index 2ddeca711b5..21986115f8e 100644 --- a/tests/wpt/metadata/XMLHttpRequest/formdata-delete.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/formdata-delete.htm.ini @@ -1,7 +1,8 @@ [formdata-delete.htm] - type:testharness + type: testharness [testFormDataDeleteFromFormNonExistentKey] expected: FAIL + [testFormDataDeleteFromFormOtherKey] expected: FAIL diff --git a/tests/wpt/metadata/XMLHttpRequest/formdata-get.htm.ini b/tests/wpt/metadata/XMLHttpRequest/formdata-get.htm.ini index 3b83c7c629a..ed4df81e621 100644 --- a/tests/wpt/metadata/XMLHttpRequest/formdata-get.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/formdata-get.htm.ini @@ -2,5 +2,7 @@ type: testharness [testFormDataGetFromForm] expected: FAIL + [testFormDataGetAllFromForm] expected: FAIL + diff --git a/tests/wpt/metadata/XMLHttpRequest/formdata-set.htm.ini b/tests/wpt/metadata/XMLHttpRequest/formdata-set.htm.ini index 693d695481b..ea75dbcda82 100644 --- a/tests/wpt/metadata/XMLHttpRequest/formdata-set.htm.ini +++ b/tests/wpt/metadata/XMLHttpRequest/formdata-set.htm.ini @@ -2,6 +2,7 @@ type: testharness [Passing a String object to FormData.set should work] expected: FAIL + [testFormDataSetEmptyBlob] expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html.ini new file mode 100644 index 00000000000..31e5faa8628 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-001a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html.ini new file mode 100644 index 00000000000..0c124898973 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-001b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html.ini new file mode 100644 index 00000000000..68004f49d5b --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-001c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html.ini new file mode 100644 index 00000000000..87fcc509f48 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-002a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html.ini new file mode 100644 index 00000000000..72ac38c0c93 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-002b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html.ini new file mode 100644 index 00000000000..6600f129998 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-002c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html.ini new file mode 100644 index 00000000000..86130ac0951 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-003a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html.ini new file mode 100644 index 00000000000..98f90182840 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-003b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html.ini new file mode 100644 index 00000000000..05ed86ec8b9 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-003c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html.ini new file mode 100644 index 00000000000..1ab297f9593 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-004a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html.ini new file mode 100644 index 00000000000..4116ad5bb7d --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-004b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html.ini new file mode 100644 index 00000000000..3e045af39bf --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-004c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html.ini new file mode 100644 index 00000000000..6549eb1a9c3 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-005a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html.ini new file mode 100644 index 00000000000..a98f4a4a394 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-005b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html.ini new file mode 100644 index 00000000000..67e1ef32604 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-005c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html.ini new file mode 100644 index 00000000000..c4ecab32ee7 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-006a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html.ini new file mode 100644 index 00000000000..87416e47e8c --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-006b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html.ini new file mode 100644 index 00000000000..1f511fbce3e --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-006c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html.ini new file mode 100644 index 00000000000..901046921a9 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-007a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html.ini new file mode 100644 index 00000000000..27263ca975c --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-007b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html.ini new file mode 100644 index 00000000000..fec8e14744b --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-007c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html.ini new file mode 100644 index 00000000000..f9ac9edc2ee --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-008a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html.ini new file mode 100644 index 00000000000..7ecc74b1150 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-008b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html.ini new file mode 100644 index 00000000000..cc6028dcf2f --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-008c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html.ini new file mode 100644 index 00000000000..0b47330b200 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-009a.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html.ini new file mode 100644 index 00000000000..9401701f033 --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-009b.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html.ini b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html.ini new file mode 100644 index 00000000000..6fbc2e2d6ee --- /dev/null +++ b/tests/wpt/metadata/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html.ini @@ -0,0 +1,3 @@ +[dir-isolation-009c.html] + type: reftest + expected: FAIL diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index e1d488e362e..f2302f7c9c6 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -9138,3 +9138,6 @@ [HTMLMarqueeElement interface object name] expected: FAIL + [WebSocket interface: new WebSocket("ws://foo") must inherit property "extensions" with the proper type (10)] + expected: FAIL + diff --git a/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini index 7b06a0aef35..5fb543d2eed 100644 --- a/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini +++ b/tests/wpt/metadata/html/infrastructure/common-dom-interfaces/collections/htmlformcontrolscollection.html.ini @@ -17,3 +17,4 @@ [The HTMLFormControlsCollection interface is used for collections of listed elements in form element] expected: FAIL + diff --git a/tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini b/tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini index d6002466abd..8be36a1b9f3 100644 --- a/tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini +++ b/tests/wpt/metadata/html/infrastructure/terminology/plugins/text-plain.html.ini @@ -1,4 +1,3 @@ [text-plain.html] type: testharness disabled: https://github.com/servo/servo/issues/9286 - diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html.ini new file mode 100644 index 00000000000..4f46b02fbff --- /dev/null +++ b/tests/wpt/metadata/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html.ini @@ -0,0 +1,3 @@ +[fail-to-resolve.html] + type: testharness + expected: CRASH diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html.ini new file mode 100644 index 00000000000..705a487e256 --- /dev/null +++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html.ini @@ -0,0 +1,5 @@ +[base.html] + type: testharness + [Script src with a base URL] + expected: FAIL + diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini new file mode 100644 index 00000000000..92ecbe1381d --- /dev/null +++ b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini @@ -0,0 +1,5 @@ +[DOMContentLoaded-defer.html] + type: testharness + [The end: DOMContentLoaded and defer scripts] + expected: FAIL + diff --git a/tests/wpt/metadata/mozilla-sync b/tests/wpt/metadata/mozilla-sync index 16df08f323c..288dbfe1448 100644 --- a/tests/wpt/metadata/mozilla-sync +++ b/tests/wpt/metadata/mozilla-sync @@ -1 +1 @@ -a900196b3f56fac46f86d8a8157a61f14fdca364 \ No newline at end of file +ce0b89d310212aaaa66b759c7c2548fb2f9a2738 \ No newline at end of file diff --git a/tests/wpt/metadata/url/a-element.html.ini b/tests/wpt/metadata/url/a-element.html.ini index 0dc3b64baf8..648141e3b84 100644 --- a/tests/wpt/metadata/url/a-element.html.ini +++ b/tests/wpt/metadata/url/a-element.html.ini @@ -933,3 +933,12 @@ [Parsing: against ] expected: FAIL + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + diff --git a/tests/wpt/metadata/url/interfaces.html.ini b/tests/wpt/metadata/url/interfaces.html.ini index 505f15c5a9b..86abb5a8ca7 100644 --- a/tests/wpt/metadata/url/interfaces.html.ini +++ b/tests/wpt/metadata/url/interfaces.html.ini @@ -17,3 +17,4 @@ [URL interface: operation domainToUnicode(USVString)] expected: FAIL + diff --git a/tests/wpt/metadata/url/url-constructor.html.ini b/tests/wpt/metadata/url/url-constructor.html.ini index ffab6e42a74..d02962f33a1 100644 --- a/tests/wpt/metadata/url/url-constructor.html.ini +++ b/tests/wpt/metadata/url/url-constructor.html.ini @@ -1,8 +1,5 @@ [url-constructor.html] type: testharness - [Parsing: against ] - expected: FAIL - [Parsing: <#β> against ] expected: FAIL @@ -165,3 +162,630 @@ [Parsing: against ] expected: FAIL + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <\t :foo.com \n> against ] + expected: FAIL + + [Parsing: < foo.com > against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <> against ] + expected: FAIL + + [Parsing: < \t> against ] + expected: FAIL + + [Parsing: <:foo.com/> against ] + expected: FAIL + + [Parsing: <:foo.com\\> against ] + expected: FAIL + + [Parsing: <:> against ] + expected: FAIL + + [Parsing: <:a> against ] + expected: FAIL + + [Parsing: <:/> against ] + expected: FAIL + + [Parsing: <:\\> against ] + expected: FAIL + + [Parsing: <:#> against ] + expected: FAIL + + [Parsing: <#> against ] + expected: FAIL + + [Parsing: <#/> against ] + expected: FAIL + + [Parsing: <#\\> against ] + expected: FAIL + + [Parsing: <#;?> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <:23> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <::> against ] + expected: FAIL + + [Parsing: <::23> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <[61:24:74\]:98> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <\\\\server\\file> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <.> against ] + expected: FAIL + + [Parsing: <..> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <./test.txt> against ] + expected: FAIL + + [Parsing: <../test.txt> against ] + expected: FAIL + + [Parsing: <../aaa/test.txt> against ] + expected: FAIL + + [Parsing: <../../test.txt> against ] + expected: FAIL + + [Parsing: <中/test.txt> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: <> against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + + [Parsing: against ] + expected: FAIL + diff --git a/tests/wpt/metadata/webgl/conformance-1.0.3/__dir__.ini b/tests/wpt/metadata/webgl/conformance-1.0.3/__dir__.ini new file mode 100644 index 00000000000..fb3e9d30ff6 --- /dev/null +++ b/tests/wpt/metadata/webgl/conformance-1.0.3/__dir__.ini @@ -0,0 +1 @@ +disabled: https://github.com/servo/servo/issues/9331 diff --git a/tests/wpt/metadata/websockets/interfaces.html.ini b/tests/wpt/metadata/websockets/interfaces.html.ini deleted file mode 100644 index d5eaa3f58dc..00000000000 --- a/tests/wpt/metadata/websockets/interfaces.html.ini +++ /dev/null @@ -1,23 +0,0 @@ -[interfaces.html] - type: testharness - [WebSocket interface: existence and properties of interface object] - expected: FAIL - - [WebSocket interface: existence and properties of interface prototype object] - expected: FAIL - - [WebSocket interface: attribute extensions] - expected: FAIL - - [Stringification of new WebSocket("ws://foo")] - expected: FAIL - - [WebSocket interface: new WebSocket("ws://foo") must inherit property "extensions" with the proper type (10)] - expected: FAIL - - [CloseEvent interface: existence and properties of interface object] - expected: FAIL - - [CloseEvent interface: existence and properties of interface prototype object] - expected: FAIL - diff --git a/tests/wpt/mozilla/meta/css/iframe/hide_layers2.html.ini b/tests/wpt/mozilla/meta/css/iframe/hide_layers2.html.ini index 3da4ca691c6..1ffbda3aa44 100644 --- a/tests/wpt/mozilla/meta/css/iframe/hide_layers2.html.ini +++ b/tests/wpt/mozilla/meta/css/iframe/hide_layers2.html.ini @@ -1,2 +1,3 @@ [hide_layers2.html] + type: reftest disabled: too many intermittent failures in https://github.com/servo/servo/issues/8769 diff --git a/tests/wpt/mozilla/meta/mozilla/mime_sniffing_font_context.html.ini b/tests/wpt/mozilla/meta/mozilla/mime_sniffing_font_context.html.ini index 92e5aeb2640..fe0f9621635 100644 --- a/tests/wpt/mozilla/meta/mozilla/mime_sniffing_font_context.html.ini +++ b/tests/wpt/mozilla/meta/mozilla/mime_sniffing_font_context.html.ini @@ -1,2 +1,3 @@ [mime_sniffing_font_context.html] - prefs: ['net.mime.sniff:true'] + type: testharness + prefs: [net.mime.sniff:true] diff --git a/tests/wpt/web-platform-tests/battery-status/battery-charging-manual.html b/tests/wpt/web-platform-tests/battery-status/battery-charging-manual.html index 3eafcaca4d9..8e80e30a274 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-charging-manual.html +++ b/tests/wpt/web-platform-tests/battery-status/battery-charging-manual.html @@ -31,10 +31,9 @@ async_test(function (t) { navigator.getBattery().then(function (battery) { t.step(function () { assert_true(battery.charging, 'charging must be set to true'); - assert_less_than(battery.chargingTime, Infinity, 'chargingTime must be less than Infinity'); assert_equals(battery.dischargingTime, Infinity, 'dischargingTime must be set to Infinity'); assert_greater_than(battery.level, 0, 'level must be greater than 0'); - assert_less_than(battery.level, 1.0, 'level must be less than 1.0'); + assert_less_than_equal(battery.level, 1.0, 'level must be less than or equal to 1.0'); var battery_level = battery.level; battery.onlevelchange = t.step_func(function () { diff --git a/tests/wpt/web-platform-tests/battery-status/battery-discharging-manual.html b/tests/wpt/web-platform-tests/battery-status/battery-discharging-manual.html index f335f42326d..c4ccbe445d1 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-discharging-manual.html +++ b/tests/wpt/web-platform-tests/battery-status/battery-discharging-manual.html @@ -32,9 +32,8 @@ async_test(function (t) { t.step(function () { assert_false(battery.charging, 'charging must be set to false'); assert_equals(battery.chargingTime, Infinity, 'chargingTime must be set to Infinity'); - assert_less_than(battery.dischargingTime, Infinity, 'dischargingTime must be less than Infinity'); assert_greater_than(battery.level, 0, 'level must be greater than 0'); - assert_less_than(battery.level, 1.0, 'level must be less than 1.0'); + assert_less_than_equal(battery.level, 1.0, 'level must be less than or equal to 1.0'); var battery_level = battery.level; battery.onlevelchange = t.step_func(function () { diff --git a/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.html b/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.html index 574d99ec7c8..4e9b209d4d7 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.html +++ b/tests/wpt/web-platform-tests/battery-status/battery-interface-idlharness.html @@ -18,6 +18,9 @@ interface EventTarget { interface EventListener { void handleEvent(Event event); }; +[TreatNonObjectAsNull] +callback EventHandlerNonNull = any (Event event); +typedef EventHandlerNonNull? EventHandler;

Description

diff --git a/tests/wpt/web-platform-tests/battery-status/battery-interface.html b/tests/wpt/web-platform-tests/battery-status/battery-interface.html deleted file mode 100644 index aec10ae9a09..00000000000 --- a/tests/wpt/web-platform-tests/battery-status/battery-interface.html +++ /dev/null @@ -1,13 +0,0 @@ - - -Battery Test: Interface API - - - - -

Description

-

- This test validates the BatteryManager interface IDL. -

- -
diff --git a/tests/wpt/web-platform-tests/battery-status/battery-interface.js b/tests/wpt/web-platform-tests/battery-status/battery-interface.js deleted file mode 100644 index 7aac8938129..00000000000 --- a/tests/wpt/web-platform-tests/battery-status/battery-interface.js +++ /dev/null @@ -1,340 +0,0 @@ -(function() { - - setup("", {explicit_done: true}); - - /** - * - * partial interface Navigator { - * Promise getBattery (); - * }; - * - */ - - test(function() { - assert_idl_attribute(navigator, 'getBattery', 'navigator must have getBattery attribute'); - }, 'getBattery is present on navigator'); - - navigator.getBattery().then(function (battery) { - - /** - * - * interface BatteryManager : EventTarget { - * readonly attribute boolean charging; - * readonly attribute unrestricted double chargingTime; - * readonly attribute unrestricted double dischargingTime; - * readonly attribute double level; - * attribute EventHandler onchargingchange; - * attribute EventHandler onchargingtimechange; - * attribute EventHandler ondischargingtimechange; - * attribute EventHandler onlevelchange; - * }; - * - */ - - // interface BatteryManager : EventTarget { - - test(function() { - assert_own_property(window, 'BatteryManager'); - }, 'window has an own property BatteryManager'); - - test(function() { - assert_true(battery instanceof EventTarget); - }, 'battery inherits from EventTarget'); - - // readonly attribute boolean charging; - - test(function() { - assert_idl_attribute(battery, 'charging', 'battery must have charging attribute'); - }, 'charging attribute exists'); - - test(function() { - assert_readonly(battery, 'charging', 'charging must be readonly') - }, 'charging attribute is readonly'); - - // readonly attribute unrestricted double chargingTime; - - test(function() { - assert_idl_attribute(battery, 'chargingTime', 'battery must have chargingTime attribute'); - }, 'chargingTime attribute exists'); - - test(function() { - assert_readonly(battery, 'chargingTime', 'chargingTime must be readonly') - }, 'chargingTime attribute is readonly'); - - // readonly attribute unrestricted double dischargingTime; - - test(function() { - assert_idl_attribute(battery, 'dischargingTime', 'battery must have dischargingTime attribute'); - }, 'dischargingTime attribute exists'); - - test(function() { - assert_readonly(battery, 'dischargingTime', 'dischargingTime must be readonly') - }, 'dischargingTime attribute is readonly'); - - // readonly attribute double level; - - test(function() { - assert_idl_attribute(battery, 'level', 'battery must have level attribute'); - }, 'level attribute exists'); - - test(function() { - assert_readonly(battery, 'level', 'level must be readonly') - }, 'level attribute is readonly'); - - // attribute EventHandler onchargingchange; - - test(function() { - assert_idl_attribute(battery, 'onchargingchange', 'battery must have onchargingchange attribute'); - }, 'onchargingchange attribute exists'); - - test(function() { - assert_equals(battery.onchargingchange, null, 'onchargingchange must be null') - }, 'onchargingchange is null'); - - test(function() { - var desc = 'onchargingchange did not accept callable object', - func = function() {}, - desc = 'Expected to find onchargingchange attribute on battery object'; - assert_idl_attribute(battery, 'onchargingchange', desc); - window.onchargingchange = func; - assert_equals(window.onchargingchange, func, desc); - }, 'onchargingchange is set to function'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = {}; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat object as null'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = { - call: 'test' - }; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat object with non-callable call property as null'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable (string) as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = 'string'; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat string as null'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable (number) as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = 123; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat number as null'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable (undefined) as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = undefined; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat undefined as null'); - - test(function() { - var desc = 'onchargingchange did not treat noncallable (array) as null'; - battery.onchargingchange = function() {}; - battery.onchargingchange = []; - assert_equals(battery.onchargingchange, null, desc); - }, 'onchargingchange: treat array as null'); - - // attribute EventHandler onchargingtimechange; - - test(function() { - assert_idl_attribute(battery, 'onchargingtimechange', 'battery must have onchargingtimechange attribute'); - }, 'onchargingtimechange attribute exists'); - - test(function() { - assert_equals(battery.onchargingtimechange, null, 'onchargingtimechange must be null') - }, 'onchargingtimechange is null'); - - test(function() { - var desc = 'onchargingtimechange did not accept callable object', - func = function() {}, - desc = 'Expected to find onchargingtimechange attribute on battery object'; - assert_idl_attribute(battery, 'onchargingtimechange', desc); - window.onchargingtimechange = func; - assert_equals(window.onchargingtimechange, func, desc); - }, 'onchargingtimechange is set to function'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = {}; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat object as null'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = { - call: 'test' - }; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat object with non-callable call property as null'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable (string) as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = 'string'; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat string as null'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable (number) as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = 123; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat number as null'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable (undefined) as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = undefined; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat undefined as null'); - - test(function() { - var desc = 'onchargingtimechange did not treat noncallable (array) as null'; - battery.onchargingtimechange = function() {}; - battery.onchargingtimechange = []; - assert_equals(battery.onchargingtimechange, null, desc); - }, 'onchargingtimechange: treat array as null'); - - // attribute EventHandler ondischargingtimechange; - - test(function() { - assert_idl_attribute(battery, 'ondischargingtimechange', 'battery must have ondischargingtimechange attribute'); - }, 'ondischargingtimechange attribute exists'); - - test(function() { - assert_equals(battery.ondischargingtimechange, null, 'ondischargingtimechange must be null') - }, 'ondischargingtimechange is null'); - - test(function() { - var desc = 'ondischargingtimechange did not accept callable object', - func = function() {}, - desc = 'Expected to find ondischargingtimechange attribute on battery object'; - assert_idl_attribute(battery, 'ondischargingtimechange', desc); - window.ondischargingtimechange = func; - assert_equals(window.ondischargingtimechange, func, desc); - }, 'ondischargingtimechange is set to function'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = {}; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat object as null'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = { - call: 'test' - }; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat object with non-callable call property as null'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable (string) as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = 'string'; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat string as null'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable (number) as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = 123; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat number as null'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable (undefined) as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = undefined; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat undefined as null'); - - test(function() { - var desc = 'ondischargingtimechange did not treat noncallable (array) as null'; - battery.ondischargingtimechange = function() {}; - battery.ondischargingtimechange = []; - assert_equals(battery.ondischargingtimechange, null, desc); - }, 'ondischargingtimechange: treat array as null'); - - // attribute EventHandler onlevelchange; - - test(function() { - assert_idl_attribute(battery, 'onlevelchange', 'battery must have onlevelchange attribute'); - }, 'onlevelchange attribute exists'); - - test(function() { - assert_equals(battery.onlevelchange, null, 'onlevelchange must be null') - }, 'onlevelchange is null'); - - test(function() { - var desc = 'onlevelchange did not accept callable object', - func = function() {}, - desc = 'Expected to find onlevelchange attribute on battery object'; - assert_idl_attribute(battery, 'onlevelchange', desc); - window.onlevelchange = func; - assert_equals(window.onlevelchange, func, desc); - }, 'onlevelchange is set to function'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = {}; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat object as null'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = { - call: 'test' - }; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat object with non-callable call property as null'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable (string) as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = 'string'; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat string as null'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable (number) as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = 123; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat number as null'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable (undefined) as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = undefined; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat undefined as null'); - - test(function() { - var desc = 'onlevelchange did not treat noncallable (array) as null'; - battery.onlevelchange = function() {}; - battery.onlevelchange = []; - assert_equals(battery.onlevelchange, null, desc); - }, 'onlevelchange: treat array as null'); - - done(); - - }, function () {}); - -})(); diff --git a/tests/wpt/web-platform-tests/battery-status/battery-plugging-in-manual.html b/tests/wpt/web-platform-tests/battery-status/battery-plugging-in-manual.html index 8b96217880c..34e574ed492 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-plugging-in-manual.html +++ b/tests/wpt/web-platform-tests/battery-status/battery-plugging-in-manual.html @@ -65,7 +65,7 @@ battery.onlevelchange = onlevelchange_test.step_func(function () { assert_greater_than(battery.level, 0); - assert_less_than(battery.level, 1.0); + assert_less_than_equal(battery.level, 1.0); onlevelchange_test.done(); }); }; diff --git a/tests/wpt/web-platform-tests/battery-status/battery-unplugging-manual.html b/tests/wpt/web-platform-tests/battery-status/battery-unplugging-manual.html index 3ee33d08052..7c1346ff1a9 100644 --- a/tests/wpt/web-platform-tests/battery-status/battery-unplugging-manual.html +++ b/tests/wpt/web-platform-tests/battery-status/battery-unplugging-manual.html @@ -28,9 +28,6 @@ The battery must not be full or reach full capacity during the time the test is run. -

- The highest prime number discovered so far is: -

Unplug the charger and wait for all the tests to complete. @@ -67,9 +64,8 @@ battery.onlevelchange = onlevelchange_test.step_func(function () { assert_greater_than(battery.level, 0); - assert_less_than(battery.level, 1.0); + assert_less_than_equal(battery.level, 1.0); onlevelchange_test.done(); - w.terminate(); }); }; diff --git a/tests/wpt/web-platform-tests/conformance-checkers/messages.json b/tests/wpt/web-platform-tests/conformance-checkers/messages.json index 4a7959a4a3c..8f3417246d5 100644 --- a/tests/wpt/web-platform-tests/conformance-checkers/messages.json +++ b/tests/wpt/web-platform-tests/conformance-checkers/messages.json @@ -111,7 +111,7 @@ "html/elements/a/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/a/href/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/a/href/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/a/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/a/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/a/href/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/a/href/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/a/href/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201chref\u201d on element \u201ca\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -180,7 +180,7 @@ "html/elements/area/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/area/href/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/area/href/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/area/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/area/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/area/href/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/area/href/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/area/href/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201chref\u201d on element \u201carea\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -249,7 +249,7 @@ "html/elements/audio/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/audio/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/audio/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/audio/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/audio/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/audio/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/audio/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/audio/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201caudio\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -314,7 +314,7 @@ "html/elements/base/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/base/href/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/base/href/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/base/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/base/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/base/href/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/base/href/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/base/href/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201chref\u201d on element \u201cbase\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -379,7 +379,7 @@ "html/elements/blockquote/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/blockquote/cite/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/blockquote/cite/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/blockquote/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/blockquote/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/blockquote/cite/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/blockquote/cite/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/blockquote/cite/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201ccite\u201d on element \u201cblockquote\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -447,7 +447,7 @@ "html/elements/button/formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/button/formaction/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/button/formaction/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/button/formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/button/formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/button/formaction/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/button/formaction/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/button/formaction/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cformaction\u201d on element \u201cbutton\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -514,7 +514,7 @@ "html/elements/del/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/del/cite/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/del/cite/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/del/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/del/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/del/cite/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/del/cite/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/del/cite/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201ccite\u201d on element \u201cdel\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -676,7 +676,7 @@ "html/elements/embed/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/embed/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/embed/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/embed/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/embed/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/embed/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/embed/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/embed/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201cembed\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -746,7 +746,7 @@ "html/elements/form/action/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/form/action/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/form/action/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/form/action/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/form/action/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/form/action/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/form/action/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/form/action/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201caction\u201d on element \u201cform\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -821,7 +821,7 @@ "html/elements/html/manifest/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/html/manifest/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/html/manifest/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/html/manifest/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/html/manifest/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/html/manifest/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/html/manifest/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/html/manifest/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cmanifest\u201d on element \u201chtml\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -889,7 +889,7 @@ "html/elements/iframe/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/iframe/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/iframe/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/iframe/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/iframe/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/iframe/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/iframe/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/iframe/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201ciframe\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -956,7 +956,7 @@ "html/elements/img/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/img/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/img/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/img/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/img/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/img/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/img/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/img/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201cimg\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1027,7 +1027,7 @@ "html/elements/input/type-image-formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/input/type-image-formaction/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/input/type-image-formaction/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/input/type-image-formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/input/type-image-formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/input/type-image-formaction/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/input/type-image-formaction/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/input/type-image-formaction/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1093,7 +1093,7 @@ "html/elements/input/type-image-src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/input/type-image-src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/input/type-image-src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/input/type-image-src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/input/type-image-src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/input/type-image-src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/input/type-image-src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/input/type-image-src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1159,7 +1159,7 @@ "html/elements/input/type-submit-formaction/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/input/type-submit-formaction/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/input/type-submit-formaction/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/input/type-submit-formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/input/type-submit-formaction/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/input/type-submit-formaction/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/input/type-submit-formaction/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/input/type-submit-formaction/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cformaction\u201d on element \u201cinput\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1233,7 +1233,7 @@ "html/elements/input/type-url-value/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in scheme data: space is not allowed.", "html/elements/input/type-url-value/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in scheme data: tab is not allowed.", "html/elements/input/type-url-value/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/input/type-url-value/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/input/type-url-value/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/input/type-url-value/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/input/type-url-value/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/input/type-url-value/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cvalue\u201d on element \u201cinput\u201d: Bad absolute URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1297,7 +1297,7 @@ "html/elements/ins/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/ins/cite/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/ins/cite/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/ins/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/ins/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/ins/cite/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/ins/cite/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/ins/cite/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201ccite\u201d on element \u201cins\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1464,7 +1464,7 @@ "html/elements/link/href/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/link/href/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/link/href/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/link/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/link/href/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/link/href/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/link/href/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/link/href/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201chref\u201d on element \u201clink\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1532,7 +1532,7 @@ "html/elements/object/data/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/object/data/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/object/data/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/object/data/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/object/data/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/object/data/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/object/data/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/object/data/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cdata\u201d on element \u201cobject\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1800,7 +1800,7 @@ "html/elements/q/cite/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/q/cite/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/q/cite/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/q/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/q/cite/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/q/cite/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/q/cite/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/q/cite/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201ccite\u201d on element \u201cq\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1871,7 +1871,7 @@ "html/elements/script/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/script/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/script/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/script/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/script/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/script/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/script/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/script/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201cscript\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -1938,7 +1938,7 @@ "html/elements/source/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/source/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/source/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/source/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/source/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/source/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/source/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/source/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201csource\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -2016,7 +2016,7 @@ "html/elements/track/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/track/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/track/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/track/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/track/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/track/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/track/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/track/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201ctrack\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -2085,7 +2085,7 @@ "html/elements/video/poster/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/video/poster/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/video/poster/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/video/poster/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/video/poster/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/video/poster/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/video/poster/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/video/poster/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201cposter\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -2149,7 +2149,7 @@ "html/elements/video/src/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/elements/video/src/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/elements/video/src/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/elements/video/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/elements/video/src/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/elements/video/src/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/elements/video/src/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/elements/video/src/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201csrc\u201d on element \u201cvideo\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -2236,7 +2236,7 @@ "html/microdata/itemid/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in scheme data: space is not allowed.", "html/microdata/itemid/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in scheme data: tab is not allowed.", "html/microdata/itemid/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Backslash (\"\\\") used as path segment delimiter.", - "html/microdata/itemid/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/microdata/itemid/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/microdata/itemid/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/microdata/itemid/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/microdata/itemid/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201citemid\u201d on element \u201cdiv\u201d: Bad URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", @@ -2308,7 +2308,7 @@ "html/microdata/itemtype/scheme-trailing-space-novalid.html": "Bad value \u201ca: foo.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: The string \u201cfoo.com\u201d is not an absolute URL.", "html/microdata/itemtype/scheme-trailing-tab-novalid.html": "Bad value \u201ca:\tfoo.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: The string \u201cfoo.com\u201d is not an absolute URL.", "html/microdata/itemtype/userinfo-backslash-novalid.html": "Bad value \u201chttp://a\\b:c\\d@foo.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Backslash (\"\\\") used as path segment delimiter.", - "html/microdata/itemtype/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&afoo((b]c@d:2/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Illegal character in user or password: \u201c]\u201d is not allowed.", + "html/microdata/itemtype/userinfo-password-bad-chars-novalid.html": "Bad value \u201chttp://&a:foo(b]c@d:2/\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Illegal character in user or password: \u201c]\u201d is not allowed.", "html/microdata/itemtype/userinfo-password-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://foo:\ud83d\udca9@example.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", "html/microdata/itemtype/userinfo-username-contains-at-sign-novalid.html": "Bad value \u201chttp://::@c@d:2\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: User or password contains an at symbol (\"@\") not percent-encoded.", "html/microdata/itemtype/userinfo-username-contains-pile-of-poo-novalid.html": "Bad value \u201chttp://\ud83d\udca9:foo@example.com\u201d for attribute \u201citemtype\u201d on element \u201cdiv\u201d: Bad absolute URL: Illegal character in user or password: \u201c\ud83d\udca9\u201d is not allowed.", diff --git a/tests/wpt/web-platform-tests/dom/interface-objects.html b/tests/wpt/web-platform-tests/dom/interface-objects.html index c0697b566c1..6d250671dec 100644 --- a/tests/wpt/web-platform-tests/dom/interface-objects.html +++ b/tests/wpt/web-platform-tests/dom/interface-objects.html @@ -31,7 +31,6 @@ var interfaces = [ "NodeFilter", "NodeList", "HTMLCollection", - "DOMStringList", "DOMTokenList", "DOMSettableTokenList" ]; diff --git a/tests/wpt/web-platform-tests/dom/nodes/attributes.html b/tests/wpt/web-platform-tests/dom/nodes/attributes.html index 06752a94d52..2578b51f7a3 100644 --- a/tests/wpt/web-platform-tests/dom/nodes/attributes.html +++ b/tests/wpt/web-platform-tests/dom/nodes/attributes.html @@ -19,12 +19,17 @@ var XMLNS = "http://www.w3.org/2000/xmlns/" test(function() { document.body.setAttribute("abc", "pass") var attr = document.body.attributes[0] - assert_true(attr instanceof Attr) - assert_false(attr instanceof Node) - assert_throws(new TypeError(), function() { attr.appendChild(document.createTextNode("fail")) }) - assert_throws(new TypeError(), function() { attr.appendChild(null) }) + assert_true(attr instanceof Attr, "should be an Attr") + assert_false(attr instanceof Node, "should not be a Node") + var removed_members = [ + "appendChild", + "insertBefore", + "childNodes", + ] + removed_members.forEach(function(m) { + assert_false(m in attr, m + " should not be supported") + }) assert_equals(attr.value, "pass") - assert_false("childNodes" in attr, "Should not have childNodes") }, "AttrExodus") // setAttribute exhaustive tests diff --git a/tests/wpt/web-platform-tests/html/dom/elements-obsolete.js b/tests/wpt/web-platform-tests/html/dom/elements-obsolete.js index 820e2909d06..3b6ae363bba 100644 --- a/tests/wpt/web-platform-tests/html/dom/elements-obsolete.js +++ b/tests/wpt/web-platform-tests/html/dom/elements-obsolete.js @@ -1,5 +1,6 @@ // Up-to-date as of 2013-04-13. var obsoleteElements = { + // https://html.spec.whatwg.org/multipage/#the-applet-element applet: { align: "string", alt: "string", @@ -13,6 +14,7 @@ var obsoleteElements = { vspace: "unsigned long", width: "string", }, + // https://html.spec.whatwg.org/multipage/#the-marquee-element-2 marquee: { behavior: "string", bgColor: "string", @@ -25,10 +27,12 @@ var obsoleteElements = { vspace: "unsigned long", width: "string", }, + // https://html.spec.whatwg.org/multipage/#frameset frameset: { cols: "string", rows: "string", }, + // https://html.spec.whatwg.org/multipage/#frame frame: { name: "string", scrolling: "string", @@ -39,9 +43,11 @@ var obsoleteElements = { marginHeight: {type: "string", treatNullAsEmptyString: true}, marginWidth: {type: "string", treatNullAsEmptyString: true}, }, + // https://html.spec.whatwg.org/multipage/#htmldirectoryelement dir: { compact: "boolean", }, + // https://html.spec.whatwg.org/multipage/#htmlfontelement font: { color: {type: "string", treatNullAsEmptyString: true}, face: "string", diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html new file mode 100644 index 00000000000..16a308a2f77 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html new file mode 100644 index 00000000000..197f49aa24e --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html new file mode 100644 index 00000000000..95ec6c739dc --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-001c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html new file mode 100644 index 00000000000..7b7029a2696 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > 3 >
+
> a > > 3 >
+
> א > > 3 >
+
> a > > 3 >
+
+
+
‭< א < > 3 >‬
+
‭< a < > 3 >‬
+
‭< 3 < > א >‬
+
‭< 3 < > a >‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html new file mode 100644 index 00000000000..d448de50807 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > 3 >
+
> a > > 3 >
+
> א > > 3 >
+
> a > > 3 >
+
+
+
‭< א < > 3 >‬
+
‭> a > > 3 >‬
+
‭< 3 < < א <‬
+
‭< 3 < > a >‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html new file mode 100644 index 00000000000..e88fb1c845c --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-002c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > 3 >
+
> a > > 3 >
+
> א > > 3 >
+
> a > > 3 >
+
+
+
‭> א > > 3 >‬
+
‭> a > > 3 >‬
+
‭< 3 < < א <‬
+
‭< 3 < < a <‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html new file mode 100644 index 00000000000..9cf65c81846 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following number, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א3
+
a3
+
א3
+
a3
+
+
+
‭א3‬
+
‭a3‬
+
‭3א‬
+
‭3a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html new file mode 100644 index 00000000000..2c6b5530895 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following number, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א3
+
a3
+
א3
+
a3
+
+
+
‭א3‬
+
‭a3‬
+
‭3א‬
+
‭3a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html new file mode 100644 index 00000000000..ac8735122bb --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-003c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following number, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א3
+
a3
+
א3
+
a3
+
+
+
‭א3‬
+
‭a3‬
+
‭3א‬
+
‭3a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html new file mode 100644 index 00000000000..27a674ccdcd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: numbers isolated from preceding text, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html new file mode 100644 index 00000000000..6fe74393aea --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: numbers isolated from preceding text, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html new file mode 100644 index 00000000000..43d994b2f0a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-004c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: numbers isolated from preceding text, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א 3
+
a 3
+
א 3
+
a 3
+
+
+
‭א 3‬
+
‭a 3‬
+
‭3 א‬
+
‭3 a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html new file mode 100644 index 00000000000..2fbddbd71f0 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following text, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב...
+
a b...
+
a b...
+
א ב...
+
+
+
‭א ב...‬
+
‭a b...‬
+
‭...b a‬
+
‭...ב א‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html new file mode 100644 index 00000000000..d61e258f219 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following text, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב...
+
a b...
+
a b...
+
א ב...
+
+
+
‭א ב...‬
+
‭a b...‬
+
‭...b a‬
+
‭...ב א‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html new file mode 100644 index 00000000000..d544275b2f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-005c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from following text, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב...
+
a b...
+
a b...
+
א ב...
+
+
+
‭א ב...‬
+
‭a b...‬
+
‭...b a‬
+
‭...ב א‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html new file mode 100644 index 00000000000..430df00d9f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006a.html @@ -0,0 +1,32 @@ + + + + +The dir attribute: isolated from following text with intervening neutrals, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > ב >...
+
> a > > b >...
+
+
+
‭< א < > ב >...‬
+
‭...< b < > a >‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html new file mode 100644 index 00000000000..a6da487152c --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006b.html @@ -0,0 +1,32 @@ + + + + +The dir attribute: isolated from following text with intervening neutrals, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > ב >...
+
> a > > b >...
+
+
+
‭< א < > ב >...‬
+
‭...< b < > a >‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html new file mode 100644 index 00000000000..3407d37f38a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-006c.html @@ -0,0 +1,32 @@ + + + + +The dir attribute: isolated from following text with intervening neutrals, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
> א > > ב >...
+
> a > > b >...
+
+
+
‭> א > > ב >...‬
+
‭...< b < < a <‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html new file mode 100644 index 00000000000..e8b37b1b977 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following text, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
אב...
+
ab...
+
ab...
+
אב...
+
+
+
‭אב...‬
+
‭ab...‬
+
‭...ba‬
+
‭...בא‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html new file mode 100644 index 00000000000..c54e63de7ce --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following text, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
אב...
+
ab...
+
ab...
+
אב...
+
+
+
‭אב...‬
+
‭ab...‬
+
‭...ba‬
+
‭...בא‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html new file mode 100644 index 00000000000..b9c5219b8da --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-007c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from immediately following text, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
אב...
+
ab...
+
ab...
+
אב...
+
+
+
‭אב...‬
+
‭ab...‬
+
‭...ba‬
+
‭...בא‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html new file mode 100644 index 00000000000..1455fd552be --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008a.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from preceding text, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב
+
a b
+
א ב
+
a b
+
+
+
‭א ב‬
+
‭a b‬
+
‭ב א‬
+
‭b a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html new file mode 100644 index 00000000000..f12e6d67bf8 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008b.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from preceding text, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב
+
a b
+
א ב
+
a b
+
+
+
‭א ב‬
+
‭a b‬
+
‭ב א‬
+
‭b a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html new file mode 100644 index 00000000000..b1754cf23e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-008c.html @@ -0,0 +1,36 @@ + + + + +The dir attribute: isolated from preceding text, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א ב
+
a b
+
א ב
+
a b
+
+
+
‭א ב‬
+
‭a b‬
+
‭ב א‬
+
‭b a‬
+
+ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html new file mode 100644 index 00000000000..63a9706bae5 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009a.html @@ -0,0 +1,33 @@ + + + + +The dir attribute: isolated from surrounding text, opposite direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א > > b > > ג...
+
a > > ב > > c...
+
+
+
‭ג < < b < < א...‬
+
‭...a > > ב > > c‬
+
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html new file mode 100644 index 00000000000..57098fa75a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009b.html @@ -0,0 +1,33 @@ + + + + +The dir attribute: isolated from surrounding text, auto + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א > > b > > ג...
+
a > > ב > > c...
+
+
+
‭ג < > b > < א...‬
+
‭...a > < ב < > c‬
+
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html new file mode 100644 index 00000000000..4aac3184eee --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/dir-isolation-009c.html @@ -0,0 +1,33 @@ + + + + +The dir attribute: isolated from surrounding text, same direction + + + + + + + +

Test passes if the two boxes are identical.

+ +
+
א > > b > > ג...
+
a > > ב > > c...
+
+
+
‭ג < > b > < א...‬
+
‭...a > < ב < > c‬
+
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html new file mode 100644 index 00000000000..b5882eb7a3e --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-001-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following number, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭א 3‬
‭a 3‬
‭3 א‬
‭3 a‬
+
‭א 3‬
‭a 3‬
‭3 א‬
‭3 a‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002a-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002a-ref.html new file mode 100644 index 00000000000..f28559b5a10 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002a-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭< א < > 3 >‬
‭< a < > 3 >‬
‭< 3 < > א >‬
‭< 3 < > a >‬
+
‭< א < > 3 >‬
‭< a < > 3 >‬
‭< 3 < > א >‬
‭< 3 < > a >‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002b-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002b-ref.html new file mode 100644 index 00000000000..d4eda2189dc --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002b-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, auto + + + +

Test passes if the two boxes are identical.

+
‭< א < > 3 >‬
‭> a > > 3 >‬
‭< 3 < < א <‬
‭< 3 < > a >‬
+
‭< א < > 3 >‬
‭> a > > 3 >‬
‭< 3 < < א <‬
‭< 3 < > a >‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002c-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002c-ref.html new file mode 100644 index 00000000000..6c21d0147dd --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-002c-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following number with intervening neutrals, same direction + + + +

Test passes if the two boxes are identical.

+
‭> א > > 3 >‬
‭> a > > 3 >‬
‭< 3 < < א <‬
‭< 3 < < a <‬
+
‭> א > > 3 >‬
‭> a > > 3 >‬
‭< 3 < < א <‬
‭< 3 < < a <‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html new file mode 100644 index 00000000000..4c29838ee43 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-003-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from immediately following number, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭א3‬
‭a3‬
‭3א‬
‭3a‬
+
‭א3‬
‭a3‬
‭3א‬
‭3a‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html new file mode 100644 index 00000000000..cb83dde5841 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-004-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: numbers isolated from preceding text, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭א 3‬
‭a 3‬
‭3 א‬
‭3 a‬
+
‭א 3‬
‭a 3‬
‭3 א‬
‭3 a‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html new file mode 100644 index 00000000000..4a6c301aa1d --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-005-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following text, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭א ב...‬
‭a b...‬
‭...b a‬
‭...ב א‬
+
‭א ב...‬
‭a b...‬
‭...b a‬
‭...ב א‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html new file mode 100644 index 00000000000..0f6b7bbbd05 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following text with intervening neutrals, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭< א < > ב >...‬
‭...< b < > a >‬
+
‭< א < > ב >...‬
‭...< b < > a >‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006c-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006c-ref.html new file mode 100644 index 00000000000..0347c0910c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-006c-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from following text with intervening neutrals, same direction + + + +

Test passes if the two boxes are identical.

+
‭> א > > ב >...‬
‭...< b < < a <‬
+
‭> א > > ב >...‬
‭...< b < < a <‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html new file mode 100644 index 00000000000..665153d649b --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-007-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from immediately following text, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭אב...‬
‭ab...‬
‭...ba‬
‭...בא‬
+
‭אב...‬
‭ab...‬
‭...ba‬
‭...בא‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html new file mode 100644 index 00000000000..8eb90f8b791 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-008-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from preceding text, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭א ב‬
‭a b‬
‭ב א‬
‭b a‬
+
‭א ב‬
‭a b‬
‭ב א‬
‭b a‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009-ref.html new file mode 100644 index 00000000000..1d2f57c6cfa --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from surrounding text, opposite direction + + + +

Test passes if the two boxes are identical.

+
‭ג < < b < < א...‬
‭...a > > ב > > c‬
+
‭ג < < b < < א...‬
‭...a > > ב > > c‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html new file mode 100644 index 00000000000..30ee14c6c0a --- /dev/null +++ b/tests/wpt/web-platform-tests/html/dom/elements/requirements-relating-to-bidirectional-algorithm-formatting-characters/reference/dir-isolation-009b-ref.html @@ -0,0 +1,16 @@ + + + + +The dir attribute: isolated from surrounding text, auto + + + +

Test passes if the two boxes are identical.

+
‭ג < > b > < א...‬
‭...a > < ב < > c‬
+
‭ג < > b > < א...‬
‭...a > < ב < > c‬
+ + diff --git a/tests/wpt/web-platform-tests/html/dom/interfaces.html b/tests/wpt/web-platform-tests/html/dom/interfaces.html index 69d81ccb0eb..f76d0ce38a7 100644 --- a/tests/wpt/web-platform-tests/html/dom/interfaces.html +++ b/tests/wpt/web-platform-tests/html/dom/interfaces.html @@ -911,7 +911,7 @@ interface PropertyNodeList : NodeList { PropertyValueArray getValues(); }; -[OverrideBuiltins, Exposed=Window,Worker] +[OverrideBuiltins, Exposed=(Window,Worker)] interface DOMStringMap { getter DOMString (DOMString name); setter creator void (DOMString name, DOMString value); @@ -1977,7 +1977,7 @@ interface HTMLCanvasElement : HTMLElement { void toBlob(FileCallback? _callback, optional DOMString type, any... arguments); }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface CanvasProxy { void setContext(RenderingContext context); }; @@ -1991,7 +1991,7 @@ typedef (HTMLImageElement or enum CanvasFillRule { "nonzero", "evenodd" }; -[Constructor(optional unsigned long width, unsigned long height), Exposed=Window,Worker] +[Constructor(optional unsigned long width, unsigned long height), Exposed=(Window,Worker)] interface CanvasRenderingContext2D { // back-reference to the canvas @@ -2086,7 +2086,7 @@ interface CanvasRenderingContext2D { CanvasRenderingContext2D implements CanvasDrawingStyles; CanvasRenderingContext2D implements CanvasPathMethods; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface CanvasDrawingStyles { // line caps/joins attribute unrestricted double lineWidth; // (default 1) @@ -2106,7 +2106,7 @@ interface CanvasDrawingStyles { attribute DOMString direction; // "ltr", "rtl", "inherit" (default: "inherit") }; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface CanvasPathMethods { // shared path API methods void closePath(); @@ -2121,19 +2121,19 @@ interface CanvasPathMethods { void ellipse(unrestricted double x, unrestricted double y, unrestricted double radiusX, unrestricted double radiusY, unrestricted double rotation, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false); }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface CanvasGradient { // opaque object void addColorStop(double offset, DOMString color); }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface CanvasPattern { // opaque object void setTransform(SVGMatrix transform); }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface TextMetrics { // x-direction readonly attribute double width; // advance width @@ -2167,21 +2167,21 @@ dictionary HitRegionOptions { [Constructor(unsigned long sw, unsigned long sh), Constructor(Uint8ClampedArray data, unsigned long sw, optional unsigned long sh), - Exposed=Window,Worker] + Exposed=(Window,Worker)] interface ImageData { readonly attribute unsigned long width; readonly attribute unsigned long height; readonly attribute Uint8ClampedArray data; }; -[Constructor(optional Element scope), Exposed=Window,Worker] +[Constructor(optional Element scope), Exposed=(Window,Worker)] interface DrawingStyle { }; DrawingStyle implements CanvasDrawingStyles; [Constructor, Constructor(Path2D path), Constructor(Path2D[] paths, optional CanvasFillRule fillRule = "nonzero"), - Constructor(DOMString d), Exposed=Window,Worker] + Constructor(DOMString d), Exposed=(Window,Worker)] interface Path2D { void addPath(Path2D path, optional SVGMatrix? transformation = null); void addPathByStrokingPath(Path2D path, CanvasDrawingStyles styles, optional SVGMatrix? transformation = null); @@ -2337,7 +2337,7 @@ interface History { [SameObject] readonly attribute USVString[] ancestorOrigins; }; -[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional PopStateEventInit eventInitDict), Exposed=(Window,Worker)] interface PopStateEvent : Event { readonly attribute any state; }; @@ -2346,7 +2346,7 @@ dictionary PopStateEventInit : EventInit { any state; }; -[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional HashChangeEventInit eventInitDict), Exposed=(Window,Worker)] interface HashChangeEvent : Event { readonly attribute DOMString oldURL; readonly attribute DOMString newURL; @@ -2357,7 +2357,7 @@ dictionary HashChangeEventInit : EventInit { DOMString newURL; }; -[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional PageTransitionEventInit eventInitDict), Exposed=(Window,Worker)] interface PageTransitionEvent : Event { readonly attribute boolean persisted; }; @@ -2398,12 +2398,12 @@ interface ApplicationCache : EventTarget { attribute EventHandler onobsolete; }; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface NavigatorOnLine { readonly attribute boolean onLine; }; -[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional ErrorEventInit eventInitDict), Exposed=(Window,Worker)] interface ErrorEvent : Event { readonly attribute DOMString message; readonly attribute DOMString filename; @@ -2516,14 +2516,14 @@ interface WindowEventHandlers { attribute EventHandler onunload; }; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface WindowBase64 { DOMString btoa(DOMString btoa); DOMString atob(DOMString atob); }; Window implements WindowBase64; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface WindowTimers { long setTimeout(Function handler, optional long timeout = 0, any... arguments); long setTimeout(DOMString handler, optional long timeout = 0, any... arguments); @@ -2550,7 +2550,7 @@ Navigator implements NavigatorContentUtils; Navigator implements NavigatorStorageUtils; Navigator implements NavigatorPlugins; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface NavigatorID { readonly attribute DOMString appCodeName; // constant "Mozilla" readonly attribute DOMString appName; @@ -2561,7 +2561,7 @@ interface NavigatorID { readonly attribute DOMString userAgent; }; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface NavigatorLanguage { readonly attribute DOMString? language; readonly attribute DOMString[] languages; @@ -2625,7 +2625,7 @@ interface External { unsigned long IsSearchProviderInstalled(DOMString engineURL); }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface ImageBitmap { readonly attribute unsigned long width; readonly attribute unsigned long height; @@ -2639,14 +2639,14 @@ typedef (HTMLImageElement or CanvasRenderingContext2D or ImageBitmap) ImageBitmapSource; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface ImageBitmapFactories { Promise createImageBitmap(ImageBitmapSource image, optional long sx, long sy, long sw, long sh); }; Window implements ImageBitmapFactories; WorkerGlobalScope implements ImageBitmapFactories; -[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional MessageEventInit eventInitDict), Exposed=(Window,Worker)] interface MessageEvent : Event { readonly attribute any data; readonly attribute DOMString origin; @@ -2665,7 +2665,7 @@ dictionary MessageEventInit : EventInit { sequence ports; }; -[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=Window,Worker] +[Constructor(DOMString url, optional EventSourceInit eventSourceInitDict), Exposed=(Window,Worker)] interface EventSource : EventTarget { readonly attribute DOMString url; readonly attribute boolean withCredentials; @@ -2688,7 +2688,7 @@ dictionary EventSourceInit { }; enum BinaryType { "blob", "arraybuffer" }; -[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=Window,Worker] +[Constructor(DOMString url, optional (DOMString or DOMString[]) protocols), Exposed=(Window,Worker)] interface WebSocket : EventTarget { readonly attribute DOMString url; @@ -2701,23 +2701,23 @@ interface WebSocket : EventTarget { readonly attribute unsigned long bufferedAmount; // networking - attribute EventHandler onopen; - attribute EventHandler onerror; - attribute EventHandler onclose; + attribute EventHandler onopen; + attribute EventHandler onerror; + attribute EventHandler onclose; readonly attribute DOMString extensions; readonly attribute DOMString protocol; - void close([Clamp] optional unsigned short code, optional DOMString reason); + void close([Clamp] optional unsigned short code, optional USVString reason); // messaging - attribute EventHandler onmessage; - attribute BinaryType binaryType; - void send(DOMString data); + attribute EventHandler onmessage; + attribute BinaryType binaryType; + void send(USVString data); void send(Blob data); void send(ArrayBuffer data); void send(ArrayBufferView data); }; -[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=Window,Worker] +[Constructor(DOMString type, optional CloseEventInit eventInitDict), Exposed=(Window,Worker)] interface CloseEvent : Event { readonly attribute boolean wasClean; readonly attribute unsigned short code; @@ -2730,13 +2730,13 @@ dictionary CloseEventInit : EventInit { DOMString reason; }; -[Constructor, Exposed=Window,Worker] +[Constructor, Exposed=(Window,Worker)] interface MessageChannel { readonly attribute MessagePort port1; readonly attribute MessagePort port2; }; -[Exposed=Window,Worker] +[Exposed=(Window,Worker)] interface MessagePort : EventTarget { void postMessage(any message, optional sequence transfer); void start(); @@ -2747,7 +2747,7 @@ interface MessagePort : EventTarget { }; // MessagePort implements Transferable; -[Constructor, Exposed=Window,Worker] +[Constructor, Exposed=(Window,Worker)] interface PortCollection { void add(MessagePort port); void remove(MessagePort port); @@ -2757,7 +2757,7 @@ interface PortCollection { callback PortCollectionCallback = void (MessagePort port); -[Constructor(DOMString channel), Exposed=Window,Worker] +[Constructor(DOMString channel), Exposed=(Window,Worker)] interface BroadcastChannel : EventTarget { readonly attribute DOMString name; void postMessage(any message); @@ -2792,12 +2792,12 @@ interface WorkerGlobalScope : EventTarget { attribute EventHandler onconnect; }; -[NoInterfaceObject, Exposed=Window,Worker] +[NoInterfaceObject, Exposed=(Window,Worker)] interface AbstractWorker { attribute EventHandler onerror; }; -[Constructor(DOMString scriptURL), Exposed=Window,Worker] +[Constructor(DOMString scriptURL), Exposed=(Window,Worker)] interface Worker : EventTarget { void terminate(); @@ -2806,7 +2806,7 @@ interface Worker : EventTarget { }; Worker implements AbstractWorker; -[Constructor(DOMString scriptURL, optional DOMString name), Exposed=Window,Worker] +[Constructor(DOMString scriptURL, optional DOMString name), Exposed=(Window,Worker)] interface SharedWorker : EventTarget { readonly attribute MessagePort port; }; @@ -3388,6 +3388,8 @@ window.onload = function() { PeerConnection: [], MediaStreamEvent: [], ErrorEvent: [], + WebSocket: ['new WebSocket("ws://foo")'], + CloseEvent: ['new CloseEvent("close")'], AbstractWorker: [], Worker: [], SharedWorker: [], diff --git a/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html new file mode 100644 index 00000000000..959ceaa9793 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/embedded-content/the-img-element/update-the-image-data/fail-to-resolve.html @@ -0,0 +1,25 @@ + +img update the image data: fail to resolve URL + + +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html new file mode 100644 index 00000000000..dc0fa9dabb7 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/base.html @@ -0,0 +1,15 @@ + + +Script src with a base URL + + + +
+ + diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js new file mode 100644 index 00000000000..3cbbb12e2eb --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/alpha/test.js @@ -0,0 +1 @@ +do_test("alpha"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js new file mode 100644 index 00000000000..4ce0f5338d9 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/beta/test.js @@ -0,0 +1 @@ +do_test("beta"); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html new file mode 100644 index 00000000000..edc2c3d6f89 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty-with-base.html @@ -0,0 +1,27 @@ + + +Script src with an empty URL + + + +
+ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html new file mode 100644 index 00000000000..d127f1eb3bf --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/empty.html @@ -0,0 +1,32 @@ + + +Script src with an empty URL + + +
+ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html new file mode 100644 index 00000000000..b49e51740fa --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/failure.html @@ -0,0 +1,25 @@ + + +Script src with an invalid URL + + +
+ diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js new file mode 100644 index 00000000000..ca7fdba71f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/fetch-src/unreachable.js @@ -0,0 +1 @@ +unreachable(); diff --git a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html index e32f8402427..6e864722467 100644 --- a/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html +++ b/tests/wpt/web-platform-tests/html/semantics/scripting-1/the-script-element/script-text.html @@ -15,10 +15,12 @@ setup(function() { script.appendChild(document.createElement("a")) .appendChild(document.createTextNode("ELEMENT")) }) + test(function() { assert_equals(script.text, " TEXT ") assert_equals(script.textContent, " TEXT ELEMENT") }, "Getter") + test(function() { script.text = " text " assert_equals(script.text, " text ") @@ -28,12 +30,14 @@ test(function() { assert_equals(script.firstChild, script.lastChild) assert_array_equals(script.childNodes, [script.firstChild]) }, "Setter (non-empty string)") + test(function() { script.text = "" assert_equals(script.text, "") assert_equals(script.textContent, "") assert_equals(script.firstChild, null) }, "Setter (empty string)") + test(function() { script.text = null assert_equals(script.text, "null") @@ -42,6 +46,7 @@ test(function() { assert_equals(script.firstChild.data, "null") assert_equals(script.firstChild, script.lastChild) }, "Setter (null)") + test(function() { script.text = undefined assert_equals(script.text, "undefined") @@ -50,4 +55,18 @@ test(function() { assert_equals(script.firstChild.data, "undefined") assert_equals(script.firstChild, script.lastChild) }, "Setter (undefined)") + +test(function() { + var s = document.createElement("script"); + var text = document.createTextNode("one"); + s.appendChild(text); + + assert_equals(s.firstChild, text); + assert_equals(text.nodeValue, "one"); + + s.text = "two"; + assert_not_equals(s.firstChild, text); + assert_equals(text.nodeValue, "one"); + assert_equals(s.firstChild.nodeValue, "two"); +}, "Setter (text node reuse)") diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer-support.js b/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer-support.js new file mode 100644 index 00000000000..28487111eaa --- /dev/null +++ b/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer-support.js @@ -0,0 +1,13 @@ +t.step(function() { + assert_false(dcl, "DOMContentLoaded should not have fired before executing " + + "a defer script"); + + setTimeout(t.step_func(function() { + assert_false(dcl, "DOMContentLoaded should not have fired before " + + "executing a task queued from a defer script"); + setTimeout(t.step_func_done(function() { + assert_true(dcl, "DOMContentLoaded should have fired in a task that " + + "was queued after the DOMContentLoaded task was queued"); + }), 0); + }), 0); +}); diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer.html b/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer.html new file mode 100644 index 00000000000..bf365c1a092 --- /dev/null +++ b/tests/wpt/web-platform-tests/html/syntax/parsing/DOMContentLoaded-defer.html @@ -0,0 +1,17 @@ + + +The end: DOMContentLoaded and defer scripts + + + +
+ + diff --git a/tests/wpt/web-platform-tests/lint.whitelist b/tests/wpt/web-platform-tests/lint.whitelist index 8a06164cefa..1f285a62c7c 100644 --- a/tests/wpt/web-platform-tests/lint.whitelist +++ b/tests/wpt/web-platform-tests/lint.whitelist @@ -110,6 +110,11 @@ PARSE-FAILED:content-security-policy/svg/including.sub.svg PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/empty.xml PARSE-FAILED:dom/nodes/Document-createElement-namespace-tests/minimal_html.xml +# The patches may have trailin whitespace +TRAILING WHITESPACE:webgl/tools/*.patch +# The tests under this directory are not done by us +*:webgl/conformance-1.0.3/* + # Git submodules are not currently scanned *:tools/* *:resources/* diff --git a/tests/wpt/web-platform-tests/quirks-mode/line-height-calculation.html b/tests/wpt/web-platform-tests/quirks-mode/line-height-calculation.html index c9289ce31cb..7e7f03a99b9 100644 --- a/tests/wpt/web-platform-tests/quirks-mode/line-height-calculation.html +++ b/tests/wpt/web-platform-tests/quirks-mode/line-height-calculation.html @@ -13,11 +13,13 @@ + + + + + + +
+
+
+ diff --git a/tests/wpt/web-platform-tests/quirks-mode/table-cell-nowrap-minimum-width-calculation.html b/tests/wpt/web-platform-tests/quirks-mode/table-cell-nowrap-minimum-width-calculation.html index 6b07246e852..2ff00b9ee79 100644 --- a/tests/wpt/web-platform-tests/quirks-mode/table-cell-nowrap-minimum-width-calculation.html +++ b/tests/wpt/web-platform-tests/quirks-mode/table-cell-nowrap-minimum-width-calculation.html @@ -13,11 +13,13 @@ + +Hello? Yes, this is iframe. + diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/credentials-worker.js b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/credentials-worker.js new file mode 100644 index 00000000000..43965b5fe4c --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/resources/credentials-worker.js @@ -0,0 +1,59 @@ +var cache_name = 'credentials'; + +function assert_equals(actual, expected, message) { + if (!Object.is(actual, expected)) + throw Error(message + ': expected: ' + expected + ', actual: ' + actual); +} + +self.onfetch = function(e) { + if (!/\.txt$/.test(e.request.url)) return; + var content = e.request.url; + var cache; + e.respondWith( + self.caches.open(cache_name) + .then(function(result) { + cache = result; + return cache.put(e.request, new Response(content)); + }) + + .then(function() { return cache.match(e.request); }) + .then(function(result) { return result.text(); }) + .then(function(text) { + assert_equals(text, content, 'Cache.match() body should match'); + }) + + .then(function() { return cache.matchAll(e.request); }) + .then(function(results) { + assert_equals(results.length, 1, 'Should have one response'); + return results[0].text(); + }) + .then(function(text) { + assert_equals(text, content, 'Cache.matchAll() body should match'); + }) + + .then(function() { return self.caches.match(e.request); }) + .then(function(result) { return result.text(); }) + .then(function(text) { + assert_equals(text, content, 'CacheStorage.match() body should match'); + }) + + .then(function() { + return new Response('dummy'); + }) + ); +}; + +self.onmessage = function(e) { + if (e.data === 'keys') { + self.caches.open(cache_name) + .then(function(cache) { return cache.keys(); }) + .then(function(requests) { + var urls = requests.map(function(request) { return request.url; }); + self.clients.matchAll().then(function(clients) { + clients.forEach(function(client) { + client.postMessage(urls); + }); + }); + }); + } +}; diff --git a/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/credentials.html b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/credentials.html new file mode 100644 index 00000000000..f2d8838f2a6 --- /dev/null +++ b/tests/wpt/web-platform-tests/service-workers/cache-storage/serviceworker/credentials.html @@ -0,0 +1,46 @@ + + +Cache Storage: Verify credentials are respected by Cache operations + + + + + + diff --git a/tests/wpt/web-platform-tests/uievents/README.md b/tests/wpt/web-platform-tests/uievents/README.md new file mode 100644 index 00000000000..065c0c78848 --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/README.md @@ -0,0 +1,3 @@ +To run the UIEvents tests, go to: + +http://w3c-test.org/uievents/order-of-events/mouse-events/ \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/uievents/keyboard/README.md b/tests/wpt/web-platform-tests/uievents/keyboard/README.md new file mode 100644 index 00000000000..38c454dd7c3 --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/keyboard/README.md @@ -0,0 +1,3 @@ +# Keyboard event tests + +These tests focus on testing the |key|, |code| and other attributes of KeyboardEvents. diff --git a/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-101en-us.html b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-101en-us.html new file mode 100644 index 00000000000..11a11e852e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-101en-us.html @@ -0,0 +1,91 @@ + + + + +Keyboard Event Manual Test + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-102fr-fr.html b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-102fr-fr.html new file mode 100644 index 00000000000..cf16845a79e --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest-102fr-fr.html @@ -0,0 +1,93 @@ + + + + +Keyboard Event Manual Test + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.css b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.css new file mode 100644 index 00000000000..b2add2a754d --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.css @@ -0,0 +1,118 @@ +.keyboard { + display: table; + border-collapse: separate; + border-spacing: 2px; + width: 800px; + border: 2px solid black; + border-radius: 10px; + padding: 5px; +} + +.key-row { + display: table; + margin: 0; + padding: 0; +} + +.key { + display: table-cell; + border: 2px solid black; + border-radius: 8px; + width: 50px; + height: 40px; + vertical-align: middle; + text-align: center; + margin: 0; + padding: 0; +} + +.wide1 { + width: 70px; +} + +.wide2 { + width: 90px; +} + +.wide3 { + width: 110px; +} + +.wide4 { + width: 130px; +} + +.wide5 { + width: 300px; +} + +.nextKey { + background-color: yellow; +} + +.goodKey { + background-color: #80ff08; +} + +.badKey { + background-color: #ff8080; +} + +.activeModifierKey { + background-color: #a0a0ff; +} + +.skippedKey { + background-color: #e0e0e0; +} + +#options { + display: none; + margin: 20px; +} + +#optionstoggle, #helptoggle { + font-size: 10pt; +} + +.opttable { + border: 1px solid black; +} + +.optcell { + vertical-align: top; + padding: 0 10px; +} + +.opttitle { + font-weight: bold; +} + +.error { + border: 1px solid red; + margin: 5px; + padding: 5px; +} + +.error1 { + font-size: 12pt; + margin: 0 0 0 10px; + padding: 0; +} + +.error2 { + font-size: 10pt; + margin: 0 0 0 20px; + padding: 0; +} + +.help { + font-size: 11pt; + margin: 0 0 5px 20px; + padding: 0; +} + +body { + margin: 10px; + padding: 0 20px; +} diff --git a/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.js b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.js new file mode 100644 index 00000000000..175258bd887 --- /dev/null +++ b/tests/wpt/web-platform-tests/uievents/keyboard/key-mtest.js @@ -0,0 +1,671 @@ +var _testing = false; + +// The index into _keyTable of the key currently being tested. +var _currKey = 0; + +var _keysTotal = 0; +var _keysGood = 0; +var _keysBad = 0; +var _keysSkipped = 0; + +var _modifierMode = "None"; + +var _keydownCapture = []; +var _keyupCapture = []; + +var CAPTURE_KEYCODE = 0; +var CAPTURE_CODE = 1; +var CAPTURE_KEY = 2; +var CAPTURE_SHIFTKEY = 3; +var CAPTURE_CONTROLKEY = 4; +var CAPTURE_ALTKEY = 5; +var CAPTURE_METAKEY = 6; + +// An array of KeyInfo for each key to be tested. +var _keyTable = []; + +// KeyInfo fields. +var KEYINFO_CODE = 0; // |code| for this key +var KEYINFO_ROW = 1; // Keyboard row +var KEYINFO_TYPE = 2; // Key type (see below) +var KEYINFO_WIDTH = 3; // Width of key: 0=normal +var KEYINFO_KEYCAP = 4; // Keycap string to display +var KEYINFO_KEY = 5; // Unmodified key value +var KEYINFO_KEY_SHIFT = 6; // Shifted key value + +var KEYTYPE_NORMAL = 0; +var KEYTYPE_DISABLED = 1; // Key cannot be tested: e.g., CapsLock +var KEYTYPE_END = 2; // Used to mark end of KeyTable +var KEYTYPE_MODIFIER = 3; // Modifer key + +function clearChildren(e) { + while (e.firstChild !== null) { + e.removeChild(e.firstChild); + } +} + +function setText(e, text) { + clearChildren(e); + e.appendChild(document.createTextNode(text)); +} + +function setUserAgent() { + var userAgent = navigator.userAgent; + uaDiv = document.getElementById("useragent"); + setText(uaDiv, userAgent); +} + +function addEventListener(obj, etype, handler) { + if (obj.addEventListener) { + obj.addEventListener(etype, handler, false); + } else if (obj.attachEvent) { + obj.attachEvent("on"+etype, handler); + } else { + obj["on"+etype] = handler; + } +} + +function addClass(obj, className) { + obj.classList.add(className); +} + +function removeClass(obj, className) { + obj.classList.remove(className); +} + +function addInnerText(obj, text) { + obj.appendChild(document.createTextNode(text)); +} + +function calcLocation(loc) { + if (loc == 1) return "LEFT"; + if (loc == 2) return "RIGHT"; + if (loc == 3) return "NUMPAD"; + return loc; +} + +function isModifierKey(e) { + // Shift, Control, Alt + if (e.keyCode >= 16 && e.keyCode <= 18) { + return true; + } + // Windows, Command or Meta key. + if (e.keyCode == 224 // Right/Left: Gecko + || e.keyCode == 91 // Left: WebKit/Blink + || e.keyCode == 93 // Right: WebKit/Blink + ) { + return true; + } + return false; +} + +function init(title, keytable) { + _keyTable = keytable; + + createBody(title, keytable); + + setUserAgent(); + + var input = document.getElementById("input"); + input.disabled = true; + addEventListener(input, "keydown", onKeyDown); + addEventListener(input, "keyup", onKeyUp); + //addEventListener(input, "beforeInput", onBeforeInput); + //addEventListener(input, "input", onInput); +} + +function onKeyDown(e) { + // Ignore modifier keys when checking modifier combinations. + if (_modifierMode != "None" && isModifierKey(e)) { + return; + } + + _keydownInfo = [e.keyCode, e.code, e.key, e.shiftKey, e.ctrlKey, e.altKey, e.metaKey]; + if (e.keyCode == 9 || e.code == "Tab") { + e.preventDefault(); + } +} + +function onKeyUp(e) { + // Ignore modifier keys when checking modifier combinations. + if (_modifierMode != "None" && isModifierKey(e)) { + return; + } + + _keyupInfo = [e.keyCode, e.code, e.key, e.shiftKey, e.ctrlKey, e.altKey, e.metaKey]; + + if (_testing) { + verifyKey(); + nextKey(); + } +} + +function onBeforeInput(e) { +} + +function onInput(e) { +} + +function addError(elem, str) { + var p = document.createElement('p'); + p.classList.add("error2"); + p.textContent = str; + elem.appendChild(p); +} + +function addErrorIncorrect(elem, eventName, attrName, keyEventInfo, attr, expected) { + addError(elem, "Incorrect " + eventName + + " |" + attrName + "| = " + keyEventInfo[attr] + + " - Expected " + expected); +} + +function verifyKeyEventFields(eventName, keyEventInfo, code, key, error) { + var verifyCode = document.getElementById("opt_attr_code").checked; + var verifyKey = document.getElementById("opt_attr_key").checked; + var verifyModifiers = document.getElementById("opt_attr_modifiers").checked; + var good = true; + + if (!verifyCode && !verifyKey && !verifyModifiers) { + good = false; + addError(error, "Invalid test: At least one attribute must be selected for testing."); + } + if (verifyCode && keyEventInfo[CAPTURE_CODE] != code) { + good = false; + addErrorIncorrect(error, eventName, "code", keyEventInfo, CAPTURE_CODE, code); + } + if (verifyKey && keyEventInfo[CAPTURE_KEY] != key) { + good = false; + addErrorIncorrect(error, eventName, "key", keyEventInfo, CAPTURE_KEY, key); + } + if (verifyModifiers) { + if (keyEventInfo[CAPTURE_SHIFTKEY] != (_modifierMode == "Shift")) { + good = false; + addErrorIncorrect(error, eventName, "shiftKey", keyEventInfo, CAPTURE_SHIFTKEY, false); + } + if (keyEventInfo[CAPTURE_CONTROLKEY]) { + good = false; + addErrorIncorrect(error, eventName, "controlKey", keyEventInfo, CAPTURE_CONTROLKEY, false); + } + if (keyEventInfo[CAPTURE_ALTKEY]) { + good = false; + addErrorIncorrect(error, eventName, "altKey", keyEventInfo, CAPTURE_ALTKEY, false); + } + if (keyEventInfo[CAPTURE_METAKEY]) { + good = false; + addErrorIncorrect(error, eventName, "metaKey", keyEventInfo, CAPTURE_METAKEY, false); + } + } + + return good; +} + +function verifyKey() { + _keysTotal++; + + var keyInfo = _keyTable[_currKey]; + var code = keyInfo[KEYINFO_CODE]; + var key = keyInfo[KEYINFO_KEY]; + var keyShift = keyInfo[KEYINFO_KEY_SHIFT]; + + var keyCheck = key; + if (_modifierMode == "Shift") { + keyCheck = keyShift; + } + + var verifyKeydown = document.getElementById("opt_event_keydown").checked; + var verifyKeyup = document.getElementById("opt_event_keyup").checked; + + var error = document.createElement('div'); + error.classList.add("error"); + var good = true; + + if (verifyKeydown) { + good = verifyKeyEventFields("keydown", _keydownInfo, code, keyCheck, error); + } + if (verifyKeyup) { + good = verifyKeyEventFields("keyup", _keyupInfo, code, keyCheck, error); + } + + if (!verifyKeydown && !verifyKeyup) { + good = false; + addError(error, "Invalid test: At least one event must be selected for testing."); + } + + // Allow Escape key to skip the current key. + var skipped = false; + if (_keydownInfo[CAPTURE_KEYCODE] == 27 || _keydownInfo[CAPTURE_CODE] == "Escape") { + good = true; + skipped = true; + } + + if (!good) { + var p = document.createElement('p'); + p.classList.add("error1"); + p.textContent = "Error : " + code; + error.insertBefore(p, error.firstChild); + } + + removeNextKeyHilight(); + if (skipped) { + _keysSkipped++; + document.getElementById(code).classList.add("skippedKey") + } else if (good) { + _keysGood++; + document.getElementById(code).classList.add("goodKey") + } else { + _keysBad++; + document.getElementById(code).classList.add("badKey") + } + updateTestSummary(good ? null : error); +} + +function updateTestSummary(error) { + document.getElementById("keys-total").textContent = _keysTotal; + document.getElementById("keys-good").textContent = _keysGood; + document.getElementById("keys-bad").textContent = _keysBad; + document.getElementById("keys-skipped").textContent = _keysSkipped; + + if (error) { + var errors = document.getElementById("errors"); + errors.insertBefore(error, errors.firstChild); + } +} + +function resetTest() { + _keysTotal = 0; + _keysGood = 0; + _keysBad = 0; + + _currKey = -1; + nextKey(); + + updateTestSummary(); + + // Remove previous test results. + clearChildren(document.getElementById("errors")); + + // Remove highlighting from keys. + for (var i = 0; i < _keyTable.length; i++) { + var code = _keyTable[i][KEYINFO_CODE]; + var type = _keyTable[i][KEYINFO_TYPE]; + if (type != KEYTYPE_END) { + var key = document.getElementById(code); + key.classList.remove("goodKey"); + key.classList.remove("badKey"); + key.classList.remove("skippedKey"); + } + } +} + +function startTest() { + if (_testing) { + // Cancel the currently running test. + endTest(); + return; + } + + resetTest(); + _testing = true; + document.getElementById("start").value = "Stop Test" + + var input = document.getElementById("input"); + input.value = ""; + input.disabled = false; + input.focus(); + + // Show test instructions and info. + document.getElementById("test-info").style.display = 'block'; + document.getElementById("instructions").style.display = 'block'; + document.getElementById("test-done").style.display = 'none'; +} + +function endTest() { + _testing = false; + removeNextKeyHilight(); + document.getElementById("start").value = "Restart Test" + document.getElementById("input").disabled = true; + document.getElementById("instructions").style.display = 'none'; + document.getElementById("test-done").style.display = 'block'; +} + +function removeNextKeyHilight() { + var curr = document.getElementById(_keyTable[_currKey][KEYINFO_CODE]); + if (curr) { + removeClass(curr, "nextKey") + } +} + +function addNextKeyHilight() { + var curr = document.getElementById(_keyTable[_currKey][KEYINFO_CODE]); + if (curr) { + addClass(curr, "nextKey") + } +} + +function nextKey() { + var keyInfo; + var keepLooking = true; + do { + _currKey++; + keyInfo = _keyTable[_currKey]; + var type = keyInfo[KEYINFO_TYPE]; + + // Skip over disabled keys. + keepLooking = (type == KEYTYPE_DISABLED); + + // Skip over modifier keys if we're testing modifier combinations. + if (_modifierMode != "None" && type == KEYTYPE_MODIFIER) { + keepLooking = true; + } + + // Skip over keys in disabled rows. + if (type != KEYTYPE_END) { + var row = keyInfo[KEYINFO_ROW]; + var rowEnabled = document.getElementById("opt_row_" + row).checked; + keepLooking = keepLooking || !rowEnabled; + } + } while (keepLooking); + + if (keyInfo[KEYINFO_TYPE] == KEYTYPE_END) { + endTest(); + } else { + addNextKeyHilight(); + } +} + +function toggleOptions() { + var link = document.getElementById("optionstoggle"); + var options = document.getElementById("options"); + clearChildren(link); + if (options.style.display == "block") { + options.style.display = "none"; + addInnerText(link, "Show Options"); + } + else { + options.style.display = "block"; + addInnerText(link, "Hide Options"); + } +} + +function toggleHelp() { + var link = document.getElementById("helptoggle"); + var help = document.getElementById("help"); + clearChildren(link); + if (help.style.display == "block") { + help.style.display = "none"; + addInnerText(link, "Show Help"); + } + else { + help.style.display = "block"; + addInnerText(link, "Hide Help"); + } +} + +function createBody(title, keytable) { + var body = document.getElementsByTagName("body")[0]; + var p; + var span; + + var h1 = document.createElement('h1'); + h1.textContent = "Keyboard Event Manual Test - " + title; + body.appendChild(h1); + + // Display useragent. + p = document.createElement('p'); + p.textContent = "UserAgent: "; + var useragent = document.createElement('span'); + useragent.id = "useragent"; + p.appendChild(useragent); + body.appendChild(p); + + // Display input textedit. + p = document.createElement('p'); + p.textContent = "Test Input: "; + var input1 = document.createElement('input'); + input1.id = "input"; + input1.type = "text"; + input1.size = 80; + p.appendChild(input1); + p.appendChild(document.createTextNode(" ")); + var input2 = document.createElement('input'); + input2.id = "start"; + input2.type = "button"; + input2.onclick = function() { startTest(); return false; } + input2.value = "Start Test"; + p.appendChild(input2); + p.appendChild(document.createTextNode(" ")); + var optionsToggle = document.createElement('a'); + optionsToggle.id = "optionstoggle"; + optionsToggle.href = "javascript:toggleOptions()"; + optionsToggle.textContent = "Show Options"; + p.appendChild(optionsToggle); + p.appendChild(document.createTextNode(" ")); + var helpToggle = document.createElement('a'); + helpToggle.id = "helptoggle"; + helpToggle.href = "javascript:toggleHelp()"; + helpToggle.textContent = "Show Help"; + p.appendChild(helpToggle); + body.appendChild(p); + + createOptions(body); + + createHelp(body); + + createKeyboard(body, keytable); + + // Test info and summary. + var test_info = document.createElement('div'); + test_info.id = "test-info"; + test_info.style.display = "none"; + + var instructions = document.createElement('div'); + instructions.id = "instructions"; + p = document.createElement('p'); + p.textContent = "Press the highlighted key."; + instructions.appendChild(p); + test_info.appendChild(instructions); + + var test_done = document.createElement('div'); + test_done.id = "test-done"; + p = document.createElement('p'); + p.textContent = "Test complete!"; + test_done.appendChild(p); + test_info.appendChild(test_done); + + var summary = document.createElement('div'); + summary.id = "summary"; + p = document.createElement('p'); + summary.appendChild(document.createTextNode("Keys Tested: ")); + span = document.createElement('span'); + span.id = "keys-total"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Passed ")); + span = document.createElement('span'); + span.id = "keys-good"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Failed ")); + span = document.createElement('span'); + span.id = "keys-bad"; + span.textContent = 0; + summary.appendChild(span); + summary.appendChild(document.createTextNode("; Skipped ")); + span = document.createElement('span'); + span.id = "keys-skipped"; + span.textContent = 0; + summary.appendChild(span); + test_info.appendChild(summary); + + var errors = document.createElement('div'); + errors.id = "errors"; + test_info.appendChild(errors); + + body.appendChild(test_info); +} + +function addOptionTitle(cell, title) { + var span = document.createElement('span'); + span.classList.add("opttitle"); + span.textContent = title; + cell.appendChild(span); + cell.appendChild(document.createElement("br")); +} + +function addOptionCheckbox(cell, id, text) { + var label = document.createElement("label"); + + var input = document.createElement("input"); + input.type = "checkbox"; + input.id = id; + input.checked = true; + label.appendChild(input); + + label.appendChild(document.createTextNode(" " + text)); + cell.appendChild(label); + + cell.appendChild(document.createElement("br")); +} + +function addOptionRadio(cell, group, text, handler, checked) { + var label = document.createElement("label"); + + var input = document.createElement("input"); + input.type = "radio"; + input.name = group; + input.value = text; + input.onclick = handler; + input.checked = checked; + label.appendChild(input); + + label.appendChild(document.createTextNode(" " + text)); + cell.appendChild(label); + + cell.appendChild(document.createElement("br")); +} + +function handleModifierGroup() { + var radio = document.querySelector("input[name=opt_modifier]:checked"); + var oldMode = _modifierMode; + _modifierMode = radio.value; + + if (oldMode == "Shift") { + document.getElementById("ShiftLeft").classList.remove("activeModifierKey"); + document.getElementById("ShiftRight").classList.remove("activeModifierKey"); + } + + if (_modifierMode == "Shift") { + document.getElementById("ShiftLeft").classList.add("activeModifierKey"); + document.getElementById("ShiftRight").classList.add("activeModifierKey"); + } +} + +function createOptions(body) { + var options = document.createElement('div'); + options.id = "options"; + options.style.display = "none"; + + var table = document.createElement('table'); + table.classList.add("opttable"); + var row = document.createElement('tr'); + var cell; + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Keyboard Rows"); + addOptionCheckbox(cell, "opt_row_0", "Row E (top)"); + addOptionCheckbox(cell, "opt_row_1", "Row D"); + addOptionCheckbox(cell, "opt_row_2", "Row C"); + addOptionCheckbox(cell, "opt_row_3", "Row B"); + addOptionCheckbox(cell, "opt_row_4", "Row A (bottom)"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Events"); + addOptionCheckbox(cell, "opt_event_keydown", "keydown"); + addOptionCheckbox(cell, "opt_event_keyup", "keyup"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Attributes"); + addOptionCheckbox(cell, "opt_attr_code", "code"); + addOptionCheckbox(cell, "opt_attr_key", "key"); + addOptionCheckbox(cell, "opt_attr_modifiers", "modifiers"); + row.appendChild(cell); + + cell = document.createElement('td'); + cell.classList.add("optcell"); + addOptionTitle(cell, "Modifiers"); + addOptionRadio(cell, "opt_modifier", "None", handleModifierGroup, true); + addOptionRadio(cell, "opt_modifier", "Shift", handleModifierGroup, false); + row.appendChild(cell); + + table.appendChild(row); + options.appendChild(table); + + body.appendChild(options); +} + +function addHelpText(div, text) { + var p = document.createElement('p'); + p.classList.add("help"); + p.textContent = text; + div.appendChild(p); +} + +function createHelp(body) { + var help = document.createElement('div'); + help.id = "help"; + help.style.display = "none"; + + addHelpText(help, "Click on the \"Start Test\" button to begin testing."); + addHelpText(help, "Press the hilighted key to test it."); + addHelpText(help, "Clicking anywhere outside the \"Test Input\" editbox will pause testing. To resume, click back inside the editbox."); + addHelpText(help, "To skip a key while testing, press Escape."); + addHelpText(help, "When testing with modifier keys, the modifier must be pressed before the keydown and released after the keyup of the key being tested."); + + body.appendChild(help); +} + +function createKeyboard(body, keytable) { + var keyboard = document.createElement('div'); + keyboard.classList.add("keyboard"); + + var currRow = 0; + var row = document.createElement('div'); + row.classList.add("key-row"); + + for (var i = 0; i < keytable.length; i++) { + var code = keytable[i][KEYINFO_CODE]; + var rowId = keytable[i][KEYINFO_ROW]; + var type = keytable[i][KEYINFO_TYPE]; + var width = keytable[i][KEYINFO_WIDTH]; + var keyCap = keytable[i][KEYINFO_KEYCAP]; + + if (type == KEYTYPE_END) { + continue; + } + + if (rowId != currRow) { + keyboard.appendChild(row); + row = document.createElement('div'); + row.classList.add("key-row"); + currRow = rowId; + } + + var key = document.createElement('div'); + key.id = code; + key.classList.add("key"); + if (width != 0) { + key.classList.add("wide" + width); + } + key.textContent = keyCap; + + row.appendChild(key); + } + + keyboard.appendChild(row); + body.appendChild(keyboard); +} diff --git a/tests/wpt/web-platform-tests/url/a-element.html b/tests/wpt/web-platform-tests/url/a-element.html index a35c3371c39..6e81b0b001f 100644 --- a/tests/wpt/web-platform-tests/url/a-element.html +++ b/tests/wpt/web-platform-tests/url/a-element.html @@ -9,11 +9,11 @@ var setup = async_test("Loading data…") setup.step(function() { var request = new XMLHttpRequest() - request.open("GET", "urltestdata.txt") + request.open("GET", "urltestdata.json") request.send() - request.responseType = "text" + request.responseType = "json" request.onload = setup.step_func(function() { - runURLTests(request.response); + runURLTests(request.response) setup.done() }) }) @@ -30,21 +30,32 @@ function bURL(url, base) { return a } -function runURLTests(raw) { - var urltests = URLTestParser(raw) +function runURLTests(urltests) { for(var i = 0, l = urltests.length; i < l; i++) { var expected = urltests[i] + if (typeof expected === "string") continue // skip comments + test(function() { var url = bURL(expected.input, expected.base) - if(expected.protocol === ':' && url.protocol !== ':') - assert_unreached('Expected URL to fail parsing') - assert_equals(url.protocol, expected.protocol, "scheme") - assert_equals(url.hostname, expected.hostname, "host") + if(expected.failure) { + if(url.protocol !== ':') { + assert_unreached("Expected URL to fail parsing") + } + assert_equals(url.href, expected.input, "failure should set href to input") + return + } + + assert_equals(url.href, expected.href, "href") + assert_equals(url.origin, expected.origin, "origin") + assert_equals(url.protocol, expected.protocol, "protocol") + assert_equals(url.username, expected.username, "username") + assert_equals(url.password, expected.password, "password") + assert_equals(url.host, expected.host, "host") + assert_equals(url.hostname, expected.hostname, "hostname") assert_equals(url.port, expected.port, "port") - assert_equals(url.pathname, expected.path, "path") + assert_equals(url.pathname, expected.pathname, "pathname") assert_equals(url.search, expected.search, "search") assert_equals(url.hash, expected.hash, "hash") - assert_equals(url.href, expected.href, "href") }, "Parsing: <" + expected.input + "> against <" + expected.base + ">") } } diff --git a/tests/wpt/web-platform-tests/url/url-constructor.html b/tests/wpt/web-platform-tests/url/url-constructor.html index ad2c241fe12..a7503310397 100644 --- a/tests/wpt/web-platform-tests/url/url-constructor.html +++ b/tests/wpt/web-platform-tests/url/url-constructor.html @@ -8,11 +8,11 @@ var setup = async_test("Loading data…") setup.step(function() { var request = new XMLHttpRequest() - request.open("GET", "urltestdata.txt") + request.open("GET", "urltestdata.json") request.send() - request.responseType = "text" + request.responseType = "json" request.onload = setup.step_func(function() { - runURLTests(request.response); + runURLTests(request.response) setup.done() }) }) @@ -21,12 +21,13 @@ function bURL(url, base) { return new URL(url, base || "about:blank"); } -function runURLTests(raw) { - var urltests = URLTestParser(raw) +function runURLTests(urltests) { for(var i = 0, l = urltests.length; i < l; i++) { var expected = urltests[i] + if (typeof expected === "string") continue // skip comments + test(function() { - if (expected.protocol === ':') { + if (expected.failure) { assert_throws(new TypeError(), function() { bURL(expected.input, expected.base) }); @@ -34,13 +35,17 @@ function runURLTests(raw) { } var url = bURL(expected.input, expected.base) - assert_equals(url.protocol, expected.protocol, "scheme") - assert_equals(url.hostname, expected.hostname, "host") + assert_equals(url.href, expected.href, "href") + assert_equals(url.origin, expected.origin, "origin") + assert_equals(url.protocol, expected.protocol, "protocol") + assert_equals(url.username, expected.username, "username") + assert_equals(url.password, expected.password, "password") + assert_equals(url.host, expected.host, "host") + assert_equals(url.hostname, expected.hostname, "hostname") assert_equals(url.port, expected.port, "port") - assert_equals(url.pathname, expected.path, "path") + assert_equals(url.pathname, expected.pathname, "pathname") assert_equals(url.search, expected.search, "search") assert_equals(url.hash, expected.hash, "hash") - assert_equals(url.href, expected.href, "href") }, "Parsing: <" + expected.input + "> against <" + expected.base + ">") } } diff --git a/tests/wpt/web-platform-tests/url/urltestdata.json b/tests/wpt/web-platform-tests/url/urltestdata.json new file mode 100644 index 00000000000..1f787d795ef --- /dev/null +++ b/tests/wpt/web-platform-tests/url/urltestdata.json @@ -0,0 +1,4236 @@ +[ + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js", + { + "input": "http://example\t.\norg", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@foo:21/bar;par?b#c", + "base": "http://example.org/foo/bar", + "href": "http://user:pass@foo:21/bar;par?b#c", + "origin": "http://foo:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "foo:21", + "hostname": "foo", + "port": "21", + "pathname": "/bar;par", + "search": "?b", + "hash": "#c" + }, + { + "input": "http:foo.com", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "\t :foo.com \n", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com", + "search": "", + "hash": "" + }, + { + "input": " foo.com ", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/foo.com", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/foo.com", + "search": "", + "hash": "" + }, + { + "input": "a:\t foo.com", + "base": "http://example.org/foo/bar", + "href": "a: foo.com", + "origin": "null", + "protocol": "a:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": " foo.com", + "search": "", + "hash": "" + }, + { + "input": "http://f:21/ b ? d # e ", + "base": "http://example.org/foo/bar", + "href": "http://f:21/%20b%20?%20d%20# e", + "origin": "http://f:21", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:21", + "hostname": "f", + "port": "21", + "pathname": "/%20b%20", + "search": "?%20d%20", + "hash": "# e" + }, + { + "input": "http://f:/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:0/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000/c", + "base": "http://example.org/foo/bar", + "href": "http://f:0/c", + "origin": "http://f:0", + "protocol": "http:", + "username": "", + "password": "", + "host": "f:0", + "hostname": "f", + "port": "0", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:00000000000000000000080/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:b/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: /c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:\n/c", + "base": "http://example.org/foo/bar", + "href": "http://f/c", + "origin": "http://f", + "protocol": "http:", + "username": "", + "password": "", + "host": "f", + "hostname": "f", + "port": "", + "pathname": "/c", + "search": "", + "hash": "" + }, + { + "input": "http://f:fifty-two/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f:999999/c", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://f: 21 / b ? d # e ", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": " \t", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": ":foo.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:foo.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:foo.com/", + "search": "", + "hash": "" + }, + { + "input": ":", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": ":a", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:a", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:a", + "search": "", + "hash": "" + }, + { + "input": ":/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:/", + "search": "", + "hash": "" + }, + { + "input": ":#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:", + "search": "", + "hash": "" + }, + { + "input": "#", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "#/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#/" + }, + { + "input": "#\\", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#\\", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#\\" + }, + { + "input": "#;?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#;?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#;?" + }, + { + "input": "?", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar?", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": ":23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:23", + "search": "", + "hash": "" + }, + { + "input": "/:23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/:23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/:23", + "search": "", + "hash": "" + }, + { + "input": "::", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::", + "search": "", + "hash": "" + }, + { + "input": "::23", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/::23", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/::23", + "search": "", + "hash": "" + }, + { + "input": "foo://", + "base": "http://example.org/foo/bar", + "href": "foo:///", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@c:29/d", + "base": "http://example.org/foo/bar", + "href": "http://a:b@c:29/d", + "origin": "http://c:29", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "c:29", + "hostname": "c", + "port": "29", + "pathname": "/d", + "search": "", + "hash": "" + }, + { + "input": "http::@c:29", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/:@c:29", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/:@c:29", + "search": "", + "hash": "" + }, + { + "input": "http://&a:foo(b]c@d:2/", + "base": "http://example.org/foo/bar", + "href": "http://&a:foo(b%5Dc@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "&a", + "password": "foo(b%5Dc", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://::@c@d:2", + "base": "http://example.org/foo/bar", + "href": "http://:%3A%40c@d:2/", + "origin": "http://d:2", + "protocol": "http:", + "username": "", + "password": "%3A%40c", + "host": "d:2", + "hostname": "d", + "port": "2", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com:b@d/", + "base": "http://example.org/foo/bar", + "href": "http://foo.com:b@d/", + "origin": "http://d", + "protocol": "http:", + "username": "foo.com", + "password": "b", + "host": "d", + "hostname": "d", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo.com/\\@", + "base": "http://example.org/foo/bar", + "href": "http://foo.com//@", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "//@", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://foo.com/", + "origin": "http://foo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo.com", + "hostname": "foo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\a\\b:c\\d@foo.com\\", + "base": "http://example.org/foo/bar", + "href": "http://a/b:c/d@foo.com/", + "origin": "http://a", + "protocol": "http:", + "username": "", + "password": "", + "host": "a", + "hostname": "a", + "port": "", + "pathname": "/b:c/d@foo.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:/", + "base": "http://example.org/foo/bar", + "href": "foo:/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "foo:/bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo:/bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo://///////", + "base": "http://example.org/foo/bar", + "href": "foo://///////", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////", + "search": "", + "hash": "" + }, + { + "input": "foo://///////bar.com/", + "base": "http://example.org/foo/bar", + "href": "foo://///////bar.com/", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "///////bar.com/", + "search": "", + "hash": "" + }, + { + "input": "foo:////://///", + "base": "http://example.org/foo/bar", + "href": "foo:////://///", + "origin": "null", + "protocol": "foo:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "//://///", + "search": "", + "hash": "" + }, + { + "input": "c:/foo", + "base": "http://example.org/foo/bar", + "href": "c:/foo", + "origin": "null", + "protocol": "c:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "//foo/bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + { + "input": "http://foo/path;a??e#f#g", + "base": "http://example.org/foo/bar", + "href": "http://foo/path;a??e#f#g", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/path;a", + "search": "??e", + "hash": "#f#g" + }, + { + "input": "http://foo/abcd?efgh?ijkl", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd?efgh?ijkl", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "?efgh?ijkl", + "hash": "" + }, + { + "input": "http://foo/abcd#foo?bar", + "base": "http://example.org/foo/bar", + "href": "http://foo/abcd#foo?bar", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/abcd", + "search": "", + "hash": "#foo?bar" + }, + { + "input": "[61:24:74]:98", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:24:74]:98", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:24:74]:98", + "search": "", + "hash": "" + }, + { + "input": "http:[61:27]/:foo", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/[61:27]/:foo", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/[61:27]/:foo", + "search": "", + "hash": "" + }, + { + "input": "http://[1::2]:3:4", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://2001::1]:80", + "base": "http://example.org/foo/bar", + "failure": true + }, + { + "input": "http://[2001::1]", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://[2001::1]:80", + "base": "http://example.org/foo/bar", + "href": "http://[2001::1]/", + "origin": "http://[2001::1]", + "protocol": "http:", + "username": "", + "password": "", + "host": "[2001::1]", + "hostname": "[2001::1]", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": "http://example.org/foo/bar", + "href": "file:///example.com/", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": "http://example.org/foo/bar", + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/example.com/", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": "http://example.org/foo/bar", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": "http://example.org/foo/bar", + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": "http://example.org/foo/bar", + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": "http://example.org/foo/bar", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": "http://example.org/foo/bar", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": "http://example.org/foo/bar", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": "http://example.org/foo/bar", + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": "http://example.org/foo/bar", + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": "http://example.org/foo/bar", + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "/a/b/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/b/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/b/c", + "search": "", + "hash": "" + }, + { + "input": "/a/ /c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%20/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%20/c", + "search": "", + "hash": "" + }, + { + "input": "/a%2fc", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a%2fc", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a%2fc", + "search": "", + "hash": "" + }, + { + "input": "/a/%2f/c", + "base": "http://example.org/foo/bar", + "href": "http://example.org/a/%2f/c", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/a/%2f/c", + "search": "", + "hash": "" + }, + { + "input": "#β", + "base": "http://example.org/foo/bar", + "href": "http://example.org/foo/bar#β", + "origin": "http://example.org", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/foo/bar", + "search": "", + "hash": "#β" + }, + { + "input": "data:text/html,test#test", + "base": "http://example.org/foo/bar", + "href": "data:text/html,test#test", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "text/html,test", + "search": "", + "hash": "#test" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html", + { + "input": "file:c:\\foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:/foo/bar.html", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:/foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": " File:c|////foo\\bar.html", + "base": "file:///tmp/mock/path", + "href": "file:///c:////foo/bar.html", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/c:////foo/bar.html", + "search": "", + "hash": "" + }, + { + "input": "C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "/C|\\foo\\bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//C|/foo/bar", + "base": "file:///tmp/mock/path", + "href": "file:///C:/foo/bar", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/C:/foo/bar", + "search": "", + "hash": "" + }, + { + "input": "//server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "\\\\server\\file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "/\\server/file", + "base": "file:///tmp/mock/path", + "href": "file://server/file", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "server", + "hostname": "server", + "port": "", + "pathname": "/file", + "search": "", + "hash": "" + }, + { + "input": "file:///foo/bar.txt", + "base": "file:///tmp/mock/path", + "href": "file:///foo/bar.txt", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/foo/bar.txt", + "search": "", + "hash": "" + }, + { + "input": "file:///home/me", + "base": "file:///tmp/mock/path", + "href": "file:///home/me", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/home/me", + "search": "", + "hash": "" + }, + { + "input": "//", + "base": "file:///tmp/mock/path", + "href": "file:///", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///", + "base": "file:///tmp/mock/path", + "href": "file:///", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "///test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "file://test", + "base": "file:///tmp/mock/path", + "href": "file://test/", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "test", + "hostname": "test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost", + "base": "file:///tmp/mock/path", + "href": "file:///", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/", + "base": "file:///tmp/mock/path", + "href": "file:///", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file://localhost/test", + "base": "file:///tmp/mock/path", + "href": "file:///test", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/test", + "search": "", + "hash": "" + }, + { + "input": "test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + { + "input": "file:test", + "base": "file:///tmp/mock/path", + "href": "file:///tmp/mock/test", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/tmp/mock/test", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js", + { + "input": "http://example.com/././foo", + "base": "about:blank", + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/./.foo", + "base": "about:blank", + "href": "http://example.com/.foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/.foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/.", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/./", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/..", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/..bar", + "base": "about:blank", + "href": "http://example.com/foo/..bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/..bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton", + "base": "about:blank", + "href": "http://example.com/foo/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar/../ton/../../a", + "base": "about:blank", + "href": "http://example.com/a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../..", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/../../../ton", + "base": "about:blank", + "href": "http://example.com/ton", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/ton", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e%2", + "base": "about:blank", + "href": "http://example.com/foo/%2e%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/%2e%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar", + "base": "about:blank", + "href": "http://example.com/%2e.bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%2e.bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com////../..", + "base": "about:blank", + "href": "http://example.com//", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//../..", + "base": "about:blank", + "href": "http://example.com/foo/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo/bar//..", + "base": "about:blank", + "href": "http://example.com/foo/bar/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo/bar/", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo", + "base": "about:blank", + "href": "http://example.com/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%20foo", + "base": "about:blank", + "href": "http://example.com/%20foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%20foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%", + "base": "about:blank", + "href": "http://example.com/foo%", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2", + "base": "about:blank", + "href": "http://example.com/foo%2", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2zbar", + "base": "about:blank", + "href": "http://example.com/foo%2zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%2©zbar", + "base": "about:blank", + "href": "http://example.com/foo%2%C3%82%C2%A9zbar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%2%C3%82%C2%A9zbar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%41%7a", + "base": "about:blank", + "href": "http://example.com/foo%41%7a", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%41%7a", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\t‘%91", + "base": "about:blank", + "href": "http://example.com/foo%C2%91%91", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%C2%91%91", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo%00%51", + "base": "about:blank", + "href": "http://example.com/foo%00%51", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foo%00%51", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/(%28:%3A%29)", + "base": "about:blank", + "href": "http://example.com/(%28:%3A%29)", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/(%28:%3A%29)", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%3A%3a%3C%3c", + "base": "about:blank", + "href": "http://example.com/%3A%3a%3C%3c", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%3A%3a%3C%3c", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/foo\tbar", + "base": "about:blank", + "href": "http://example.com/foobar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/foobar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com\\\\foo\\\\bar", + "base": "about:blank", + "href": "http://example.com//foo//bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "//foo//bar", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "base": "about:blank", + "href": "http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%7Ffp3%3Eju%3Dduvgw%3Dd", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/@asdf%40", + "base": "about:blank", + "href": "http://example.com/@asdf%40", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/@asdf%40", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/你好你好", + "base": "about:blank", + "href": "http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/‥/foo", + "base": "about:blank", + "href": "http://example.com/%E2%80%A5/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%A5/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com//foo", + "base": "about:blank", + "href": "http://example.com/%EF%BB%BF/foo", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%EF%BB%BF/foo", + "search": "", + "hash": "" + }, + { + "input": "http://example.com/‮/foo/‭/bar", + "base": "about:blank", + "href": "http://example.com/%E2%80%AE/foo/%E2%80%AD/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/%E2%80%AE/foo/%E2%80%AD/bar", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js", + { + "input": "http://www.google.com/foo?bar=baz#", + "base": "about:blank", + "href": "http://www.google.com/foo?bar=baz#", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "" + }, + { + "input": "http://www.google.com/foo?bar=baz# »", + "base": "about:blank", + "href": "http://www.google.com/foo?bar=baz# »", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "?bar=baz", + "hash": "# »" + }, + { + "input": "data:test# »", + "base": "about:blank", + "href": "data:test# »", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "# »" + }, + { + "input": "http://[www.google.com]/", + "base": "about:blank", + "failure": true + }, + { + "input": "http://www.google.com", + "base": "about:blank", + "href": "http://www.google.com/", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.0x00A80001", + "base": "about:blank", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo%2Ehtml", + "base": "about:blank", + "href": "http://www/foo%2Ehtml", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo%2Ehtml", + "search": "", + "hash": "" + }, + { + "input": "http://www/foo/%2E/html", + "base": "about:blank", + "href": "http://www/foo/html", + "origin": "http://www", + "protocol": "http:", + "username": "", + "password": "", + "host": "www", + "hostname": "www", + "port": "", + "pathname": "/foo/html", + "search": "", + "hash": "" + }, + { + "input": "http://user:pass@/", + "base": "about:blank", + "failure": true + }, + { + "input": "http://%25DOMAIN:foobar@foodomain.com/", + "base": "about:blank", + "href": "http://%25DOMAIN:foobar@foodomain.com/", + "origin": "http://foodomain.com", + "protocol": "http:", + "username": "%25DOMAIN", + "password": "foobar", + "host": "foodomain.com", + "hostname": "foodomain.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:\\\\www.google.com\\foo", + "base": "about:blank", + "href": "http://www.google.com/foo", + "origin": "http://www.google.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.google.com", + "hostname": "www.google.com", + "port": "", + "pathname": "/foo", + "search": "", + "hash": "" + }, + { + "input": "http://foo:80/", + "base": "about:blank", + "href": "http://foo/", + "origin": "http://foo", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:81/", + "base": "about:blank", + "href": "http://foo:81/", + "origin": "http://foo:81", + "protocol": "http:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "httpa://foo:80/", + "base": "about:blank", + "href": "httpa://foo:80/", + "origin": "null", + "protocol": "httpa:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://foo:-80/", + "base": "about:blank", + "failure": true + }, + { + "input": "https://foo:443/", + "base": "about:blank", + "href": "https://foo/", + "origin": "https://foo", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://foo:80/", + "base": "about:blank", + "href": "https://foo:80/", + "origin": "https://foo:80", + "protocol": "https:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:21/", + "base": "about:blank", + "href": "ftp://foo/", + "origin": "ftp://foo", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp://foo:80/", + "base": "about:blank", + "href": "ftp://foo:80/", + "origin": "ftp://foo:80", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:70/", + "base": "about:blank", + "href": "gopher://foo/", + "origin": "gopher://foo", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "gopher://foo:443/", + "base": "about:blank", + "href": "gopher://foo:443/", + "origin": "gopher://foo:443", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:80/", + "base": "about:blank", + "href": "ws://foo/", + "origin": "ws://foo", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:81/", + "base": "about:blank", + "href": "ws://foo:81/", + "origin": "ws://foo:81", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:443/", + "base": "about:blank", + "href": "ws://foo:443/", + "origin": "ws://foo:443", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:443", + "hostname": "foo", + "port": "443", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws://foo:815/", + "base": "about:blank", + "href": "ws://foo:815/", + "origin": "ws://foo:815", + "protocol": "ws:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:80/", + "base": "about:blank", + "href": "wss://foo:80/", + "origin": "wss://foo:80", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:80", + "hostname": "foo", + "port": "80", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:81/", + "base": "about:blank", + "href": "wss://foo:81/", + "origin": "wss://foo:81", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:81", + "hostname": "foo", + "port": "81", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:443/", + "base": "about:blank", + "href": "wss://foo/", + "origin": "wss://foo", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo", + "hostname": "foo", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss://foo:815/", + "base": "about:blank", + "href": "wss://foo:815/", + "origin": "wss://foo:815", + "protocol": "wss:", + "username": "", + "password": "", + "host": "foo:815", + "hostname": "foo", + "port": "815", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/example.com/", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:/example.com/", + "base": "about:blank", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:/example.com/", + "base": "about:blank", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:/example.com/", + "base": "about:blank", + "href": "madeupscheme:/example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "file:/example.com/", + "base": "about:blank", + "href": "file:///example.com/", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:/example.com/", + "base": "about:blank", + "href": "ftps:/example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:/example.com/", + "base": "about:blank", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:/example.com/", + "base": "about:blank", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:/example.com/", + "base": "about:blank", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/example.com/", + "base": "about:blank", + "href": "data:/example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/example.com/", + "base": "about:blank", + "href": "javascript:/example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/example.com/", + "base": "about:blank", + "href": "mailto:/example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/example.com/", + "search": "", + "hash": "" + }, + { + "input": "http:example.com/", + "base": "about:blank", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ftp:example.com/", + "base": "about:blank", + "href": "ftp://example.com/", + "origin": "ftp://example.com", + "protocol": "ftp:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https:example.com/", + "base": "about:blank", + "href": "https://example.com/", + "origin": "https://example.com", + "protocol": "https:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "madeupscheme:example.com/", + "base": "about:blank", + "href": "madeupscheme:example.com/", + "origin": "null", + "protocol": "madeupscheme:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "ftps:example.com/", + "base": "about:blank", + "href": "ftps:example.com/", + "origin": "null", + "protocol": "ftps:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "gopher:example.com/", + "base": "about:blank", + "href": "gopher://example.com/", + "origin": "gopher://example.com", + "protocol": "gopher:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "ws:example.com/", + "base": "about:blank", + "href": "ws://example.com/", + "origin": "ws://example.com", + "protocol": "ws:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "wss:example.com/", + "base": "about:blank", + "href": "wss://example.com/", + "origin": "wss://example.com", + "protocol": "wss:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:example.com/", + "base": "about:blank", + "href": "data:example.com/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "javascript:example.com/", + "base": "about:blank", + "href": "javascript:example.com/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + { + "input": "mailto:example.com/", + "base": "about:blank", + "href": "mailto:example.com/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "example.com/", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html", + { + "input": "http:@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@www.example.com", + "base": "about:blank", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:b@www.example.com", + "base": "about:blank", + "href": "http://a:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://@pple.com", + "base": "about:blank", + "href": "http://pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http::b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://:b@www.example.com", + "base": "about:blank", + "href": "http://:b@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "b", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://user@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "https:@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://a:b@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http::@/www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:/a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://a:@www.example.com", + "base": "about:blank", + "href": "http://a:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "a", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://www.@pple.com", + "base": "about:blank", + "href": "http://www.@pple.com/", + "origin": "http://pple.com", + "protocol": "http:", + "username": "www.", + "password": "", + "host": "pple.com", + "hostname": "pple.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http:@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http:/@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://@:www.example.com", + "base": "about:blank", + "failure": true + }, + { + "input": "http://:@www.example.com", + "base": "about:blank", + "href": "http://:@www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# Others", + { + "input": "/", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": ".", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "..", + "base": "http://www.example.com/test", + "href": "http://www.example.com/", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "./test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../aaa/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/aaa/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/aaa/test.txt", + "search": "", + "hash": "" + }, + { + "input": "../../test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/test.txt", + "search": "", + "hash": "" + }, + { + "input": "中/test.txt", + "base": "http://www.example.com/test", + "href": "http://www.example.com/%E4%B8%AD/test.txt", + "origin": "http://www.example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example.com", + "hostname": "www.example.com", + "port": "", + "pathname": "/%E4%B8%AD/test.txt", + "search": "", + "hash": "" + }, + { + "input": "http://www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "//www.example2.com", + "base": "http://www.example.com/test", + "href": "http://www.example2.com/", + "origin": "http://www.example2.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.example2.com", + "hostname": "www.example2.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:...", + "base": "http://www.example.com/test", + "href": "file:///...", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/...", + "search": "", + "hash": "" + }, + { + "input": "file:..", + "base": "http://www.example.com/test", + "href": "file:///", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "file:a", + "base": "http://www.example.com/test", + "href": "file:///a", + "origin": "file://", + "protocol": "file:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/a", + "search": "", + "hash": "" + }, + "# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html", + "Basic canonicalization, uppercase should be converted to lowercase", + { + "input": "http://ExAmPlE.CoM", + "base": "http://other.com/", + "href": "http://example.com/", + "origin": "http://example.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://example example.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://Goo%20 goo%7C|.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[]", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://[:]", + "base": "http://other.com/", + "failure": true + }, + "U+3000 is mapped to U+0020 (space) which is disallowed", + { + "input": "http://GOO\u00a0\u3000goo.com", + "base": "http://other.com/", + "failure": true + }, + "Other types of space (no-break, zero-width, zero-width-no-break) are name-prepped away to nothing. U+200B, U+2060, and U+FEFF, are ignored", + { + "input": "http://GOO\u200b\u2060\ufeffgoo.com", + "base": "http://other.com/", + "href": "http://googoo.com/", + "origin": "http://googoo.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "googoo.com", + "hostname": "googoo.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Ideographic full stop (full-width period for Chinese, etc.) should be treated as a dot. U+3002 is mapped to U+002E (dot)", + { + "input": "http://www.foo。bar.com", + "base": "http://other.com/", + "href": "http://www.foo.bar.com/", + "origin": "http://www.foo.bar.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "www.foo.bar.com", + "hostname": "www.foo.bar.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid unicode characters should fail... U+FDD0 is disallowed; %ef%b7%90 is U+FDD0", + { + "input": "http://\ufdd0zyx.com", + "base": "http://other.com/", + "failure": true + }, + "This is the same as previous but escaped", + { + "input": "http://%ef%b7%90zyx.com", + "base": "http://other.com/", + "failure": true + }, + "Test name prepping, fullwidth input should be converted to ASCII and NOT IDN-ized. This is 'Go' in fullwidth UTF-8/UTF-16.", + { + "input": "http://ï¼§ï½.com", + "base": "http://other.com/", + "href": "http://go.com/", + "origin": "http://go.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "go.com", + "hostname": "go.com", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "URL spec forbids the following. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257", + { + "input": "http://%41.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%94%ef%bc%91.com", + "base": "http://other.com/", + "failure": true + }, + "...%00 in fullwidth should fail (also as escaped UTF-8 input)", + { + "input": "http://ï¼…ï¼ï¼.com", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://%ef%bc%85%ef%bc%90%ef%bc%90.com", + "base": "http://other.com/", + "failure": true + }, + "Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN", + { + "input": "http://你好你好", + "base": "http://other.com/", + "href": "http://xn--6qqa088eba/", + "origin": "http://你好你好", + "protocol": "http:", + "username": "", + "password": "", + "host": "xn--6qqa088eba", + "hostname": "xn--6qqa088eba", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Invalid escaped characters should fail and the percents should be escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191", + { + "input": "http://%zz%66%a.com", + "base": "http://other.com/", + "failure": true + }, + "If we get an invalid character that has been escaped.", + { + "input": "http://%25", + "base": "http://other.com/", + "failure": true + }, + { + "input": "http://hello%00", + "base": "http://other.com/", + "failure": true + }, + "Escaped numbers should be treated like IP addresses if they are.", + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://%30%78%63%30%2e%30%32%35%30.01%2e", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "http://192.168.0.257", + "base": "http://other.com/", + "failure": true + }, + "Invalid escaping should trigger the regular host error handling", + { + "input": "http://%3g%78%63%30%2e%30%32%35%30%2E.01", + "base": "http://other.com/", + "failure": true + }, + "Something that isn't exactly an IP should get treated as a host and spaces escaped", + { + "input": "http://192.168.0.1 hello", + "base": "http://other.com/", + "failure": true + }, + "Fullwidth and escaped UTF-8 fullwidth should still be treated as IP", + { + "input": "http://ï¼ï¼¸ï½ƒï¼ï¼Žï¼ï¼’5ï¼ï¼Žï¼ï¼‘", + "base": "http://other.com/", + "href": "http://192.168.0.1/", + "origin": "http://192.168.0.1", + "protocol": "http:", + "username": "", + "password": "", + "host": "192.168.0.1", + "hostname": "192.168.0.1", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "Broken IPv6", + { + "input": "http://[google.com]", + "base": "http://other.com/", + "failure": true + }, + "Misc Unicode", + { + "input": "http://foo:💩@example.com/bar", + "base": "http://other.com/", + "href": "http://foo:%F0%9F%92%A9@example.com/bar", + "origin": "http://example.com", + "protocol": "http:", + "username": "foo", + "password": "%F0%9F%92%A9", + "host": "example.com", + "hostname": "example.com", + "port": "", + "pathname": "/bar", + "search": "", + "hash": "" + }, + "# resolving a fragment against any scheme succeeds", + { + "input": "#", + "base": "test:test", + "href": "test:test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "", + "hash": "" + }, + { + "input": "#x", + "base": "mailto:x@x.com", + "href": "mailto:x@x.com#x", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "x@x.com", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "data:,", + "href": "data:,#x", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": ",", + "search": "", + "hash": "#x" + }, + { + "input": "#x", + "base": "about:blank", + "href": "about:blank#x", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "blank", + "search": "", + "hash": "#x" + }, + { + "input": "#", + "base": "test:test?test", + "href": "test:test?test#", + "origin": "null", + "protocol": "test:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "test", + "search": "?test", + "hash": "" + }, + "# multiple @ in authority state", + { + "input": "https://@test@test@example:800/", + "base": "http://doesnotmatter/", + "href": "https://%40test%40test@example:800/", + "origin": "https://example:800", + "protocol": "https:", + "username": "%40test%40test", + "password": "", + "host": "example:800", + "hostname": "example", + "port": "800", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "https://@@@example", + "base": "http://doesnotmatter/", + "href": "https://%40%40@example/", + "origin": "https://example", + "protocol": "https:", + "username": "%40%40", + "password": "", + "host": "example", + "hostname": "example", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "non-az-09 characters", + { + "input": "http://`{}:`{}@h/`{}?`{}", + "base": "http://doesnotmatter/", + "href": "http://%60%7B%7D:%60%7B%7D@h/%60%7B%7D?`{}", + "origin": "http://h", + "protocol": "http:", + "username": "%60%7B%7D", + "password": "%60%7B%7D", + "host": "h", + "hostname": "h", + "port": "", + "pathname": "/%60%7B%7D", + "search": "?`{}", + "hash": "" + }, + "# Credentials in base", + { + "input": "/some/path", + "base": "http://user@example.org/smth", + "href": "http://user@example.org/some/path", + "origin": "http://example.org", + "protocol": "http:", + "username": "user", + "password": "", + "host": "example.org", + "hostname": "example.org", + "port": "", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + { + "input": "", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/smth", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/smth", + "search": "", + "hash": "" + }, + { + "input": "/some/path", + "base": "http://user:pass@example.org:21/smth", + "href": "http://user:pass@example.org:21/some/path", + "origin": "http://example.org:21", + "protocol": "http:", + "username": "user", + "password": "pass", + "host": "example.org:21", + "hostname": "example.org", + "port": "21", + "pathname": "/some/path", + "search": "", + "hash": "" + }, + "# a set of tests designed by zcorpan for relative URLs with unknown schemes", + { + "input": "i", + "base": "sc:sd", + "failure": true + }, + { + "input": "i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "i", + "base": "sc:/pa/pa", + "href": "sc:/pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "i", + "base": "sc:///pa/pa", + "href": "sc:///pa/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "../i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "../i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "/i", + "base": "sc:/pa/pa", + "href": "sc:/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc://ho/pa", + "href": "sc://ho/i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "/i", + "base": "sc:///pa/pa", + "href": "sc:///i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/i", + "search": "", + "hash": "" + }, + { + "input": "?i", + "base": "sc:sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:sd/sd", + "failure": true + }, + { + "input": "?i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc://ho/pa", + "href": "sc://ho/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "?i", + "hash": "" + }, + { + "input": "?i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa?i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "?i", + "hash": "" + }, + { + "input": "#i", + "base": "sc:sd", + "href": "sc:sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:sd/sd", + "href": "sc:sd/sd#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "sd/sd", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:/pa/pa", + "href": "sc:/pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc://ho/pa", + "href": "sc://ho/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "ho", + "hostname": "ho", + "port": "", + "pathname": "/pa", + "search": "", + "hash": "#i" + }, + { + "input": "#i", + "base": "sc:///pa/pa", + "href": "sc:///pa/pa#i", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/pa/pa", + "search": "", + "hash": "#i" + }, + "# make sure that relative URL logic works on known typically non-relative schemes too", + { + "input": "about:/../", + "base": "about:blank", + "href": "about:/", + "origin": "null", + "protocol": "about:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "data:/../", + "base": "about:blank", + "href": "data:/", + "origin": "null", + "protocol": "data:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "javascript:/../", + "base": "about:blank", + "href": "javascript:/", + "origin": "null", + "protocol": "javascript:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + { + "input": "mailto:/../", + "base": "about:blank", + "href": "mailto:/", + "origin": "null", + "protocol": "mailto:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# unknown schemes and non-ASCII domains", + { + "input": "sc://ñ.test/", + "base": "about:blank", + "href": "sc://xn--ida.test/", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "xn--ida.test", + "hostname": "xn--ida.test", + "port": "", + "pathname": "/", + "search": "", + "hash": "" + }, + "# unknown schemes and backslashes", + { + "input": "sc:\\../", + "base": "about:blank", + "href": "sc:\\../", + "origin": "null", + "protocol": "sc:", + "username": "", + "password": "", + "host": "", + "hostname": "", + "port": "", + "pathname": "\\../", + "search": "", + "hash": "" + }, + "# tests from jsdom/whatwg-url designed for code coverage", + { + "input": "http://127.0.0.1:10100/relative_import.html", + "base": "about:blank", + "href": "http://127.0.0.1:10100/relative_import.html", + "origin": "http://127.0.0.1:10100", + "protocol": "http:", + "username": "", + "password": "", + "host": "127.0.0.1:10100", + "hostname": "127.0.0.1", + "port": "10100", + "pathname": "/relative_import.html", + "search": "", + "hash": "" + }, + { + "input": "http://facebook.com/?foo=%7B%22abc%22", + "base": "about:blank", + "href": "http://facebook.com/?foo=%7B%22abc%22", + "origin": "http://facebook.com", + "protocol": "http:", + "username": "", + "password": "", + "host": "facebook.com", + "hostname": "facebook.com", + "port": "", + "pathname": "/", + "search": "?foo=%7B%22abc%22", + "hash": "" + }, + { + "input": "https://localhost:3000/jqueryui@1.2.3", + "base": "about:blank", + "href": "https://localhost:3000/jqueryui@1.2.3", + "origin": "https://localhost:3000", + "protocol": "https:", + "username": "", + "password": "", + "host": "localhost:3000", + "hostname": "localhost", + "port": "3000", + "pathname": "/jqueryui@1.2.3", + "search": "", + "hash": "" + } +] diff --git a/tests/wpt/web-platform-tests/url/urltestdata.txt b/tests/wpt/web-platform-tests/url/urltestdata.txt deleted file mode 100644 index 40203680fb4..00000000000 --- a/tests/wpt/web-platform-tests/url/urltestdata.txt +++ /dev/null @@ -1,402 +0,0 @@ -# FORMAT NOT DOCUMENTED YET (parser is urltestparser.js) - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/segments.js -http://example\t.\norg http://example.org/foo/bar s:http h:example.org p:/ -http://user:pass@foo:21/bar;par?b#c s:http u:user pass:pass h:foo port:21 p:/bar;par q:?b f:#c -http:foo.com s:http h:example.org p:/foo/foo.com -\t\s\s\s:foo.com\s\s\s\n s:http h:example.org p:/foo/:foo.com -\sfoo.com\s\s s:http h:example.org p:/foo/foo.com -a:\t\sfoo.com s:a p:\sfoo.com -http://f:21/\sb\s?\sd\s#\se\s s:http h:f port:21 p:/%20b%20 q:?%20d%20 f:#\se -http://f:/c s:http h:f p:/c -http://f:0/c s:http h:f port:0 p:/c -http://f:00000000000000/c s:http h:f port:0 p:/c -http://f:00000000000000000000080/c s:http h:f p:/c -http://f:b/c -http://f:\s/c -http://f:\n/c s:http h:f p:/c -http://f:fifty-two/c -http://f:999999/c s:http h:f port:999999 p:/c -http://f:\s21\s/\sb\s?\sd\s#\se\s - s:http h:example.org p:/foo/bar -\s\s\t s:http h:example.org p:/foo/bar -:foo.com/ s:http h:example.org p:/foo/:foo.com/ -:foo.com\\ s:http h:example.org p:/foo/:foo.com/ -: s:http h:example.org p:/foo/: -:a s:http h:example.org p:/foo/:a -:/ s:http h:example.org p:/foo/:/ -:\\ s:http h:example.org p:/foo/:/ -:# s:http h:example.org p:/foo/: f:# -\# s:http h:example.org p:/foo/bar f:# -\#/ s:http h:example.org p:/foo/bar f:#/ -\#\\ s:http h:example.org p:/foo/bar f:#\\ -\#;? s:http h:example.org p:/foo/bar f:#;? -? s:http h:example.org p:/foo/bar q:? -/ s:http h:example.org p:/ -:23 s:http h:example.org p:/foo/:23 -/:23 s:http h:example.org p:/:23 -:: s:http h:example.org p:/foo/:: -::23 s:http h:example.org p:/foo/::23 -foo:// s:foo h: p:/ -http://a:b@c:29/d s:http u:a pass:b h:c port:29 p:/d -http::@c:29 s:http h:example.org p:/foo/:@c:29 -http://&a:foo(b]c@d:2/ s:http u:&a pass:foo(b]c h:d port:2 p:/ -http://::@c@d:2 s:http pass::%40c h:d port:2 p:/ -http://foo.com:b@d/ s:http u:foo.com pass:b h:d p:/ -http://foo.com/\\@ s:http h:foo.com p://@ -http:\\\\foo.com\\ s:http h:foo.com p:/ -http:\\\\a\\b:c\\d@foo.com\\ s:http h:a p:/b:c/d@foo.com/ -foo:/ s:foo p:/ -foo:/bar.com/ s:foo p:/bar.com/ -foo:///////// s:foo h: p://///// -foo://///////bar.com/ s:foo h: p:///////bar.com/ -foo:////:///// s:foo h: p://:///// -c:/foo s:c p:/foo -//foo/bar s:http h:foo p:/bar -http://foo/path;a??e#f#g s:http h:foo p:/path;a q:??e f:#f#g -http://foo/abcd?efgh?ijkl s:http h:foo p:/abcd q:?efgh?ijkl -http://foo/abcd#foo?bar s:http h:foo p:/abcd f:#foo?bar -[61:24:74]:98 s:http h:example.org p:/foo/[61:24:74]:98 -http:[61:27]/:foo s:http h:example.org p:/foo/[61:27]/:foo -http://[1::2]:3:4 -http://2001::1 -http://2001::1] -http://2001::1]:80 -http://[2001::1] s:http h:[2001::1] p:/ -http://[2001::1]:80 s:http h:[2001::1] p:/ -http:/example.com/ s:http h:example.org p:/example.com/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.org p:/foo/example.com/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ -/a/b/c s:http h:example.org p:/a/b/c -/a/\s/c s:http h:example.org p:/a/%20/c -/a%2fc s:http h:example.org p:/a%2fc -/a/%2f/c s:http h:example.org p:/a/%2f/c -\#\u03B2 s:http h:example.org p:/foo/bar f:#\u03B2 -data:text/html,test#test s:data p:text/html,test f:#test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/file.html - -# Basic canonicalization, uppercase should be converted to lowercase -file:c:\\foo\\bar.html file:///tmp/mock/path s:file p:/c:/foo/bar.html - -# Spaces should fail -\s\sFile:c|////foo\\bar.html s:file p:/c:////foo/bar.html - -# This should fail -C|/foo/bar s:file p:/C:/foo/bar - -# This should fail -/C|\\foo\\bar s:file p:/C:/foo/bar -//C|/foo/bar s:file p:/C:/foo/bar -//server/file s:file h:server p:/file -\\\\server\\file s:file h:server p:/file -/\\server/file s:file h:server p:/file -file:///foo/bar.txt s:file p:/foo/bar.txt -file:///home/me s:file p:/home/me -// s:file p:/ -/// s:file p:/ -///test s:file p:/test -file://test s:file h:test p:/ -file://localhost s:file h:localhost p:/ -file://localhost/ s:file h:localhost p:/ -file://localhost/test s:file h:localhost p:/test -test s:file p:/tmp/mock/test -file:test s:file p:/tmp/mock/test - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/path.js -http://example.com/././foo about:blank s:http h:example.com p:/foo -http://example.com/./.foo s:http h:example.com p:/.foo -http://example.com/foo/. s:http h:example.com p:/foo/ -http://example.com/foo/./ s:http h:example.com p:/foo/ -http://example.com/foo/bar/.. s:http h:example.com p:/foo/ -http://example.com/foo/bar/../ s:http h:example.com p:/foo/ -http://example.com/foo/..bar s:http h:example.com p:/foo/..bar -http://example.com/foo/bar/../ton s:http h:example.com p:/foo/ton -http://example.com/foo/bar/../ton/../../a s:http h:example.com p:/a -http://example.com/foo/../../.. s:http h:example.com p:/ -http://example.com/foo/../../../ton s:http h:example.com p:/ton -http://example.com/foo/%2e s:http h:example.com p:/foo/ -http://example.com/foo/%2e%2 s:http h:example.com p:/foo/%2e%2 -http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar s:http h:example.com p:/%2e.bar -http://example.com////../.. s:http h:example.com p:// -http://example.com/foo/bar//../.. s:http h:example.com p:/foo/ -http://example.com/foo/bar//.. s:http h:example.com p:/foo/bar/ -http://example.com/foo s:http h:example.com p:/foo -http://example.com/%20foo s:http h:example.com p:/%20foo -http://example.com/foo% s:http h:example.com p:/foo% -http://example.com/foo%2 s:http h:example.com p:/foo%2 -http://example.com/foo%2zbar s:http h:example.com p:/foo%2zbar -http://example.com/foo%2\u00C2\u00A9zbar s:http h:example.com p:/foo%2%C3%82%C2%A9zbar -http://example.com/foo%41%7a s:http h:example.com p:/foo%41%7a -http://example.com/foo\t\u0091%91 s:http h:example.com p:/foo%C2%91%91 -http://example.com/foo%00%51 s:http h:example.com p:/foo%00%51 -http://example.com/(%28:%3A%29) s:http h:example.com p:/(%28:%3A%29) -http://example.com/%3A%3a%3C%3c s:http h:example.com p:/%3A%3a%3C%3c -http://example.com/foo\tbar s:http h:example.com p:/foobar -http://example.com\\\\foo\\\\bar s:http h:example.com p://foo//bar -http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd s:http h:example.com p:/%7Ffp3%3Eju%3Dduvgw%3Dd -http://example.com/@asdf%40 s:http h:example.com p:/@asdf%40 -http://example.com/\u4F60\u597D\u4F60\u597D s:http h:example.com p:/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD -http://example.com/\u2025/foo s:http h:example.com p:/%E2%80%A5/foo -http://example.com/\uFEFF/foo s:http h:example.com p:/%EF%BB%BF/foo -http://example.com/\u202E/foo/\u202D/bar s:http h:example.com p:/%E2%80%AE/foo/%E2%80%AD/bar - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/script-tests/relative.js -http://www.google.com/foo?bar=baz# about:blank s:http h:www.google.com p:/foo q:?bar=baz f:# -http://www.google.com/foo?bar=baz#\s\u00BB s:http h:www.google.com p:/foo q:?bar=baz f:#\s\u00BB -data:test#\s\u00BB s:data p:test f:#\s\u00BB -http://[www.google.com]/ -http://www.google.com s:http h:www.google.com p:/ -http://192.0x00A80001 s:http h:192.168.0.1 p:/ -http://www/foo%2Ehtml s:http h:www p:/foo%2Ehtml -http://www/foo/%2E/html s:http h:www p:/foo/html -http://user:pass@/ -http://%25DOMAIN:foobar@foodomain.com/ s:http u:%25DOMAIN pass:foobar h:foodomain.com p:/ -http:\\\\www.google.com\\foo s:http h:www.google.com p:/foo -http://foo:80/ s:http h:foo p:/ -http://foo:81/ s:http h:foo port:81 p:/ -httpa://foo:80/ s:httpa h:foo port:80 p:/ -http://foo:-80/ -https://foo:443/ s:https h:foo p:/ -https://foo:80/ s:https h:foo port:80 p:/ -ftp://foo:21/ s:ftp h:foo p:/ -ftp://foo:80/ s:ftp h:foo port:80 p:/ -gopher://foo:70/ s:gopher h:foo p:/ -gopher://foo:443/ s:gopher h:foo port:443 p:/ -ws://foo:80/ s:ws h:foo p:/ -ws://foo:81/ s:ws h:foo port:81 p:/ -ws://foo:443/ s:ws h:foo port:443 p:/ -ws://foo:815/ s:ws h:foo port:815 p:/ -wss://foo:80/ s:wss h:foo port:80 p:/ -wss://foo:81/ s:wss h:foo port:81 p:/ -wss://foo:443/ s:wss h:foo p:/ -wss://foo:815/ s:wss h:foo port:815 p:/ -http:/example.com/ s:http h:example.com p:/ -ftp:/example.com/ s:ftp h:example.com p:/ -https:/example.com/ s:https h:example.com p:/ -madeupscheme:/example.com/ s:madeupscheme p:/example.com/ -file:/example.com/ s:file p:/example.com/ -ftps:/example.com/ s:ftps p:/example.com/ -gopher:/example.com/ s:gopher h:example.com p:/ -ws:/example.com/ s:ws h:example.com p:/ -wss:/example.com/ s:wss h:example.com p:/ -data:/example.com/ s:data p:/example.com/ -javascript:/example.com/ s:javascript p:/example.com/ -mailto:/example.com/ s:mailto p:/example.com/ -http:example.com/ s:http h:example.com p:/ -ftp:example.com/ s:ftp h:example.com p:/ -https:example.com/ s:https h:example.com p:/ -madeupscheme:example.com/ s:madeupscheme p:example.com/ -ftps:example.com/ s:ftps p:example.com/ -gopher:example.com/ s:gopher h:example.com p:/ -ws:example.com/ s:ws h:example.com p:/ -wss:example.com/ s:wss h:example.com p:/ -data:example.com/ s:data p:example.com/ -javascript:example.com/ s:javascript p:example.com/ -mailto:example.com/ s:mailto p:example.com/ - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/segments-userinfo-vs-host.html -http:@www.example.com about:blank s:http h:www.example.com p:/ -http:/@www.example.com s:http h:www.example.com p:/ -http://@www.example.com s:http h:www.example.com p:/ -http:a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http:/a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://a:b@www.example.com s:http u:a pass:b h:www.example.com p:/ -http://@pple.com s:http h:pple.com p:/ -http::b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:b@www.example.com s:http pass:b h:www.example.com p:/ -http://:b@www.example.com s:http pass:b h:www.example.com p:/ -http:/:@/www.example.com -http://user@/www.example.com -http:@/www.example.com -http:/@/www.example.com -http://@/www.example.com -https:@/www.example.com -http:a:b@/www.example.com -http:/a:b@/www.example.com -http://a:b@/www.example.com -http::@/www.example.com -http:a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http:/a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://a:@www.example.com s:http u:a pass: h:www.example.com p:/ -http://www.@pple.com s:http u:www. h:pple.com p:/ -http:@:www.example.com -http:/@:www.example.com -http://@:www.example.com -http://:@www.example.com s:http pass: h:www.example.com p:/ - -#Others -/ http://www.example.com/test s:http h:www.example.com p:/ -/test.txt s:http h:www.example.com p:/test.txt -. s:http h:www.example.com p:/ -.. s:http h:www.example.com p:/ -test.txt s:http h:www.example.com p:/test.txt -./test.txt s:http h:www.example.com p:/test.txt -../test.txt s:http h:www.example.com p:/test.txt -../aaa/test.txt s:http h:www.example.com p:/aaa/test.txt -../../test.txt s:http h:www.example.com p:/test.txt -\u4E2D/test.txt s:http h:www.example.com p:/%E4%B8%AD/test.txt -http://www.example2.com s:http h:www.example2.com p:/ -//www.example2.com s:http h:www.example2.com p:/ -file:... s:file h: p:/... -file:.. s:file h: p:/ -file:a s:file h: p:/a - -# Based on http://trac.webkit.org/browser/trunk/LayoutTests/fast/url/host.html - -# Basic canonicalization, uppercase should be converted to lowercase -http://ExAmPlE.CoM http://other.com/ s:http p:/ h:example.com - -# Spaces should fail -http://example\sexample.com - -# This should fail -http://Goo%20\sgoo%7C|.com - -# This should fail -http://[] -http://[:] - -# U+3000 is mapped to U+0020 (space) which is disallowed -http://GOO\u00a0\u3000goo.com - -# Other types of space (no-break, zero-width, zero-width-no-break) are -# name-prepped away to nothing. -# U+200B, U+2060, and U+FEFF, are ignored -http://GOO\u200b\u2060\ufeffgoo.com s:http p:/ h:googoo.com - -# Ideographic full stop (full-width period for Chinese, etc.) should be -# treated as a dot. -# U+3002 is mapped to U+002E (dot) -http://www.foo\u3002bar.com s:http p:/ h:www.foo.bar.com - -# Invalid unicode characters should fail... -# U+FDD0 is disallowed; %ef%b7%90 is U+FDD0 -http://\ufdd0zyx.com - -# ...This is the same as previous but escaped. -http://%ef%b7%90zyx.com - -# Test name prepping, fullwidth input should be converted to ASCII and NOT -# IDN-ized. This is "Go" in fullwidth UTF-8/UTF-16. -http://\uff27\uff4f.com s:http p:/ h:go.com - -# URL spec forbids the following. -# https://www.w3.org/Bugs/Public/show_bug.cgi?id=24257 -http://\uff05\uff14\uff11.com -http://%ef%bc%85%ef%bc%94%ef%bc%91.com - -# ...%00 in fullwidth should fail (also as escaped UTF-8 input) -http://\uff05\uff10\uff10.com -http://%ef%bc%85%ef%bc%90%ef%bc%90.com - -# Basic IDN support, UTF-8 and UTF-16 input should be converted to IDN -http://\u4f60\u597d\u4f60\u597d s:http p:/ h:xn--6qqa088eba - -# Invalid escaped characters should fail and the percents should be -# escaped. https://www.w3.org/Bugs/Public/show_bug.cgi?id=24191 -http://%zz%66%a.com - -# If we get an invalid character that has been escaped. -http://%25 -http://hello%00 - -# Escaped numbers should be treated like IP addresses if they are. -http://%30%78%63%30%2e%30%32%35%30.01 s:http h:192.168.0.1 p:/ -http://%30%78%63%30%2e%30%32%35%30.01%2e s:http h:192.168.0.1 p:/ -http://192.168.0.257 - -# Invalid escaping should trigger the regular host error handling. -http://%3g%78%63%30%2e%30%32%35%30%2E.01 - -# Something that isn't exactly an IP should get treated as a host and -# spaces escaped. -http://192.168.0.1\shello - -# Fullwidth and escaped UTF-8 fullwidth should still be treated as IP. -# These are "0Xc0.0250.01" in fullwidth. -http://\uff10\uff38\uff43\uff10\uff0e\uff10\uff12\uff15\uff10\uff0e\uff10\uff11 s:http p:/ h:192.168.0.1 - -# Broken IPv6 -http://[google.com] - -# Misc Unicode -http://foo:\uD83D\uDCA9@example.com/bar s:http h:example.com p:/bar u:foo pass:%F0%9F%92%A9 - -# resolving a fragment against any scheme succeeds -\# test:test s:test p:test f:# -\#x mailto:x@x.com s:mailto p:x@x.com f:#x -\#x data:, s:data p:, f:#x -\#x about:blank s:about p:blank f:#x -\# test:test?test s:test p:test q:?test f:# - -# multiple @ in authority state -https://@test@test@example:800/ http://doesnotmatter/ s:https u:%40test%40test h:example port:800 p:/ -https://@@@example s:https u:%40%40 h:example p:/ - -# non-az-09 characters -http://`{}:`{}@h/`{}?`{} s:http u:%60%7B%7D pass:%60%7B%7D h:h p:/%60%7B%7D q:?`{} - -# Credentials in base -/some/path http://user@example.org/smth s:http u:user h:example.org p:/some/path - http://user:pass@example.org:21/smth s:http u:user pass:pass h:example.org port:21 p:/smth -/some/path http://user:pass@example.org:21/smth s:http u:user pass:pass h:example.org port:21 p:/some/path - -# a set of tests designed by zcorpan for relative URLs with unknown schemes -i sc:sd -i sc:sd/sd -i sc:/pa/pa s:sc p:/pa/i -i sc://ho/pa s:sc h:ho p:/i -i sc:///pa/pa s:sc h: p:/pa/i -../i sc:sd -../i sc:sd/sd -../i sc:/pa/pa s:sc p:/i -../i sc://ho/pa s:sc h:ho p:/i -../i sc:///pa/pa s:sc h: p:/i -/i sc:sd -/i sc:sd/sd -/i sc:/pa/pa s:sc p:/i -/i sc://ho/pa s:sc h:ho p:/i -/i sc:///pa/pa s:sc h: p:/i -?i sc:sd -?i sc:sd/sd -?i sc:/pa/pa s:sc p:/pa/pa q:?i -?i sc://ho/pa s:sc h:ho p:/pa q:?i -?i sc:///pa/pa s:sc h: p:/pa/pa q:?i -\#i sc:sd s:sc p:sd f:#i -\#i sc:sd/sd s:sc p:sd/sd f:#i -\#i sc:/pa/pa s:sc p:/pa/pa f:#i -\#i sc://ho/pa s:sc h:ho p:/pa f:#i -\#i sc:///pa/pa s:sc h: p:/pa/pa f:#i - -# make sure that relative URL logic works on known typically non-relative schemes too -about:/../ about:blank s:about p:/ -data:/../ about:blank s:data p:/ -javascript:/../ about:blank s:javascript p:/ -mailto:/../ about:blank s:mailto p:/ - -# unknown schemes and non-ASCII domains -sc://ñ.test/ about:blank s:sc h:xn--ida.test p:/ - -# unknown schemes and backslashes -sc:\\../ about:blank s:sc p:\\../ diff --git a/tests/wpt/web-platform-tests/url/urltestparser.js b/tests/wpt/web-platform-tests/url/urltestparser.js deleted file mode 100644 index 651c5d36510..00000000000 --- a/tests/wpt/web-platform-tests/url/urltestparser.js +++ /dev/null @@ -1,80 +0,0 @@ -function URLTestParser(input) { - var specialSchemes = ["ftp", "file", "gopher", "http", "https", "ws", "wss"], - tokenMap = { "\\": "\\", "#": "#", n: "\n", r: "\r", s: " ", t: "\t", f: "\f" } - resultMap = { s: "scheme", u: "username", pass: "password", h: "host", port: "port", p: "path", q: "query", f: "fragment" }, - results = [] - function Test() { - this.input = "" - this.base = "" - this.scheme = "" - this.username = "" - this.password = null - this.host = null - this.port = "" - this.path = "" - this.query = "" - this.fragment = "" - Object.defineProperties(this, { - "href": { get: function() { - return !this.scheme ? this.input : this.protocol + ( - this.host != null ? "//" + ( - ("" != this.username || null != this.password) ? this.username + ( - null != this.password ? ":" + this.password : "" - ) + "@" : "" - ) + this.host + (this.port ? ":" + this.port : "") : "" - ) + this.path + this.query + this.fragment - } }, - "protocol": { get: function() { return this.scheme + ":" } }, - "search": { get: function() { return "?" == this.query ? "" : this.query } }, - "hash": { get: function() { return "#" == this.fragment ? "" : this.fragment } }, - "hostname": { get: function() { return null == this.host ? "" : this.host } } - }) - } - function normalize(input) { - var output = "" - for(var i = 0, l = input.length; i < l; i++) { - var c = input[i] - if(c == "\\") { - var nextC = input[++i] - if(tokenMap.hasOwnProperty(nextC)) { - output += tokenMap[nextC] - } else if(nextC == "u") { - output += String.fromCharCode(parseInt(input[++i] + input[++i] + input[++i] + input[++i], 16)) - } else { - throw new Error("Input is invalid.") - } - } else { - output += c - } - } - return output - } - var lines = input.split("\n") - for(var i = 0, l = lines.length; i < l; i++) { - var line = lines[i] - if(line === "" || line.indexOf("#", 0) === 0) { - continue - } - var pieces = line.split(" "), - result = new Test() - result.input = normalize(pieces.shift()) - var base = pieces.shift() - if(base === "" || base === undefined) { - result.base = results[results.length - 1].base - } else { - result.base = normalize(base) - } - for(var ii = 0, ll = pieces.length; ii < ll; ii++) { - var piece = pieces[ii] - if(piece.indexOf("#", 0) === 0) { - continue - } - var subpieces = piece.split(":"), - token = subpieces.shift() - value = subpieces.join(":") - result[resultMap[token]] = normalize(value) - } - results.push(result) - } - return results -} diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/00_test_list.txt new file mode 100644 index 00000000000..03c181f2393 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/CONFORMANCE_RULES.txt new file mode 100644 index 00000000000..9acfe4278bd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/README.md b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/README.md new file mode 100644 index 00000000000..82f980123e0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/00_readme.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/00_readme.txt new file mode 100644 index 00000000000..a04eaa37b33 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/00_test_list.txt new file mode 100644 index 00000000000..309d3abd8c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/00_test_list.txt new file mode 100644 index 00000000000..87a479cc71a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html new file mode 100644 index 00000000000..86fd74af8f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-aliasing.html @@ -0,0 +1,92 @@ + + + + + + + + + + +bindAttribLocation with aliasing + + +
+
+ + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html new file mode 100644 index 00000000000..54950393752 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-bindAttribLocation-matrix.html @@ -0,0 +1,121 @@ + + + + + + + + + + +WebGL bindAttribLocation with Matrix Attributes Conformance Test + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html new file mode 100644 index 00000000000..5f6f993e292 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-disabled-vertex-attrib.html @@ -0,0 +1,102 @@ + + + + + + +WebGL Disabled Vertex Attrib Test + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html new file mode 100644 index 00000000000..c3838070dcf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-enable-vertex-attrib.html @@ -0,0 +1,84 @@ + + + + + + + WebGL Enable Vertex Attrib Test + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html new file mode 100644 index 00000000000..6f62d6025be --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-matrix-attributes.html @@ -0,0 +1,159 @@ + + + + + + + + + + +WebGL Matrix Attribute Conformance Test + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html new file mode 100644 index 00000000000..4c0966dda7c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-render.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html new file mode 100644 index 00000000000..de45ce308cf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib-zero-issues.html @@ -0,0 +1,154 @@ + + + + + + +WebGL Enable Vertex Attrib Zero Test + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html new file mode 100644 index 00000000000..b284c130045 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertex-attrib.html @@ -0,0 +1,120 @@ + + + + + + +WebGL vertexAttrib Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html new file mode 100644 index 00000000000..64dfacfbf2c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer-offsets.html @@ -0,0 +1,183 @@ + + + + + + + vertexattribpointer offsets test + + + + + + + + +There is supposed to be an example drawing here, but it's not important. + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html new file mode 100644 index 00000000000..89cb8bbb371 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/attribs/gl-vertexattribpointer.html @@ -0,0 +1,156 @@ + + + + + + +WebGL vertexAttribPointer Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/00_test_list.txt new file mode 100644 index 00000000000..374a86ed963 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html new file mode 100644 index 00000000000..ce596706c08 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-bind-test.html @@ -0,0 +1,89 @@ + + + + + + + WebGL BindBuffer conformance test. + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html new file mode 100644 index 00000000000..5887743e2aa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer-delete.html @@ -0,0 +1,82 @@ + + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html new file mode 100644 index 00000000000..e227e8b0fcf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/buffer-data-array-buffer.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html new file mode 100644 index 00000000000..c9afea561eb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/element-array-buffer-delete-recreate.html @@ -0,0 +1,92 @@ + + + + + + Element Array Buffer Deletion and Recreation Test + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html new file mode 100644 index 00000000000..55bbb970507 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-copies-indices.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html new file mode 100644 index 00000000000..1b0f7cbc0b8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-crash-with-buffer-sub-data.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html new file mode 100644 index 00000000000..75429115964 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-large-buffer.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html new file mode 100644 index 00000000000..1fba7e461a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-verifies-too-many-indices.html @@ -0,0 +1,73 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html new file mode 100644 index 00000000000..95a17ff2faf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation-with-resized-buffer.html @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html new file mode 100644 index 00000000000..8ffcbc79bd2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/buffers/index-validation.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/00_test_list.txt new file mode 100644 index 00000000000..bfa21995c84 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html new file mode 100644 index 00000000000..1adbbd12f7f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-offscreen-test.html @@ -0,0 +1,101 @@ + + + + + +WebGL required buffer clear behaviour test + + + + + + + + +
+ +
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html new file mode 100644 index 00000000000..4e232838efc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/buffer-preserve-test.html @@ -0,0 +1,89 @@ + + + + + +WebGL required buffer clear behaviour test + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html new file mode 100644 index 00000000000..8d0edc03212 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-test.html @@ -0,0 +1,214 @@ + + + + + + +WebGL Canvas Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html new file mode 100644 index 00000000000..6fe2616f795 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/canvas-zero-size.html @@ -0,0 +1,66 @@ + + + + + + + Zero Size Canvas Test + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html new file mode 100644 index 00000000000..8f47ba2578f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-static-webgl-to-multiple-canvas-test.html @@ -0,0 +1,98 @@ + + + + + + +WebGL Canvas Conformance Tests + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html new file mode 100644 index 00000000000..9f293adc4a5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/draw-webgl-to-canvas-test.html @@ -0,0 +1,101 @@ + + + + + + +WebGL Canvas Conformance Tests + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html new file mode 100644 index 00000000000..3852ad04799 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-hd-dpi-test.html @@ -0,0 +1,227 @@ + + + + + + +WebGL DrawingBuffer dimensions on HD-DPI machines test + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html new file mode 100644 index 00000000000..2c3b6001d7f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-static-canvas-test.html @@ -0,0 +1,139 @@ + + + + + + +WebGL Canvas Conformance Tests + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html new file mode 100644 index 00000000000..6ec13a58a9c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/drawingbuffer-test.html @@ -0,0 +1,140 @@ + + + + + + +WebGL Canvas.drawingBufferWidth,drawingBufferHeight Conformance Tests + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html new file mode 100644 index 00000000000..2e0e6db566e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/framebuffer-bindings-unaffected-on-resize.html @@ -0,0 +1,108 @@ + + + + + + +Verifies that GL framebuffer bindings do not change when canvas is resized + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html new file mode 100644 index 00000000000..1faa7372227 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/rapid-resizing.html @@ -0,0 +1,172 @@ + + + + + + +WebGL Rapid Resizing Test + + + + + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html new file mode 100644 index 00000000000..b41cd1f42c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/texture-bindings-unaffected-on-resize.html @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html new file mode 100644 index 00000000000..7f83c7273a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/to-data-url-test.html @@ -0,0 +1,130 @@ + + + + + +WebGL toDataURL test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html new file mode 100644 index 00000000000..5c7658acac9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/canvas/viewport-unchanged-upon-resize.html @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/00_test_list.txt new file mode 100644 index 00000000000..460c1c8b4f9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html new file mode 100644 index 00000000000..df818c45ed5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/constants-and-properties.html @@ -0,0 +1,568 @@ + + + + + +WebGL Constants and Properties Test + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html new file mode 100644 index 00000000000..3b7b6f011af --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attribute-preserve-drawing-buffer.html @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + +
+ + + +
+ should look like +
+
+
+
+
+
+
+ + + +
+ should look like +
+
+
+
+
+
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html new file mode 100644 index 00000000000..38407357d81 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-attributes-alpha-depth-stencil-antialias.html @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html new file mode 100644 index 00000000000..a02dd2d14c0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation-and-destruction.html @@ -0,0 +1,58 @@ + + + + + + +Test that contexts are freed and garbage collected reasonably + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation.html new file mode 100644 index 00000000000..04b138daf43 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-creation.html @@ -0,0 +1,58 @@ + + + + + + +Test that you can create large numbers of WebGL contexts. + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html new file mode 100644 index 00000000000..3989c7679aa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-eviction-with-garbage-collection.html @@ -0,0 +1,80 @@ + + + + + + +Test that context eviction and garbage collection do not interfere with each other + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html new file mode 100644 index 00000000000..0f1193898f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-hidden-alpha.html @@ -0,0 +1,189 @@ + + + + + + + + + + + + + + + + + + +
+
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html new file mode 100644 index 00000000000..dc83e16e6de --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost-restored.html @@ -0,0 +1,308 @@ + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost.html new file mode 100644 index 00000000000..62daf2e9bec --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-lost.html @@ -0,0 +1,373 @@ + + + + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html new file mode 100644 index 00000000000..1d90b8795d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-upon-reload.html @@ -0,0 +1,95 @@ + + + + + + +WebGL Context Release Test + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html new file mode 100644 index 00000000000..3bd94469b07 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-release-with-workers.html @@ -0,0 +1,95 @@ + + + + + + +WebGL Context Release Test + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html new file mode 100644 index 00000000000..d197a24cba0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/context-type-test.html @@ -0,0 +1,76 @@ + + + + + + +WebGL Canvas Conformance Tests + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html new file mode 100644 index 00000000000..445979775a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/incorrect-context-object-behaviour.html @@ -0,0 +1,90 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/methods.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/methods.html new file mode 100644 index 00000000000..d74ce21ef6f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/methods.html @@ -0,0 +1,238 @@ + + + + + +WebGL Methods Test + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html new file mode 100644 index 00000000000..87b4a0320ba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/premultiplyalpha-test.html @@ -0,0 +1,268 @@ + + + + + + +Test the WebGL premultipliedAlpha context creation flag. + + + + + + + +
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html new file mode 100644 index 00000000000..10f19562a17 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/resource-sharing-test.html @@ -0,0 +1,66 @@ + + + + + + + WebGL Resource Sharing. + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/context/resources/context-release-worker.js new file mode 100644 index 00000000000..3680117c25b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/00_test_list.txt new file mode 100644 index 00000000000..49609cbaaf2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html new file mode 100644 index 00000000000..bd9e71f0a6b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays-out-of-bounds.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html new file mode 100644 index 00000000000..908e612a47f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/angle-instanced-arrays.html @@ -0,0 +1,422 @@ + + + + + + +WebGL ANGLE_instanced_arrays Conformance Tests + + + + + + + + +
+ +
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html new file mode 100644 index 00000000000..120d24098a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-blend-minmax.html @@ -0,0 +1,247 @@ + + + + + + +WebGL EXT_blend_minmax Conformance Tests + + + + + + + +
+ +
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html new file mode 100644 index 00000000000..7885484152f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-frag-depth.html @@ -0,0 +1,243 @@ + + + + + + +WebGL EXT_frag_depth Conformance Tests + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html new file mode 100644 index 00000000000..a1da0ffd71e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-sRGB.html @@ -0,0 +1,413 @@ + + + + + + + + + + + + +
+
+ + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html new file mode 100644 index 00000000000..e63a22ed592 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-shader-texture-lod.html @@ -0,0 +1,293 @@ + + + + + +WebGL EXT_shader_texture_lod Conformance Tests + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html new file mode 100644 index 00000000000..81cde8f0ecf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/ext-texture-filter-anisotropic.html @@ -0,0 +1,192 @@ + + + + + + +WebGL EXT_texture_filter_anisotropic Conformance Tests + + + + + + + +
+ +
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html new file mode 100644 index 00000000000..39bba38ae13 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/get-extension.html @@ -0,0 +1,122 @@ + + + + + + +WebGL Extension Conformance Tests + + + + + + + +
+ +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html new file mode 100644 index 00000000000..b5a0806d271 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-element-index-uint.html @@ -0,0 +1,448 @@ + + + + + + +WebGL OES_element_index_uint Conformance Tests + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html new file mode 100644 index 00000000000..8f5fdb39869 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-standard-derivatives.html @@ -0,0 +1,354 @@ + + + + + + +WebGL OES_standard_derivatives Conformance Tests + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html new file mode 100644 index 00000000000..21df7b2c382 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-linear.html @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + +
+ +
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html new file mode 100644 index 00000000000..a0fec0cc1f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-canvas.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html new file mode 100644 index 00000000000..70070d5960e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image-data.html @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html new file mode 100644 index 00000000000..5b9832460b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-image.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html new file mode 100644 index 00000000000..d8374728238 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float-with-video.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html new file mode 100644 index 00000000000..9a20f3f25e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-float.html @@ -0,0 +1,293 @@ + + + + + + +WebGL OES_texture_float Conformance Tests + + + + + + + +
+ +
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html new file mode 100644 index 00000000000..6e130a121d3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-linear.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + +
+ +
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html new file mode 100644 index 00000000000..e0eb6f6b7f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-canvas.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html new file mode 100644 index 00000000000..eaf1a568609 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image-data.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html new file mode 100644 index 00000000000..193d424a3a7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-image.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html new file mode 100644 index 00000000000..d325602f5b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float-with-video.html @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html new file mode 100644 index 00000000000..fd47e55a8a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-texture-half-float.html @@ -0,0 +1,352 @@ + + + + + + +WebGL OES_texture_half_float Conformance Tests + + + + + + + +
+ + +
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html new file mode 100644 index 00000000000..7d2acf9dd36 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object-bufferData.html @@ -0,0 +1,217 @@ + + + + + + +WebGL OES_vertex_array_object_bufferData Conformance Tests + + + + + + + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html new file mode 100644 index 00000000000..38b606f3fd4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/oes-vertex-array-object.html @@ -0,0 +1,655 @@ + + + + + + +WebGL OES_vertex_array_object Conformance Tests + + + + + + + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html new file mode 100644 index 00000000000..7c4ff09e131 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-atc.html @@ -0,0 +1,422 @@ + + + + + + + + + + + +WebGL WEBGL_compressed_texture_atc Conformance Tests + + + +
+ +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html new file mode 100644 index 00000000000..5c771b8dc25 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-pvrtc.html @@ -0,0 +1,387 @@ + + + + + + + + + + + +WebGL WEBGL_compressed_texture_pvrtc Conformance Tests + + + +
+ +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html new file mode 100644 index 00000000000..418af1bb94e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-s3tc.html @@ -0,0 +1,635 @@ + + + + + + + + + + + +WebGL WEBGL_compressed_texture_s3tc Conformance Tests + + + +
+ +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html new file mode 100644 index 00000000000..4cb09baee4d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-compressed-texture-size-limit.html @@ -0,0 +1,248 @@ + + + + + + +WebGL compressed texture size limit conformance test + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html new file mode 100644 index 00000000000..27e61c8cca0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-renderer-info.html @@ -0,0 +1,127 @@ + + + + + + +WebGL WebGL_debug_renderer_info Conformance Tests + + + + + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html new file mode 100644 index 00000000000..c4040f65238 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-debug-shaders.html @@ -0,0 +1,166 @@ + + + + + + +WebGL WebGL_debug_shaders Conformance Tests + + + + + + + +
+ +
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html new file mode 100644 index 00000000000..737b76d26d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-depth-texture.html @@ -0,0 +1,338 @@ + + + + + + + + + + +WebGL WEBGL_depth_texture Conformance Tests + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html new file mode 100644 index 00000000000..7c963616c45 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-draw-buffers.html @@ -0,0 +1,734 @@ + + + + + + +WebGL WEBGL_draw_buffers Conformance Tests + + + + + + + +
+ +
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html new file mode 100644 index 00000000000..a490773dde7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/extensions/webgl-shared-resources.html @@ -0,0 +1,863 @@ + + + + + + +WebGL WEBGL_Shared_Resources Conformance Test + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/00_test_list.txt new file mode 100644 index 00000000000..a2ee6edb1f6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/00_test_list.txt new file mode 100644 index 00000000000..5b60206e9b1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/README.md new file mode 100644 index 00000000000..d917f6d7410 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html new file mode 100644 index 00000000000..211d36c45e5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-d3d11-compiler-error.html @@ -0,0 +1,119 @@ + + + + + + +ANGLE D3D11 Bug - Shader compilation error + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html new file mode 100644 index 00000000000..55f8d214d64 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/angle-dx-variable-bug.html @@ -0,0 +1,119 @@ + + + + + + +ANGLE D3D11 Bug - Variables beginning with "dx_" + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html new file mode 100644 index 00000000000..e5a0450a502 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/array-of-struct-with-int-first-position.html @@ -0,0 +1,164 @@ + + + + + + +Driver Bug - Array of structs with int or bool in first position + + + + + + + + + +
+
+ + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html new file mode 100644 index 00000000000..44e01cb4b53 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/compare-loop-index-to-uniform.html @@ -0,0 +1,89 @@ + + + + + + +Driver bug - Comparing loop index against uniform in a fragment shader should work + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html new file mode 100644 index 00000000000..b8758762eea --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/complex-glsl-does-not-crash.html @@ -0,0 +1,215 @@ + + + + + + +Driver Bug - complex glsl should not crash + + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html new file mode 100644 index 00000000000..d1512370422 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-in-loop.html @@ -0,0 +1,163 @@ + + + + + + + +Conditional discard in loop issue + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html new file mode 100644 index 00000000000..20d7fc659ce --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/conditional-discard-optimization.html @@ -0,0 +1,111 @@ + + + + + + + + +ANGLE WebGL Shader Conditionals Repro + + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html new file mode 100644 index 00000000000..da292e6fe66 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/constant-precision-qualifier.html @@ -0,0 +1,101 @@ + + + + + + +Bug - the precision qualifier of a constant variable should affect the precision of a consuming operation + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html new file mode 100644 index 00000000000..c899ad87fcd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/essl3-shaders-with-webgl1.html @@ -0,0 +1,136 @@ + + + + + + +Browser bug - WebGL 1 context should not accept OpenGL ES 3 shading language shaders + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html new file mode 100644 index 00000000000..f8de50baa36 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/floored-division-accuracy.html @@ -0,0 +1,97 @@ + + + + + + + + +Floored Division Accuracy Bug + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html new file mode 100644 index 00000000000..e9fd73ecffa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/fragcoord-linking-bug.html @@ -0,0 +1,116 @@ + + + + + + +GLSL compiler bug referencing gl_FragCoord + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html new file mode 100644 index 00000000000..c969f363eaf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/long-expressions-should-not-crash.html @@ -0,0 +1,159 @@ + + + + + + +Driver Bug - long experssions should not crash + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html new file mode 100644 index 00000000000..665e59a3cdc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/modulo-arithmetic-accuracy.html @@ -0,0 +1,97 @@ + + + + + + + + +Modulo Arithmetic Accuracy Bug + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html new file mode 100644 index 00000000000..d4135d3e22a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/multiplication-assignment.html @@ -0,0 +1,82 @@ + + + + + + +Multiplication assignment operator compilation bug + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html new file mode 100644 index 00000000000..2ac24590f9f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/nested-functions-should-not-crash.html @@ -0,0 +1,112 @@ + + + + + + +Driver Bug - nested functions should not crash + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html new file mode 100644 index 00000000000..a3f5b970671 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/sampler-array-using-loop-index.html @@ -0,0 +1,104 @@ + + + + + + +Sampler arrays using loop index should compile fine. + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html new file mode 100644 index 00000000000..0f78f01c719 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/temp-expressions-should-not-crash.html @@ -0,0 +1,123 @@ + + + + + + +Driver Bug - temp experssions should not crash + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html new file mode 100644 index 00000000000..6ddf9306c84 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/bugs/uniforms-should-not-lose-values.html @@ -0,0 +1,104 @@ + + + + + + +Driver Bug - Uniforms should no lose values + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/00_test_list.txt new file mode 100644 index 00000000000..6758bea8e8d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html new file mode 100644 index 00000000000..67059791ee3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec2.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html new file mode 100644 index 00000000000..4c5f381c666 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec3.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html new file mode 100644 index 00000000000..615f8d8c093 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-bvec4.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html new file mode 100644 index 00000000000..0bab45eb862 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec2.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html new file mode 100644 index 00000000000..e437c4d6fa9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec3.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html new file mode 100644 index 00000000000..0f430d4890c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-ivec4.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html new file mode 100644 index 00000000000..9ae4b02f3a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat2.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html new file mode 100644 index 00000000000..e34b67ddad5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat3.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html new file mode 100644 index 00000000000..6af55881a37 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-mat4.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html new file mode 100644 index 00000000000..ed1571ede31 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-corner-cases.html @@ -0,0 +1,218 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html new file mode 100644 index 00000000000..841878ea528 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec-mat-index.html @@ -0,0 +1,99 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + +xxx +
Check mat2(index++, vec4(index++)) works as intended
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html new file mode 100644 index 00000000000..d864790bfc8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec2.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html new file mode 100644 index 00000000000..b7eafb7dde7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec3.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html new file mode 100644 index 00000000000..267e0845eac --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/constructors/glsl-construct-vec4.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/00_test_list.txt new file mode 100644 index 00000000000..dd06ea05206 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html new file mode 100644 index 00000000000..a3e107ab308 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-abs.html @@ -0,0 +1,68 @@ + + + + + + + GLSL abs function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html new file mode 100644 index 00000000000..84a5f6a231f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-acos.html @@ -0,0 +1,118 @@ + + + + + + + GLSL acos function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html new file mode 100644 index 00000000000..e5455f7dc1e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-asin.html @@ -0,0 +1,118 @@ + + + + + + + GLSL asin function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html new file mode 100644 index 00000000000..6b171ab423f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan-xy.html @@ -0,0 +1,121 @@ + + + + + + + GLSL atan-xy function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html new file mode 100644 index 00000000000..dd8a2136176 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-atan.html @@ -0,0 +1,118 @@ + + + + + + + GLSL atan function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html new file mode 100644 index 00000000000..508f5e37f61 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-ceil.html @@ -0,0 +1,76 @@ + + + + + + + GLSL ceil function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html new file mode 100644 index 00000000000..3c117fe1e81 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-float.html @@ -0,0 +1,79 @@ + + + + + + + GLSL clamp-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html new file mode 100644 index 00000000000..a89133a3307 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-clamp-gentype.html @@ -0,0 +1,82 @@ + + + + + + + GLSL clamp-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html new file mode 100644 index 00000000000..a6475772bb0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cos.html @@ -0,0 +1,122 @@ + + + + + + + GLSL cos function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html new file mode 100644 index 00000000000..039568006ae --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-cross.html @@ -0,0 +1,76 @@ + + + + + + + GLSL cross function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html new file mode 100644 index 00000000000..f4f72fe53db --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-distance.html @@ -0,0 +1,111 @@ + + + + + + + GLSL distance function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html new file mode 100644 index 00000000000..dc81b6322d9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-dot.html @@ -0,0 +1,113 @@ + + + + + + + GLSL dot function test + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html new file mode 100644 index 00000000000..6407c1e41bd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-faceforward.html @@ -0,0 +1,91 @@ + + + + + + + GLSL faceforward function test + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html new file mode 100644 index 00000000000..524ba8028c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-floor.html @@ -0,0 +1,75 @@ + + + + + + + GLSL floor function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html new file mode 100644 index 00000000000..22a40a7590a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-fract.html @@ -0,0 +1,73 @@ + + + + + + + GLSL fract function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html new file mode 100644 index 00000000000..b3c96cdc62e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-length.html @@ -0,0 +1,110 @@ + + + + + + + GLSL length function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html new file mode 100644 index 00000000000..0aa52ba1dc3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-float.html @@ -0,0 +1,75 @@ + + + + + + + GLSL max-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html new file mode 100644 index 00000000000..e2c9bd2cd45 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-max-gentype.html @@ -0,0 +1,75 @@ + + + + + + + GLSL max-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html new file mode 100644 index 00000000000..51e3b6021f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-float.html @@ -0,0 +1,75 @@ + + + + + + + GLSL min-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html new file mode 100644 index 00000000000..4a0ada8db0c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-min-gentype.html @@ -0,0 +1,75 @@ + + + + + + + GLSL min-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html new file mode 100644 index 00000000000..36ff4361560 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-float.html @@ -0,0 +1,77 @@ + + + + + + + GLSL mix-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html new file mode 100644 index 00000000000..4ec7f632ea7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mix-gentype.html @@ -0,0 +1,77 @@ + + + + + + + GLSL mix-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html new file mode 100644 index 00000000000..a18bc94803d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-float.html @@ -0,0 +1,76 @@ + + + + + + + GLSL mod-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html new file mode 100644 index 00000000000..4d94cb481e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-mod-gentype.html @@ -0,0 +1,79 @@ + + + + + + + GLSL mod-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html new file mode 100644 index 00000000000..b5329498c4f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-normalize.html @@ -0,0 +1,82 @@ + + + + + + + GLSL normalize function test + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html new file mode 100644 index 00000000000..306881b9546 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-reflect.html @@ -0,0 +1,86 @@ + + + + + + + GLSL reflect function test + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html new file mode 100644 index 00000000000..d09b129c8ad --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sign.html @@ -0,0 +1,76 @@ + + + + + + + GLSL sign function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html new file mode 100644 index 00000000000..f4f5434dc57 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-sin.html @@ -0,0 +1,119 @@ + + + + + + + GLSL sin function test + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html new file mode 100644 index 00000000000..84bce2ff013 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-float.html @@ -0,0 +1,120 @@ + + + + + + + GLSL smoothstep-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html new file mode 100644 index 00000000000..18e7fc12954 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-smoothstep-gentype.html @@ -0,0 +1,81 @@ + + + + + + + GLSL smoothstep-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html new file mode 100644 index 00000000000..1de1c5d1485 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-float.html @@ -0,0 +1,75 @@ + + + + + + + GLSL step-float function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html new file mode 100644 index 00000000000..d424e5547c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function-step-gentype.html @@ -0,0 +1,75 @@ + + + + + + + GLSL step-gentype function test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html new file mode 100644 index 00000000000..55392f5247f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/functions/glsl-function.html @@ -0,0 +1,62 @@ + + + + + + + GLSL function test test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/00_test_list.txt new file mode 100644 index 00000000000..d700b29a563 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html new file mode 100644 index 00000000000..812915404c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html new file mode 100644 index 00000000000..7cf150a71aa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html new file mode 100644 index 00000000000..d59b89376f7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html new file mode 100644 index 00000000000..1874508629b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_mat4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html new file mode 100644 index 00000000000..6d2cc5e3ac0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html new file mode 100644 index 00000000000..163683b346e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html new file mode 100644 index 00000000000..81183d8ce37 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_int_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html new file mode 100644 index 00000000000..76ba85ceb8e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html new file mode 100644 index 00000000000..e7ef897782b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html new file mode 100644 index 00000000000..9581bbda8ed --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/add_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html new file mode 100644 index 00000000000..a631cc2efba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_int_to_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html new file mode 100644 index 00000000000..36e66a3fa77 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec2_to_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html new file mode 100644 index 00000000000..6b74005e7b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec3_to_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html new file mode 100644 index 00000000000..3846193ffd4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/assign_ivec4_to_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html new file mode 100644 index 00000000000..c837e1ff402 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/construct_struct.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html new file mode 100644 index 00000000000..fea373436f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html new file mode 100644 index 00000000000..62d0ea0e1c4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html new file mode 100644 index 00000000000..58c18b61a13 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html new file mode 100644 index 00000000000..d6dba4683d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_mat4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html new file mode 100644 index 00000000000..2f50269abb6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html new file mode 100644 index 00000000000..397c758ec19 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html new file mode 100644 index 00000000000..94b9b4afcf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_int_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html new file mode 100644 index 00000000000..d13d5a6432b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html new file mode 100644 index 00000000000..d074fe19670 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html new file mode 100644 index 00000000000..a6b2307e520 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/divide_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html new file mode 100644 index 00000000000..a9ca0b1ed43 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html new file mode 100644 index 00000000000..275023160c3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html new file mode 100644 index 00000000000..cc167b91b54 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html new file mode 100644 index 00000000000..31dbfddc19b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/equal_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html new file mode 100644 index 00000000000..a086572ced0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_int_float.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html new file mode 100644 index 00000000000..19e4f04e477 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec2_vec2.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html new file mode 100644 index 00000000000..d0e7873cce2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec3_vec3.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html new file mode 100644 index 00000000000..5b4ec18b7f7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/function_ivec4_vec4.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html new file mode 100644 index 00000000000..158fc119a93 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html new file mode 100644 index 00000000000..580387b0d3f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/greater_than_equal.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html new file mode 100644 index 00000000000..03135f29233 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html new file mode 100644 index 00000000000..bfdb1423563 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/less_than_equal.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html new file mode 100644 index 00000000000..29cbbf92c96 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html new file mode 100644 index 00000000000..293c57ffab2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html new file mode 100644 index 00000000000..fb30d29c517 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html new file mode 100644 index 00000000000..65585fd7fa8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_mat4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html new file mode 100644 index 00000000000..26597311f56 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html new file mode 100644 index 00000000000..1ee7c6cb1b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html new file mode 100644 index 00000000000..e71cfc3770d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_int_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html new file mode 100644 index 00000000000..5fa51ef88a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html new file mode 100644 index 00000000000..a3312fff4ea --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html new file mode 100644 index 00000000000..3586ed632cf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/multiply_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html new file mode 100644 index 00000000000..a5d202b38cd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html new file mode 100644 index 00000000000..5207c25e363 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html new file mode 100644 index 00000000000..b20e2a52c2c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html new file mode 100644 index 00000000000..ac0e07f24a9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/not_equal_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html new file mode 100644 index 00000000000..e83979b89cf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html new file mode 100644 index 00000000000..03789509377 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html new file mode 100644 index 00000000000..33a19c3443d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html new file mode 100644 index 00000000000..f53d782befd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_mat4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html new file mode 100644 index 00000000000..eb0c4716e20 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html new file mode 100644 index 00000000000..519c4d6ae32 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html new file mode 100644 index 00000000000..c168382bcf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_int_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html new file mode 100644 index 00000000000..0a3c34315f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html new file mode 100644 index 00000000000..93b72932e39 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html new file mode 100644 index 00000000000..d8b396b52fd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/subtract_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html new file mode 100644 index 00000000000..41cae76bfb4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_int_float.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html new file mode 100644 index 00000000000..37632268336 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec2_vec2.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html new file mode 100644 index 00000000000..d5e18d247b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec3_vec3.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html new file mode 100644 index 00000000000..40084a7a330 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/implicit/ternary_ivec4_vec4.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/00_test_list.txt new file mode 100644 index 00000000000..50802bf3464 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html new file mode 100644 index 00000000000..f871cadeef5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/float_literal.vert.html @@ -0,0 +1,76 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html new file mode 100644 index 00000000000..7df690981cc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/literal_precision.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html new file mode 100644 index 00000000000..1d9711129e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/literals/overflow_leak.vert.html @@ -0,0 +1,86 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/00_test_list.txt new file mode 100644 index 00000000000..91b4ce21f87 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html new file mode 100644 index 00000000000..93a49781ed8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat3-construction.html @@ -0,0 +1,95 @@ + + + + + + + GLSL mat3 construction test + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html new file mode 100644 index 00000000000..cdf252a4e87 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/matrices/glsl-mat4-to-mat3.html @@ -0,0 +1,94 @@ + + + + + + + GLSL mat4 to mat3 test + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/00_test_list.txt new file mode 100644 index 00000000000..0c8859b9f7f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html new file mode 100644 index 00000000000..24a382699cd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/attrib-location-length-limits.html @@ -0,0 +1,107 @@ + + + + + +WebGL attrib location length tests + + + + + + + + + +There is supposed to be an example drawing here, but it's not important. + +
Verify limits on the lengths of attribute locations per WebGL spec, "Maximum Uniform and Attribute Location Lengths".
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html new file mode 100644 index 00000000000..2066722be60 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/boolean_precision.html @@ -0,0 +1,95 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html new file mode 100644 index 00000000000..4a12d9c98b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/embedded-struct-definitions-forbidden.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html new file mode 100644 index 00000000000..3684248f51d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/empty_main.vert.html @@ -0,0 +1,56 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html new file mode 100644 index 00000000000..0520ea7ebbf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/expression-list-in-declarator-initializer.html @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html new file mode 100644 index 00000000000..b49c366b983 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/gl_position_unset.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html new file mode 100644 index 00000000000..ca70c2ea1df --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-function-nodes.html @@ -0,0 +1,158 @@ + + + + + + +GLSL function nodes Test + + + + + + + + + + + + + + + + +
This tests against a Mac driver bug related to function calls.
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html new file mode 100644 index 00000000000..fcd8ca63ff6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-long-variable-names.html @@ -0,0 +1,249 @@ + + + + + + glsl long variable name mapping tests + + + + + + + + + There is supposed to be an example drawing here, but it's not important. + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html new file mode 100644 index 00000000000..0d11862a6d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/glsl-vertex-branch.html @@ -0,0 +1,151 @@ + + + + + + +GLSL function nodes Test + + + + + + + + + + + + + + + + +
This tests against a Mac driver bug related to branches + inside of Vertex Shaders.
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/include.vs new file mode 100644 index 00000000000..7096579f082 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html new file mode 100644 index 00000000000..acb4629a116 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/large-loop-compile.html @@ -0,0 +1,195 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html new file mode 100644 index 00000000000..8f26d30bf6f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii-comments.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html new file mode 100644 index 00000000000..b1b0cea2d39 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/non-ascii.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html new file mode 100644 index 00000000000..cd5331b51e5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/re-compile-re-link.html @@ -0,0 +1,175 @@ + + + + + + +WebGL Re-Compile and Re-link Shader conformance test. + + + + + + + + +
+
+ + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html new file mode 100644 index 00000000000..adf14f684a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-precision-format-obeyed.html @@ -0,0 +1,108 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html new file mode 100644 index 00000000000..0167c1cc09e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-struct-scope.html @@ -0,0 +1,254 @@ + + + + + + + + +Struct Scope Test + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html new file mode 100644 index 00000000000..ce088319d2a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-uniform-packing-restrictions.html @@ -0,0 +1,274 @@ + + + + + + +WebGL uniform packing restrctions Conformance Test + + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html new file mode 100644 index 00000000000..9ef6d2adb88 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-varying-packing-restrictions.html @@ -0,0 +1,211 @@ + + + + + + +WebGL varying packing restrictions Conformance Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html new file mode 100644 index 00000000000..a00ca8f3856 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-define.html @@ -0,0 +1,59 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html new file mode 100644 index 00000000000..2dc6f2c8801 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-256-character-identifier.frag.html @@ -0,0 +1,133 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html new file mode 100644 index 00000000000..0adafa08529 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-define.html @@ -0,0 +1,59 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html new file mode 100644 index 00000000000..04fa8f96584 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-257-character-identifier.frag.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html new file mode 100644 index 00000000000..c287f359c5f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-_webgl-identifier.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html new file mode 100644 index 00000000000..b43ab809cae --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.frag.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html new file mode 100644 index 00000000000..85216c269b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-arbitrary-indexing.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html new file mode 100644 index 00000000000..65fbdeb0e7a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-containing-arrays.html @@ -0,0 +1,158 @@ + + + + + + + +GLSL Array of Structs Containing Arrays + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html new file mode 100644 index 00000000000..b55bfe98f28 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-array-of-structs-uniform.html @@ -0,0 +1,168 @@ + + + + + + + +GLSL Array of Structs Uniform + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html new file mode 100644 index 00000000000..0c1123d0022 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-array.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html new file mode 100644 index 00000000000..177e38bde7c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-attrib-struct.vert.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html new file mode 100644 index 00000000000..dc2db444e66 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-clipvertex.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html new file mode 100644 index 00000000000..8fcd2856d95 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-assignment.html @@ -0,0 +1,66 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html new file mode 100644 index 00000000000..dfb3473c51e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-comma-conditional-assignment.html @@ -0,0 +1,225 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html new file mode 100644 index 00000000000..04d0498119f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping-negative.html @@ -0,0 +1,67 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html new file mode 100644 index 00000000000..efa995575df --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-conditional-scoping.html @@ -0,0 +1,70 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html new file mode 100644 index 00000000000..af1b0c72687 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.frag.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html new file mode 100644 index 00000000000..d0600139cc1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-default-precision.vert.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html new file mode 100644 index 00000000000..5f4dd0000c7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-define-line-continuation.frag.html @@ -0,0 +1,62 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html new file mode 100644 index 00000000000..01c73b11daa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx-no-ext.frag.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html new file mode 100644 index 00000000000..d05d20e1941 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-dfdx.frag.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html new file mode 100644 index 00000000000..4423076d47e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-do-loop.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html new file mode 100644 index 00000000000..bff5e6538f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-error-directive.html @@ -0,0 +1,74 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html new file mode 100644 index 00000000000..1ede3463465 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-explicit-int-cast.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html new file mode 100644 index 00000000000..4080221d1b6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-float-return-value.frag.html @@ -0,0 +1,69 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html new file mode 100644 index 00000000000..cabfed9f876 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-loop.html @@ -0,0 +1,108 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html new file mode 100644 index 00000000000..e0e05475849 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-for-scoping.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html new file mode 100644 index 00000000000..f3936f1fd15 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-frag-depth.frag.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html new file mode 100644 index 00000000000..a6c753536ed --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-recursion.frag.html @@ -0,0 +1,70 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html new file mode 100644 index 00000000000..1c17f453a23 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-function-scoped-struct.html @@ -0,0 +1,65 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html new file mode 100644 index 00000000000..bd0f2efb481 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-functional-scoping.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html new file mode 100644 index 00000000000..4e54df133af --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glcolor.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html new file mode 100644 index 00000000000..5b8c86840c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-1.frag.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html new file mode 100644 index 00000000000..f37e64b384a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-gles-symbol.frag.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html new file mode 100644 index 00000000000..612948faaea --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-global-variable-precision-mismatch.html @@ -0,0 +1,151 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html new file mode 100644 index 00000000000..c89b2f38eca --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-glprojectionmatrix.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html new file mode 100644 index 00000000000..716a4c55267 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-hex-int-constant-macro.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html b/tests/wpt/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 00000000000..f1be8d047b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-implicit-vec3-to-vec4-cast.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html new file mode 100644 index 00000000000..bc4a6dcdafe --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-include.vert.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html new file mode 100644 index 00000000000..ddcca8d2e8e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-int-return-value.frag.html @@ -0,0 +1,67 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html new file mode 100644 index 00000000000..3045ea0adc8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-invalid-identifier.frag.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html new file mode 100644 index 00000000000..a68b2461344 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec2-return-value.frag.html @@ -0,0 +1,67 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html new file mode 100644 index 00000000000..07520e78839 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec3-return-value.frag.html @@ -0,0 +1,67 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html new file mode 100644 index 00000000000..83535db94d1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-ivec4-return-value.frag.html @@ -0,0 +1,67 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html new file mode 100644 index 00000000000..456df8ac9d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-limited-indexing.frag.html @@ -0,0 +1,77 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html new file mode 100644 index 00000000000..7c6423c5a44 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-long-line.html @@ -0,0 +1,91 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html new file mode 100644 index 00000000000..9b8f50be051 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-ascii-error.frag.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html new file mode 100644 index 00000000000..389d856b02f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-non-reserved-words.html @@ -0,0 +1,721 @@ + + + + + + +WebGL GLSL Conformance Tests - Non Reserved Words + + + + + + + + +
+
+ + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html new file mode 100644 index 00000000000..62d7b71950a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-precision.frag.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html new file mode 100644 index 00000000000..d2ba82c027c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-preprocessor-whitespace.html @@ -0,0 +1,87 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html new file mode 100644 index 00000000000..1791590056e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-quoted-error.frag.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html new file mode 100644 index 00000000000..7d2f2883e54 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-reserved-words.html @@ -0,0 +1,289 @@ + + + + + + +WebGL GLSL Conformance Tests - Reserved Words + + + + + + + + +
+
+ + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html new file mode 100644 index 00000000000..5e08d2a6e2c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-short-circuiting-operators.html @@ -0,0 +1,182 @@ + + + + + + + WebGL short-circuit evaluation + + + + + + + +
+
+ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html new file mode 100644 index 00000000000..cf4d796b797 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-similar-uniform-array-names.html @@ -0,0 +1,132 @@ + + + + + + +GLSL similar names issue + + + + + + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html new file mode 100644 index 00000000000..1b6260c94cb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-too-many-uniforms.html @@ -0,0 +1,146 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html new file mode 100644 index 00000000000..efda8d89918 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-undefined-preprocessor-symbol.frag.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html new file mode 100644 index 00000000000..f776cf1c5ee --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-uniform-in-loop-condition.vert.html @@ -0,0 +1,65 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html new file mode 100644 index 00000000000..f46202f6aca --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec2-return-value.frag.html @@ -0,0 +1,69 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html new file mode 100644 index 00000000000..c3f8488367b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec3-return-value.frag.html @@ -0,0 +1,69 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html new file mode 100644 index 00000000000..2d001b99a97 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-return-value.frag.html @@ -0,0 +1,69 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html new file mode 100644 index 00000000000..9d25ad6bf2c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-vec4-vec3-vec4-conditional.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html new file mode 100644 index 00000000000..96de76dc6e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.frag.html @@ -0,0 +1,64 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html new file mode 100644 index 00000000000..a46f52b1b43 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-100.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html new file mode 100644 index 00000000000..d6ff2b2f5d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-120.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html new file mode 100644 index 00000000000..f30a695065e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-version-130.vert.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html new file mode 100644 index 00000000000..3bde4248a12 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-webgl-identifier.vert.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html new file mode 100644 index 00000000000..f1f3174196f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-with-while-loop.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html new file mode 100644 index 00000000000..1145f05e277 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shader-without-precision.frag.html @@ -0,0 +1,60 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html new file mode 100644 index 00000000000..744a82a15c3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-constant-expression-loop-conditions.html @@ -0,0 +1,146 @@ + + + + + + WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html new file mode 100644 index 00000000000..3d80f9617ab --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-invariance.html @@ -0,0 +1,353 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html new file mode 100644 index 00000000000..37b5a9654da --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-uniforms.html @@ -0,0 +1,110 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html new file mode 100644 index 00000000000..f760262748b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-mis-matching-varyings.html @@ -0,0 +1,103 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html new file mode 100644 index 00000000000..e2fa5ba6095 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-missing-varyings.html @@ -0,0 +1,97 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html new file mode 100644 index 00000000000..e5c0ee8c684 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-name-conflicts.html @@ -0,0 +1,106 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html new file mode 100644 index 00000000000..418e76790b6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-uniform-structs.html @@ -0,0 +1,312 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html new file mode 100644 index 00000000000..608f33fe304 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shaders-with-varyings.html @@ -0,0 +1,126 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html new file mode 100644 index 00000000000..dc8fe3d0f9c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/shared.html @@ -0,0 +1,175 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html new file mode 100644 index 00000000000..b9233e20a37 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-equals.html @@ -0,0 +1,180 @@ + + + + + + + +GLSL Structure Equals Test + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html new file mode 100644 index 00000000000..6a6f0f494f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-mixed-array-declarators.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html new file mode 100644 index 00000000000..90854462bb2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-exceeds-maximum.html @@ -0,0 +1,78 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html new file mode 100644 index 00000000000..b2027c3ce1c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-of-variable-names.html @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html new file mode 100644 index 00000000000..2436ac8d7ac --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-nesting-under-maximum.html @@ -0,0 +1,74 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html new file mode 100644 index 00000000000..d49bee2fc39 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-specifiers-in-uniforms.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html new file mode 100644 index 00000000000..8f7cdbcea22 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/struct-unary-operators.html @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + +
+
+ + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html new file mode 100644 index 00000000000..e0f18c79022 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-global-initializers.html @@ -0,0 +1,88 @@ + + + + + + + + + + + + +Ternary Operators in Global Initializers + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html new file mode 100644 index 00000000000..51bfcb8f0ba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/ternary-operators-in-initializers.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html new file mode 100644 index 00000000000..6692e92bcd2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/misc/uniform-location-length-limits.html @@ -0,0 +1,109 @@ + + + + + +WebGL uniform location length tests + + + + + + + + + +There is supposed to be an example drawing here, but it's not important. + +
Verify limits on the lengths of uniform locations per WebGL spec, "Maximum Uniform and Attribute Location Lengths".
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/00_test_list.txt new file mode 100644 index 00000000000..7c2da3e8f5c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html new file mode 100644 index 00000000000..a0a459c2939 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_field.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html new file mode 100644 index 00000000000..da0ddeaa07f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_function.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html new file mode 100644 index 00000000000..7bfc52cd4b5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_struct.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html new file mode 100644 index 00000000000..ea21ca0d90f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/_webgl_variable.vert.html @@ -0,0 +1,59 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html new file mode 100644 index 00000000000..908513dbcfe --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_field.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html new file mode 100644 index 00000000000..b133d42dd0f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_function.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html new file mode 100644 index 00000000000..d57c57dc378 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_struct.vert.html @@ -0,0 +1,63 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html new file mode 100644 index 00000000000..3df092c3668 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/reserved/webgl_variable.vert.html @@ -0,0 +1,59 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/00_test_list.txt new file mode 100644 index 00000000000..c0f612d81d6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html new file mode 100644 index 00000000000..e10bcb160f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2d-bias.html @@ -0,0 +1,126 @@ + + + + + + +WebGL texture2D GLSL conformance test. + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html new file mode 100644 index 00000000000..414d8663274 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dlod.html @@ -0,0 +1,134 @@ + + + + + + +WebGL texture2D GLSL conformance test. + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html new file mode 100644 index 00000000000..df9159e09a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dproj.html @@ -0,0 +1,141 @@ + + + + + + +WebGL texture2D GLSL conformance test. + + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html new file mode 100644 index 00000000000..1dfb83171c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/samplers/glsl-function-texture2dprojlod.html @@ -0,0 +1,165 @@ + + + + + + +WebGL texture2D GLSL conformance test. + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/00_test_list.txt new file mode 100644 index 00000000000..31fe0f8f20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html new file mode 100644 index 00000000000..ad1268feea4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord-xy-values.html @@ -0,0 +1,209 @@ + + + + + + + gl-fragcoord Test + + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html new file mode 100644 index 00000000000..a6f25126a0c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragcoord.html @@ -0,0 +1,108 @@ + + + + + + + gl-fragcoord Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html new file mode 100644 index 00000000000..dcc470eb2b1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-fragdata-and-fragcolor.html @@ -0,0 +1,61 @@ + + + + + + +WebGL GLSL Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html new file mode 100644 index 00000000000..94ab5b175f1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-frontfacing.html @@ -0,0 +1,109 @@ + + + + + + + gl-fragcoord Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html new file mode 100644 index 00000000000..b05417605e4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/gl-pointcoord.html @@ -0,0 +1,164 @@ + + + + + + + gl-pointcoord Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html new file mode 100644 index 00000000000..387ab1f162b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/glsl/variables/glsl-built-ins.html @@ -0,0 +1,123 @@ + + + + + + +WebGL GLSL built in variables Conformance Test + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/00_test_list.txt new file mode 100644 index 00000000000..0b342cad1d3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html new file mode 100644 index 00000000000..6c626f6dc4b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-max-texture-dimensions.html @@ -0,0 +1,132 @@ + + + + + + +WebGL the max advertized texture size is supported. + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html new file mode 100644 index 00000000000..7ab8ba70473 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-attribs.html @@ -0,0 +1,109 @@ + + + + + + +WebGL the minimum number of attributes are supported. + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html new file mode 100644 index 00000000000..91f25c6a999 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-textures.html @@ -0,0 +1,104 @@ + + + + + + +WebGL the minimum number of uniforms are supported. + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html new file mode 100644 index 00000000000..a8dd785309c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/limits/gl-min-uniforms.html @@ -0,0 +1,128 @@ + + + + + + +WebGL the minimum number of uniforms are supported. + + + + + + + + +
+
+ + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/00_test_list.txt new file mode 100644 index 00000000000..3941fd9f752 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html new file mode 100644 index 00000000000..a9c7a5c4c8e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/bad-arguments-test.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html new file mode 100644 index 00000000000..e48a68c5063 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/boolean-argument-conversion.html @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html new file mode 100644 index 00000000000..08fab67a365 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/delayed-drawing.html @@ -0,0 +1,87 @@ + + + + + + +WebGL Delayed Drawing test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html new file mode 100644 index 00000000000..27f960fdc1b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/error-reporting.html @@ -0,0 +1,98 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html new file mode 100644 index 00000000000..13cf333f197 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/functions-returning-strings.html @@ -0,0 +1,127 @@ + + + + + +WebGL Conformance Tests + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html new file mode 100644 index 00000000000..4ad14c39a3d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/instanceof-test.html @@ -0,0 +1,113 @@ + + + + + + +WebGL instanceof test. + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html new file mode 100644 index 00000000000..1d992485286 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/invalid-passed-params.html @@ -0,0 +1,200 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/is-object.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/is-object.html new file mode 100644 index 00000000000..b80f24b17d2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/is-object.html @@ -0,0 +1,101 @@ + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html new file mode 100644 index 00000000000..f3ae86c7b8f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/null-object-behaviour.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html new file mode 100644 index 00000000000..a7a228e3e01 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/object-deletion-behaviour.html @@ -0,0 +1,449 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html new file mode 100644 index 00000000000..7a9f0700ee5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/shader-precision-format.html @@ -0,0 +1,160 @@ + + + + + +WebGL shader precision format test. + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html new file mode 100644 index 00000000000..4fc263a8cf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/type-conversion-test.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html new file mode 100644 index 00000000000..06d9574582b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/uninitialized-test.html @@ -0,0 +1,196 @@ + + + + + +WebGL Uninitialized GL Resources Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html new file mode 100644 index 00000000000..511fbc2d657 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/misc/webgl-specific.html @@ -0,0 +1,133 @@ + + + + + + +WebGL GLES2 difference test. + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/00_test_list.txt new file mode 100644 index 00000000000..1a09da036dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/README.md b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/README.md new file mode 100644 index 00000000000..01937147f69 --- /dev/null +++ b/tests/wpt/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. Install a browser with WebGL support + 2. Run ruby gen_tests.rb if you have modified the tests. + 3. Run ruby test_server.rb 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 gen_tests.rb + 3. Look into templates/ to see which functions lack tests (also see methods.txt and nsICanvasRenderingContextWebGL.idl): + 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: Tests.autorun = false; Tests.message = "Caution: this may crash your browser"; + 4. For each performance test: + 1. Write a performance/myTestName.html and set Tests.autorun = false; + 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. for f in $(git status | grep -e "^#\\s*functions/\\S*$" | sed "s/^#\s*//"); do git add $f; git commit -m $f; done) + 7. Send me a pull request. + 8. Congratulations, you're now a contributor! + + +For more information on WebGL: + + * Planet WebGL + * Learning WebGL + * WebGL on Khronos Message Boards + +Developer links: + + * WebGL on Mozilla Bugzilla + * WebGL on WebKit Bugzilla + * WebGL on Chromium Bugzilla + +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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-A.js new file mode 100644 index 00000000000..31039b5968f --- /dev/null +++ b/tests/wpt/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 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-B3.js new file mode 100644 index 00000000000..7b7f46c4614 --- /dev/null +++ b/tests/wpt/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= 0 && data.byteLength >= 0 && offset + data.byteLength <= 256; + }, + teardown : function(buf, ebuf) { + GL.deleteBuffer(buf); + GL.deleteBuffer(ebuf); + }, + } + +}; diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-C.js new file mode 100644 index 00000000000..974ff745532 --- /dev/null +++ b/tests/wpt/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 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-D_G.js new file mode 100644 index 00000000000..7d218519dff --- /dev/null +++ b/tests/wpt/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= 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/argGenerators-S_V.js new file mode 100644 index 00000000000..726f6ef0521 --- /dev/null +++ b/tests/wpt/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 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html new file mode 100644 index 00000000000..3fc1e3c0d53 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/constants.html @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html new file mode 100644 index 00000000000..0807d7225f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/getContext.html @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html new file mode 100644 index 00000000000..1461ff742b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/methods.html @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html new file mode 100644 index 00000000000..b4f3262abd9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-A.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html new file mode 100644 index 00000000000..3ae3bbfc2d8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B1.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html new file mode 100644 index 00000000000..d80a4427caa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B2.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html new file mode 100644 index 00000000000..426f385b0c6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B3.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html new file mode 100644 index 00000000000..616c49fc92e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-B4.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html new file mode 100644 index 00000000000..9f122d2cfa5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-C.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html new file mode 100644 index 00000000000..c6e3fe163ae --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-D_G.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html new file mode 100644 index 00000000000..9bd5cf92a5d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-G_I.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html new file mode 100644 index 00000000000..013f86f9f99 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-L_S.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html new file mode 100644 index 00000000000..f405d9c8f08 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI-S_V.html @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/quickCheckAPI.js new file mode 100644 index 00000000000..b39feca144c --- /dev/null +++ b/tests/wpt/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= 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 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 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html new file mode 100644 index 00000000000..4b7ff947d97 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/conformance/webGLArrays.html @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html new file mode 100644 index 00000000000..dcc2ab144e5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBuffer.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html new file mode 100644 index 00000000000..e27f2b3641e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindBufferBadArgs.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html new file mode 100644 index 00000000000..917b6eb4113 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bindFramebufferLeaveNonZero.html @@ -0,0 +1,52 @@ + + + + + +OpenGL for the web + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html new file mode 100644 index 00000000000..4df4146ba8a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferData.html @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html new file mode 100644 index 00000000000..aab63b790f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferDataBadArgs.html @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html new file mode 100644 index 00000000000..22cfd4cad5e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubData.html @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html new file mode 100644 index 00000000000..f7a3b745559 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/bufferSubDataBadArgs.html @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html new file mode 100644 index 00000000000..dea4dbd6b9b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2D.html @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html new file mode 100644 index 00000000000..d50d9612d32 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexImage2DBadArgs.html @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html new file mode 100644 index 00000000000..4a53fce0036 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2D.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html new file mode 100644 index 00000000000..a0aa244882d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/copyTexSubImage2DBadArgs.html @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html new file mode 100644 index 00000000000..a984ffd1a02 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/deleteBufferBadArgs.html @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html new file mode 100644 index 00000000000..fc4f1e18290 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArrays.html @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html new file mode 100644 index 00000000000..168dfa0a7ac --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawArraysOutOfBounds.html @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html new file mode 100644 index 00000000000..8a24db399a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElements.html @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html new file mode 100644 index 00000000000..1a4256e944c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/drawElementsBadArgs.html @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html new file mode 100644 index 00000000000..74d46542c51 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTests.html @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html new file mode 100644 index 00000000000..f06da4caaf2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/isTestsBadArgs.html @@ -0,0 +1,110 @@ + + + + + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html new file mode 100644 index 00000000000..a215be5bf93 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixels.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html new file mode 100644 index 00000000000..6dc5c2bfd8e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/readPixelsBadArgs.html @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html new file mode 100644 index 00000000000..3e85be29c33 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2D.html @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html new file mode 100644 index 00000000000..29eaa9de8ca --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DBadArgs.html @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html new file mode 100644 index 00000000000..22ddbed52bd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTML.html @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html new file mode 100644 index 00000000000..064bc3117c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texImage2DHTMLBadArgs.html @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html new file mode 100644 index 00000000000..4b3b507a8a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2D.html @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html new file mode 100644 index 00000000000..b435e15e98b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DBadArgs.html @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html new file mode 100644 index 00000000000..30bfbfe5c8f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTML.html @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html new file mode 100644 index 00000000000..475f349dc17 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/texSubImage2DHTMLBadArgs.html @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html new file mode 100644 index 00000000000..aab88c8d2e7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrix.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html new file mode 100644 index 00000000000..3c01dbfef8a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformMatrixBadArgs.html @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html new file mode 100644 index 00000000000..21fa77ee3b0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformf.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html new file mode 100644 index 00000000000..2e4383d40c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfArrayLen1.html @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html new file mode 100644 index 00000000000..70986ab0ebb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformfBadArgs.html @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html new file mode 100644 index 00000000000..a66b45fc9cf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformi.html @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html new file mode 100644 index 00000000000..e211397d856 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/uniformiBadArgs.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html new file mode 100644 index 00000000000..21d5a0b5988 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttrib.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html new file mode 100644 index 00000000000..5ab3d5ea1da --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribBadArgs.html @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html new file mode 100644 index 00000000000..c11074eb455 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointer.html @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html new file mode 100644 index 00000000000..7ec43f96297 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/functions/vertexAttribPointerBadArgs.html @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html new file mode 100644 index 00000000000..34ab4ab0a39 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/arrayOutOfBounds.html @@ -0,0 +1,281 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html new file mode 100644 index 00000000000..e5f1235e39d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/glsl/uniformOutOfBounds.html @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/unit.css b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/unit.css new file mode 100644 index 00000000000..0758b43bd9d --- /dev/null +++ b/tests/wpt/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 + +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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/unit.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/more/unit.js new file mode 100644 index 00000000000..742f8d7b9d5 --- /dev/null +++ b/tests/wpt/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; il[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 + + + + +WebGL GLSL conformance test: abs_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary.frag new file mode 100644 index 00000000000..6bea689383e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..af41608172b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary.vert new file mode 100644 index 00000000000..ab995eeb539 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..b6cd22e5060 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary.frag new file mode 100644 index 00000000000..5dd0df27b0b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..043273bca43 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary.vert new file mode 100644 index 00000000000..391b243348b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..0e0cf0076eb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary.frag new file mode 100644 index 00000000000..3c61c301c94 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..91ea0ccf027 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary.vert new file mode 100644 index 00000000000..7b0098d09ac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/abs_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..29798b28afd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/abs/input.run.txt new file mode 100644 index 00000000000..ebf5dc91f19 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html new file mode 100644 index 00000000000..09a4d1667d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: acos_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary.frag new file mode 100644 index 00000000000..a1a2dc79376 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..94428a926a9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary.vert new file mode 100644 index 00000000000..79269d10e26 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..8e05e26cf45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary.frag new file mode 100644 index 00000000000..e2204d1f786 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..efa40ccb9d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary.vert new file mode 100644 index 00000000000..c3751ecebb8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..eb6bb5d9692 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary.frag new file mode 100644 index 00000000000..0c3f1a97627 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..50032f1999e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary.vert new file mode 100644 index 00000000000..5bc077388ec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/acos_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..a382a457359 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/acos/input.run.txt new file mode 100644 index 00000000000..fc7eedaa08b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html new file mode 100644 index 00000000000..78ec7e76e4b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_001_to_004.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: all_001_to_004.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag.frag new file mode 100644 index 00000000000..0e3071418a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_frag_ref.frag new file mode 100644 index 00000000000..b0cefec6a0b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert.vert new file mode 100644 index 00000000000..6beab14c591 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec2_vert_ref.vert new file mode 100644 index 00000000000..82278b3b1b4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag.frag new file mode 100644 index 00000000000..bab07bbbc4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_frag_ref.frag new file mode 100644 index 00000000000..458540b702a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert.vert new file mode 100644 index 00000000000..657970df4b7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/all_bvec3_vert_ref.vert new file mode 100644 index 00000000000..a413785dccf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/all/input.run.txt new file mode 100644 index 00000000000..420ac35bcd2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html new file mode 100644 index 00000000000..f54506813da --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_001_to_004.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: any_001_to_004.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag.frag new file mode 100644 index 00000000000..83a21f61aab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_frag_ref.frag new file mode 100644 index 00000000000..260c1a83328 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert.vert new file mode 100644 index 00000000000..1388eda2eb0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec2_vert_ref.vert new file mode 100644 index 00000000000..c228036376b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag.frag new file mode 100644 index 00000000000..ba870149661 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_frag_ref.frag new file mode 100644 index 00000000000..1eb147e0e61 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert.vert new file mode 100644 index 00000000000..b7394346057 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/any_bvec3_vert_ref.vert new file mode 100644 index 00000000000..d448ff81977 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/any/input.run.txt new file mode 100644 index 00000000000..6ac42406768 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html new file mode 100644 index 00000000000..853fc909f6d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/array_001_to_006.html @@ -0,0 +1,223 @@ + + + + + +WebGL GLSL conformance test: array_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_frag.frag new file mode 100644 index 00000000000..89c4cdd999e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_empty_array_float_vert.vert new file mode 100644 index 00000000000..98be2c12857 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_frag.frag new file mode 100644 index 00000000000..3f5ac77043c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/empty_uniform_array_float_vert.vert new file mode 100644 index 00000000000..101c3332061 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_frag.frag new file mode 100644 index 00000000000..80c0bf0bc79 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/initfunc_empty_array_float_vert.vert new file mode 100644 index 00000000000..a84e72dda53 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/array/input.run.txt new file mode 100644 index 00000000000..c7cbc1049a7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html new file mode 100644 index 00000000000..2c540c60534 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: asin_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary.frag new file mode 100644 index 00000000000..51e81e8aa42 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..3ffe851d249 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary.vert new file mode 100644 index 00000000000..d19424fccf2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..d75bae25200 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary.frag new file mode 100644 index 00000000000..207ec4ffe68 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..02fae9465c1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary.vert new file mode 100644 index 00000000000..c51ca500f3a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..9aeab86bc51 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary.frag new file mode 100644 index 00000000000..4a7cc79a1b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..9dbb2489714 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary.vert new file mode 100644 index 00000000000..15f0ce71953 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/asin_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..648d0ad1805 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/asin/input.run.txt new file mode 100644 index 00000000000..c2de8233ad3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html new file mode 100644 index 00000000000..933bbeda1d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: atan_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html new file mode 100644 index 00000000000..5641dee1692 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: atan_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary.frag new file mode 100644 index 00000000000..0b3528ebbed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..891ea8dd215 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary.frag new file mode 100644 index 00000000000..8228dad8562 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_frag_xvaryyvary_ref.frag new file mode 100644 index 00000000000..cbb15f25897 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary.vert new file mode 100644 index 00000000000..ead9e4be173 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..f0dd4e16f34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary.vert new file mode 100644 index 00000000000..8ea50eaeaeb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_float_vert_xvaryyvary_ref.vert new file mode 100644 index 00000000000..8bed464b91b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary.frag new file mode 100644 index 00000000000..2801a4938e9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..8f5a8ad6494 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary.frag new file mode 100644 index 00000000000..88d1c793315 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_frag_xvaryyvary_ref.frag new file mode 100644 index 00000000000..8757f466c25 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary.vert new file mode 100644 index 00000000000..c9740e5db16 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..813ed87545e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary.vert new file mode 100644 index 00000000000..cbb0ab63e46 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec2_vert_xvaryyvary_ref.vert new file mode 100644 index 00000000000..d80a25e2a80 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary.frag new file mode 100644 index 00000000000..281ae2e62d1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..4fa29d8e932 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary.frag new file mode 100644 index 00000000000..c203df2da56 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_frag_xvaryyvary_ref.frag new file mode 100644 index 00000000000..92b92646f12 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary.vert new file mode 100644 index 00000000000..ad0d327872b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..735f8809262 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary.vert new file mode 100644 index 00000000000..637d7a3e349 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/atan_vec3_vert_xvaryyvary_ref.vert new file mode 100644 index 00000000000..c8a671240ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/atan/input.run.txt new file mode 100644 index 00000000000..1c305f21117 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html new file mode 100644 index 00000000000..c3cafba1e1f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: biConstants_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html new file mode 100644 index 00000000000..31b9d07a135 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/biConstants_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: biConstants_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_frag.frag new file mode 100644 index 00000000000..94e9c6d0ee0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxCombinedTextureImageUnits_vert.vert new file mode 100644 index 00000000000..8dcfd2d98f1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_frag.frag new file mode 100644 index 00000000000..481f76a1560 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxDrawBuffers_vert.vert new file mode 100644 index 00000000000..25cc2b469ca --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_frag.frag new file mode 100644 index 00000000000..d54198995a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxFragmentUniformVectors_vert.vert new file mode 100644 index 00000000000..f430197c8b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_frag.frag new file mode 100644 index 00000000000..55b7b20789e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxTextureImageUnits_vert.vert new file mode 100644 index 00000000000..b0851a7292f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_frag.frag new file mode 100644 index 00000000000..abd8e8bff66 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVaryingVectors_vert.vert new file mode 100644 index 00000000000..cfb2449cb34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_frag.frag new file mode 100644 index 00000000000..f839f4c4efd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexAttribs_vert.vert new file mode 100644 index 00000000000..ca7742902ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_frag.frag new file mode 100644 index 00000000000..946dbd827cc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexTextureImageUnits_vert.vert new file mode 100644 index 00000000000..28306594d34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_frag.frag new file mode 100644 index 00000000000..735c7d0cede --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/gl_MaxVertexUniformVectors_vert.vert new file mode 100644 index 00000000000..b9e1b338753 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biConstants/input.run.txt new file mode 100644 index 00000000000..15c403b1a51 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_frag.frag new file mode 100644 index 00000000000..0dcfe2a9a77 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/DepthRange_vert.vert new file mode 100644 index 00000000000..6f8288c1ec3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html new file mode 100644 index 00000000000..64e7d71b9c5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/biuDepthRange_001_to_002.html @@ -0,0 +1,115 @@ + + + + + +WebGL GLSL conformance test: biuDepthRange_001_to_002.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/biuDepthRange/input.run.txt new file mode 100644 index 00000000000..21f2fd2e19e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Data_Types_frag.frag new file mode 100644 index 00000000000..2fed27f6d2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CG_Standard_Library_frag.frag new file mode 100644 index 00000000000..17bf049bf63 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectBuiltInOveride_frag.frag new file mode 100644 index 00000000000..21576a22633 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectComma_frag.frag new file mode 100644 index 00000000000..3a83174a49d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding1_vert.vert new file mode 100644 index 00000000000..5c5dee32513 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstFolding2_vert.vert new file mode 100644 index 00000000000..2749d2b9961 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectConstruct_vert.vert new file mode 100644 index 00000000000..82212df5e97 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension10_V100_frag.frag new file mode 100644 index 00000000000..716291dbbda --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension1_V100_frag.frag new file mode 100644 index 00000000000..eec6d43fae0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectExtension4_V100_frag.frag new file mode 100644 index 00000000000..3145ab7666b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFull_vert.vert new file mode 100644 index 00000000000..0ae877ccac8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_frag.frag new file mode 100644 index 00000000000..4bd543b62a2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFuncOverload_vert.vert new file mode 100644 index 00000000000..bd798e61a4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectFunction1_vert.vert new file mode 100644 index 00000000000..c95136ab400 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectModule_frag.frag new file mode 100644 index 00000000000..9d904344616 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse1_frag.frag new file mode 100644 index 00000000000..df3baa5ca61 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_frag.frag new file mode 100644 index 00000000000..b87048be401 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParse2_vert.vert new file mode 100644 index 00000000000..4309de92b33 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest1_frag.frag new file mode 100644 index 00000000000..4af1b064132 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectParseTest_frag.frag new file mode 100644 index 00000000000..b126aba5ef6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess5_frag.frag new file mode 100644 index 00000000000..ba401b982fa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess8_frag.frag new file mode 100644 index 00000000000..90dc01a2a90 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectPreprocess9_frag.frag new file mode 100644 index 00000000000..6ffb8837769 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_frag.frag new file mode 100644 index 00000000000..8f367ae986e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle1_vert.vert new file mode 100644 index 00000000000..8875d94e4f5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_frag.frag new file mode 100644 index 00000000000..9c20ec836d3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle2_vert.vert new file mode 100644 index 00000000000..c286279953d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectSwizzle3_frag.frag new file mode 100644 index 00000000000..e1cc59e7636 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/CorrectVersion_V100_frag.frag new file mode 100644 index 00000000000..e125af65ea4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/DuplicateVersion1_V100_frag.frag new file mode 100644 index 00000000000..6ef4b1bbf5a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/FunctionParam_vert.vert new file mode 100644 index 00000000000..f8df4570bd4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Include_Preprocessor_Directive_frag.frag new file mode 100644 index 00000000000..745cc458b21 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Low_Level_Assembly_Reserved_Words_frag.frag new file mode 100644 index 00000000000..f42a80aa1a4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Main_Parameters_vert.vert new file mode 100644 index 00000000000..13b97a22e2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest3_frag.frag new file mode 100644 index 00000000000..f1f7004ef20 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/ParseTest4_frag.frag new file mode 100644 index 00000000000..add162fe355 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Constant_Conversions_frag.frag new file mode 100644 index 00000000000..3fbbf1c5d87 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Permissive_Scalar_Vector_Expressions_frag.frag new file mode 100644 index 00000000000..df1232cd5be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/TernaryOp_frag.frag new file mode 100644 index 00000000000..5aa6c71bbfa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/Texture_Rectangle_Samplers_frag.frag new file mode 100644 index 00000000000..863c2ed7797 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array10_frag.frag new file mode 100644 index 00000000000..62a2ce33295 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array11_frag.frag new file mode 100644 index 00000000000..8ba8323b417 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array1_frag.frag new file mode 100644 index 00000000000..aff04d3ec8c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array2_frag.frag new file mode 100644 index 00000000000..c3fc0d61946 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array3_frag.frag new file mode 100644 index 00000000000..aae911fab47 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array4_frag.frag new file mode 100644 index 00000000000..2f7baf1d8dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array5_frag.frag new file mode 100644 index 00000000000..36957dc4025 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array6_frag.frag new file mode 100644 index 00000000000..109d7ad8908 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array7_frag.frag new file mode 100644 index 00000000000..6e7dea3def9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array8_frag.frag new file mode 100644 index 00000000000..2fd8795edaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/array9_frag.frag new file mode 100644 index 00000000000..5a11791a194 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute1_vert.vert new file mode 100644 index 00000000000..2726899e87f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute2_vert.vert new file mode 100644 index 00000000000..f5bd8860d40 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_frag.frag new file mode 100644 index 00000000000..af78ed7f0e2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/attribute_vert.vert new file mode 100644 index 00000000000..1c35aea8252 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/break_frag.frag new file mode 100644 index 00000000000..bb50e2aa5f0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html new file mode 100644 index 00000000000..f2fb266c04a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_001_to_008.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html new file mode 100644 index 00000000000..2c6077e0da3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_009_to_016.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html new file mode 100644 index 00000000000..c3b5a09b34c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_017_to_024.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html new file mode 100644 index 00000000000..efd881a5deb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_025_to_032.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_025_to_032.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html new file mode 100644 index 00000000000..c578f0f715d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_033_to_040.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_033_to_040.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html new file mode 100644 index 00000000000..dba2e3e045a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_041_to_048.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_041_to_048.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html new file mode 100644 index 00000000000..0c46a779fa5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_049_to_056.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_049_to_056.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html new file mode 100644 index 00000000000..9600b32e94e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_057_to_064.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_057_to_064.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html new file mode 100644 index 00000000000..5224b2d0a01 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_065_to_072.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_065_to_072.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html new file mode 100644 index 00000000000..968b662d220 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_073_to_080.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_073_to_080.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html new file mode 100644 index 00000000000..70b94d6dfad --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_081_to_088.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_081_to_088.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html new file mode 100644 index 00000000000..df7b7b0631b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_089_to_096.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_089_to_096.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html new file mode 100644 index 00000000000..a081fb3da14 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_097_to_104.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_097_to_104.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html new file mode 100644 index 00000000000..5229538f513 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_105_to_112.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_105_to_112.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html new file mode 100644 index 00000000000..3aa93a3ba3b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_113_to_120.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_113_to_120.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html new file mode 100644 index 00000000000..6ee65c70eab --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_121_to_128.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_121_to_128.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html new file mode 100644 index 00000000000..b211e519b0f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_129_to_136.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_129_to_136.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html new file mode 100644 index 00000000000..7bb778bb5b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_137_to_144.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_137_to_144.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html new file mode 100644 index 00000000000..c7071ff5ede --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_145_to_152.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_145_to_152.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html new file mode 100644 index 00000000000..f7777cf14fa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_153_to_160.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_153_to_160.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html new file mode 100644 index 00000000000..87a495ba93d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_161_to_168.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_161_to_168.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html new file mode 100644 index 00000000000..991e2f45825 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_169_to_176.html @@ -0,0 +1,133 @@ + + + + + +WebGL GLSL conformance test: build_169_to_176.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html new file mode 100644 index 00000000000..e9ddd6ef861 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/build_177_to_178.html @@ -0,0 +1,73 @@ + + + + + +WebGL GLSL conformance test: build_177_to_178.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma1_vert.vert new file mode 100644 index 00000000000..85f66ac80d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_frag.frag new file mode 100644 index 00000000000..b372762288f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma2_vert.vert new file mode 100644 index 00000000000..9620a32cbe7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comma3_vert.vert new file mode 100644 index 00000000000..9075fa562a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/comment_frag.frag new file mode 100644 index 00000000000..3274a58704f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional1_frag.frag new file mode 100644 index 00000000000..616f077ae55 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional2_frag.frag new file mode 100644 index 00000000000..5dcff4b0fb2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/conditional3_frag.frag new file mode 100644 index 00000000000..bf28fa73c22 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constFunc_frag.frag new file mode 100644 index 00000000000..b93eeb02f9c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor1_frag.frag new file mode 100644 index 00000000000..2e58b3c0f3d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor2_frag.frag new file mode 100644 index 00000000000..d56b85f9e0e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/constructor3_V100_frag.frag new file mode 100644 index 00000000000..8de87cc2c7e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/continue_frag.frag new file mode 100644 index 00000000000..98b51374575 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType10_frag.frag new file mode 100644 index 00000000000..1b426b05ea6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType11_frag.frag new file mode 100644 index 00000000000..ce87ce363d3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType12_frag.frag new file mode 100644 index 00000000000..7a673b578b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType13_frag.frag new file mode 100644 index 00000000000..3a4e83ccc78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType19_frag.frag new file mode 100644 index 00000000000..bbfa811911c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType1_frag.frag new file mode 100644 index 00000000000..0221fe6a59d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType2_frag.frag new file mode 100644 index 00000000000..b00b2122739 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType3_frag.frag new file mode 100644 index 00000000000..86369cc916f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType4_frag.frag new file mode 100644 index 00000000000..55f2fb65381 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType5_frag.frag new file mode 100644 index 00000000000..398d0c87fe7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType6_frag.frag new file mode 100644 index 00000000000..e64906c08a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType7_frag.frag new file mode 100644 index 00000000000..6e05081cffb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType8_frag.frag new file mode 100644 index 00000000000..0a6ba7828e1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dataType9_frag.frag new file mode 100644 index 00000000000..686685df34b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.frag new file mode 100644 index 00000000000..e283e255b7c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/default.vert new file mode 100644 index 00000000000..fc46a6ecd3b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dowhile_frag.frag new file mode 100644 index 00000000000..59e7593f780 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec2_frag.frag new file mode 100644 index 00000000000..0297c4e938a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec3_frag.frag new file mode 100644 index 00000000000..5973555bc27 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/dvec4_frag.frag new file mode 100644 index 00000000000..2cafc8b2295 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension2_V100_frag.frag new file mode 100644 index 00000000000..0d2e37dc770 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension3_V100_frag.frag new file mode 100644 index 00000000000..4e1783a017e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension5_V100_frag.frag new file mode 100644 index 00000000000..bf3aad332b8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension6_V100_frag.frag new file mode 100644 index 00000000000..515844c4aec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension7_V100_frag.frag new file mode 100644 index 00000000000..9f1356d866b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension8_V100_frag.frag new file mode 100644 index 00000000000..ae18218c932 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/extension9_V100_frag.frag new file mode 100644 index 00000000000..30f9d4c4903 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float2_frag.frag new file mode 100644 index 00000000000..c40c998ca64 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float3_frag.frag new file mode 100644 index 00000000000..407b184e0da --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/float4_frag.frag new file mode 100644 index 00000000000..5ac6262a797 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly1_vert.vert new file mode 100644 index 00000000000..ffde417a153 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly2_vert.vert new file mode 100644 index 00000000000..f2c4289d844 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly3_vert.vert new file mode 100644 index 00000000000..9ddc58dc802 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly4_vert.vert new file mode 100644 index 00000000000..1424f620150 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/fragmentOnly_vert.vert new file mode 100644 index 00000000000..97c976a6b41 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function10_frag.frag new file mode 100644 index 00000000000..d6655a9c87b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function1_frag.frag new file mode 100644 index 00000000000..e835cbe1f73 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function2_V100_frag.frag new file mode 100644 index 00000000000..d2757c5c12c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function3_frag.frag new file mode 100644 index 00000000000..0da166e06ff --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function4_frag.frag new file mode 100644 index 00000000000..5da8a903a8d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function6_frag.frag new file mode 100644 index 00000000000..7198c5e2e21 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function7_frag.frag new file mode 100644 index 00000000000..b1209255dcb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function8_frag.frag new file mode 100644 index 00000000000..dc22b4ae2e3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/function9_frag.frag new file mode 100644 index 00000000000..cd3c2317312 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec2_frag.frag new file mode 100644 index 00000000000..8fc71311c38 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec3_frag.frag new file mode 100644 index 00000000000..e7072b8269d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/hvec4_frag.frag new file mode 100644 index 00000000000..ca70ea937c0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier1_frag.frag new file mode 100644 index 00000000000..d00a318948c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier2_frag.frag new file mode 100644 index 00000000000..84193c09d03 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/identifier3_frag.frag new file mode 100644 index 00000000000..9ab4840707d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if1_frag.frag new file mode 100644 index 00000000000..ff156240482 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/if2_frag.frag new file mode 100644 index 00000000000..152d4fe3284 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment1_frag.frag new file mode 100644 index 00000000000..838c058279d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment2_frag.frag new file mode 100644 index 00000000000..029b06b3927 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment3_frag.frag new file mode 100644 index 00000000000..d980958562c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment4_frag.frag new file mode 100644 index 00000000000..ad1dc450130 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/increment6_frag.frag new file mode 100644 index 00000000000..fffd54d1306 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/input.run.txt new file mode 100644 index 00000000000..78dde7d629b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main1_vert.vert new file mode 100644 index 00000000000..617598ee524 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main2_vert.vert new file mode 100644 index 00000000000..fcd49232fa2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/main3_vert.vert new file mode 100644 index 00000000000..43b6cb72aa5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/matrix_V100_frag.frag new file mode 100644 index 00000000000..b5051acef39 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/normal_vert.vert new file mode 100644 index 00000000000..517780e0e70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser10_frag.frag new file mode 100644 index 00000000000..838c91603a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser1_vert.vert new file mode 100644 index 00000000000..756c58eaf6d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser3_frag.frag new file mode 100644 index 00000000000..b088ce865fb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser4_frag.frag new file mode 100644 index 00000000000..83f5dd413a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser5_frag.frag new file mode 100644 index 00000000000..f6e5d3ebbe8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser6_frag.frag new file mode 100644 index 00000000000..53a6ace1db3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser7_frag.frag new file mode 100644 index 00000000000..bac24a4bfc9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser8_frag.frag new file mode 100644 index 00000000000..796712885f8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/parser9_frag.frag new file mode 100644 index 00000000000..def43a75114 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess0_frag.frag new file mode 100644 index 00000000000..da74a926ecc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess10_frag.frag new file mode 100644 index 00000000000..22c491f8292 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess1_frag.frag new file mode 100644 index 00000000000..e5d5a45469c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess2_frag.frag new file mode 100644 index 00000000000..9710957749f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess3_frag.frag new file mode 100644 index 00000000000..bcecb1ee153 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess4_frag.frag new file mode 100644 index 00000000000..81f43cab56b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess6_frag.frag new file mode 100644 index 00000000000..0fc4b509a40 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/preprocess7_frag.frag new file mode 100644 index 00000000000..14f9acd6992 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping1_frag.frag new file mode 100644 index 00000000000..d826522b539 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/scoping2_frag.frag new file mode 100644 index 00000000000..ebb871e8b13 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct10_frag.frag new file mode 100644 index 00000000000..65dd3c133ce --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct11_frag.frag new file mode 100644 index 00000000000..1ead0270343 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct1_frag.frag new file mode 100644 index 00000000000..613b4fc147c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct2_frag.frag new file mode 100644 index 00000000000..031319ac06c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct3_frag.frag new file mode 100644 index 00000000000..a53271af868 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct4_frag.frag new file mode 100644 index 00000000000..14b9b662c34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct5_frag.frag new file mode 100644 index 00000000000..74a12af4adb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct6_frag.frag new file mode 100644 index 00000000000..937331496cf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct7_frag.frag new file mode 100644 index 00000000000..7f9b0818fa2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct8_frag.frag new file mode 100644 index 00000000000..c83f398e319 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/struct9_frag.frag new file mode 100644 index 00000000000..14babe34786 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle1_frag.frag new file mode 100644 index 00000000000..39dddcb299d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle2_frag.frag new file mode 100644 index 00000000000..8eb8162bd8d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/swizzle3_frag.frag new file mode 100644 index 00000000000..b8bdb5ef405 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/typecast_frag.frag new file mode 100644 index 00000000000..75cc93e5cc5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform1_frag.frag new file mode 100644 index 00000000000..7ba746f65d2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/uniform_frag.frag new file mode 100644 index 00000000000..125bf56dd50 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying1_frag.frag new file mode 100644 index 00000000000..0938a024d8b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying2_frag.frag new file mode 100644 index 00000000000..f523396158b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying3_frag.frag new file mode 100644 index 00000000000..a93f9ae059f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/varying_frag.frag new file mode 100644 index 00000000000..50a76305542 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vector_frag.frag new file mode 100644 index 00000000000..a88027ede74 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version2_V100_frag.frag new file mode 100644 index 00000000000..6ed081378b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/version3_V100_frag.frag new file mode 100644 index 00000000000..fbe5c24d771 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly2_frag.frag new file mode 100644 index 00000000000..0e4547d439b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertexOnly_frag.frag new file mode 100644 index 00000000000..cc44d249639 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/vertex_vert.vert new file mode 100644 index 00000000000..e4b1f4474bd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while1_frag.frag new file mode 100644 index 00000000000..64894fa34ac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while2_frag.frag new file mode 100644 index 00000000000..68df2b3bd47 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/build/while_frag.frag new file mode 100644 index 00000000000..d55d0019433 --- /dev/null +++ b/tests/wpt/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/tests/wpt/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/tests/wpt/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 00000000000..64553ccc3f2 --- /dev/null +++ b/tests/wpt/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 @@ + + + + + +WebGL GLSL conformance test: built_in_varying_array_out_of_bounds_001_to_001.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/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/tests/wpt/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 00000000000..38b05ae498b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/built_in_varying_array_out_of_bounds/input.run.txt b/tests/wpt/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 00000000000..be6485a1f3f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html new file mode 100644 index 00000000000..407f8cac758 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: ceil_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary.frag new file mode 100644 index 00000000000..dfb425e48d9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..56b73e785b0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary.vert new file mode 100644 index 00000000000..da5e9f8005a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..9872fd198d6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary.frag new file mode 100644 index 00000000000..836c6978692 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..4c624a57b59 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary.vert new file mode 100644 index 00000000000..8240119c83d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..7483c22cc3b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary.frag new file mode 100644 index 00000000000..45d02666650 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..652be10fc2e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary.vert new file mode 100644 index 00000000000..e7a32134577 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/ceil_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..1bb4b809292 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/ceil/input.run.txt new file mode 100644 index 00000000000..ed1a87ffadd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html new file mode 100644 index 00000000000..3d9d913b714 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: clamp_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter.frag new file mode 100644 index 00000000000..2c32377d2ec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_frag_xvary_yconstquarter_ref.frag new file mode 100644 index 00000000000..2b1e5a340d6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter.vert new file mode 100644 index 00000000000..68aa1a4b632 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_float_vert_xvary_yconstquarter_ref.vert new file mode 100644 index 00000000000..bc6d8c00e6a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter.frag new file mode 100644 index 00000000000..e912dd375b7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_frag_xvary_yconstquarter_ref.frag new file mode 100644 index 00000000000..54face3fec3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter.vert new file mode 100644 index 00000000000..17474f371d5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec2_vert_xvary_yconstquarter_ref.vert new file mode 100644 index 00000000000..e566319c981 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter.frag new file mode 100644 index 00000000000..c294c26bbea --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_frag_xvary_yconstquarter_ref.frag new file mode 100644 index 00000000000..e09f795b344 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter.vert new file mode 100644 index 00000000000..50c14ffc522 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/clamp_vec3_vert_xvary_yconstquarter_ref.vert new file mode 100644 index 00000000000..6ba4f0d42dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/clamp/input.run.txt new file mode 100644 index 00000000000..2fafa275a45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html new file mode 100644 index 00000000000..7a1d7bb3b70 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: control_flow_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html new file mode 100644 index 00000000000..37972048623 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/control_flow_009_to_010.html @@ -0,0 +1,103 @@ + + + + + +WebGL GLSL conformance test: control_flow_009_to_010.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_frag.frag new file mode 100644 index 00000000000..ff23a7859c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_break_vert.vert new file mode 100644 index 00000000000..84a517d947b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_frag.frag new file mode 100644 index 00000000000..df501385e62 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_continue_vert.vert new file mode 100644 index 00000000000..2199326129f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_frag.frag new file mode 100644 index 00000000000..dc0cdb59a23 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_break_vert.vert new file mode 100644 index 00000000000..47491be115a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_frag.frag new file mode 100644 index 00000000000..9185696acb3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/for_nested_continue_vert.vert new file mode 100644 index 00000000000..14fb0b7d2a9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/input.run.txt new file mode 100644 index 00000000000..fddcaa48ae4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_frag.frag new file mode 100644 index 00000000000..31e409734ad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/control_flow/nested_if_else_vert.vert new file mode 100644 index 00000000000..aa3787d6907 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html new file mode 100644 index 00000000000..b28bbaad9cd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: cos_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary.frag new file mode 100644 index 00000000000..4cef9e2e21e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..a15106d2962 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary.vert new file mode 100644 index 00000000000..ff1bf21def6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..70a32fea41e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary.frag new file mode 100644 index 00000000000..303bcd98565 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..782ba2115a0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary.vert new file mode 100644 index 00000000000..6c9daf513ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..aba8af4bb28 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary.frag new file mode 100644 index 00000000000..2470106a75f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..b7e149de268 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary.vert new file mode 100644 index 00000000000..bde69506c4d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/cos_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..cd8f9d83796 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cos/input.run.txt new file mode 100644 index 00000000000..64f23d8c397 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html new file mode 100644 index 00000000000..2529ae4cd68 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_001_to_002.html @@ -0,0 +1,79 @@ + + + + + +WebGL GLSL conformance test: cross_001_to_002.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst.frag new file mode 100644 index 00000000000..3baaed5449c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_frag_xvaryyconst_ref.frag new file mode 100644 index 00000000000..7d1f2161339 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst.vert new file mode 100644 index 00000000000..6a3345f28ad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/cross_vec3_vert_xvaryyconst_ref.vert new file mode 100644 index 00000000000..7680ae03517 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/cross/input.run.txt new file mode 100644 index 00000000000..4ce9794db51 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default.vert new file mode 100644 index 00000000000..72e83fd0322 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html new file mode 100644 index 00000000000..5dc9a9004e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_001_to_001.html @@ -0,0 +1,66 @@ + + + + + +WebGL GLSL conformance test: default_001_to_001.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.frag new file mode 100644 index 00000000000..8db3c6954f7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/default_textured.vert new file mode 100644 index 00000000000..1b5b7831a46 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/expected.frag new file mode 100644 index 00000000000..3d543f343ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/default/input.run.txt new file mode 100644 index 00000000000..44c03e906b0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html new file mode 100644 index 00000000000..5a72e9475d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: degrees_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary.frag new file mode 100644 index 00000000000..52d2e724a12 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..b3675b0454c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary.vert new file mode 100644 index 00000000000..69b026d7db1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..4b919b44bb9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary.frag new file mode 100644 index 00000000000..3c01fb83eb0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..0706159c0ee --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary.vert new file mode 100644 index 00000000000..e7c59c30052 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..f2d52d129ec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary.frag new file mode 100644 index 00000000000..48c5cb1de39 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..e970bd14115 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary.vert new file mode 100644 index 00000000000..520f0bb652f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/degrees_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..ef8d0e4ab9b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/degrees/input.run.txt new file mode 100644 index 00000000000..caa0c110d0d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html new file mode 100644 index 00000000000..effeffc2c4f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_001_to_002.html @@ -0,0 +1,91 @@ + + + + + +WebGL GLSL conformance test: discard_001_to_002.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag.frag new file mode 100644 index 00000000000..bcb251232a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_cond_frag_ref.frag new file mode 100644 index 00000000000..05bb08a0391 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/discard_frag.frag new file mode 100644 index 00000000000..6420e95bf70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/discard/input.run.txt new file mode 100644 index 00000000000..ff9bfa993dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html new file mode 100644 index 00000000000..597bf5fd4ef --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: distance_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf.frag new file mode 100644 index 00000000000..90d38ddcffb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_frag_xvaryyhalf_ref.frag new file mode 100644 index 00000000000..d5c87c09ee3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf.vert new file mode 100644 index 00000000000..574bf00c331 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_float_vert_xvaryyhalf_ref.vert new file mode 100644 index 00000000000..694c7d1f7d0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf.frag new file mode 100644 index 00000000000..c39308d1e65 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_frag_xvaryyhalf_ref.frag new file mode 100644 index 00000000000..61e18003227 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf.vert new file mode 100644 index 00000000000..9807d91fed7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec2_vert_xvaryyhalf_ref.vert new file mode 100644 index 00000000000..f70d7a78c91 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf.frag new file mode 100644 index 00000000000..c356d342409 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_frag_xvaryyhalf_ref.frag new file mode 100644 index 00000000000..b016b64db9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf.vert new file mode 100644 index 00000000000..f0ce5c4bd4c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/distance_vec3_vert_xvaryyhalf_ref.vert new file mode 100644 index 00000000000..7fdd7f986fd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/distance/input.run.txt new file mode 100644 index 00000000000..bfbce99ed16 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html new file mode 100644 index 00000000000..40d5fc16109 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: dot_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone.frag new file mode 100644 index 00000000000..4dfef129c0a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_frag_xvaryyone_ref.frag new file mode 100644 index 00000000000..1d8b5594dab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone.vert new file mode 100644 index 00000000000..d1df51840b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_float_vert_xvaryyone_ref.vert new file mode 100644 index 00000000000..3d37b84fddd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf.frag new file mode 100644 index 00000000000..dc4389716de --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_frag_xvaryyhalf_ref.frag new file mode 100644 index 00000000000..515e4965183 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf.vert new file mode 100644 index 00000000000..48cc60154d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec2_vert_xvaryyhalf_ref.vert new file mode 100644 index 00000000000..d5e6df67b18 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird.frag new file mode 100644 index 00000000000..55205c28490 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_frag_xvaryythird_ref.frag new file mode 100644 index 00000000000..cc4a934fb26 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird.vert new file mode 100644 index 00000000000..69493de3ee2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/dot_vec3_vert_xvaryythird_ref.vert new file mode 100644 index 00000000000..5fc4c88057d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/dot/input.run.txt new file mode 100644 index 00000000000..e87547fd338 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html new file mode 100644 index 00000000000..8949e81447f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: equal_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html new file mode 100644 index 00000000000..d231c1373b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: equal_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag.frag new file mode 100644 index 00000000000..045692d15eb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_frag_ref.frag new file mode 100644 index 00000000000..ebcac665493 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert.vert new file mode 100644 index 00000000000..024e181bba3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec2_vert_ref.vert new file mode 100644 index 00000000000..216909a18ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag.frag new file mode 100644 index 00000000000..0ccb925a7ed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_frag_ref.frag new file mode 100644 index 00000000000..0a1b9c8d88c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert.vert new file mode 100644 index 00000000000..de9b3e3cbec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_bvec3_vert_ref.vert new file mode 100644 index 00000000000..7501623cb78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag.frag new file mode 100644 index 00000000000..ce609e4f1a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_frag_ref.frag new file mode 100644 index 00000000000..37007e7845f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert.vert new file mode 100644 index 00000000000..893a9a1625d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec2_vert_ref.vert new file mode 100644 index 00000000000..ae12fe24f26 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag.frag new file mode 100644 index 00000000000..43975b302f4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_frag_ref.frag new file mode 100644 index 00000000000..6b20fd91a31 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert.vert new file mode 100644 index 00000000000..717b03e9f73 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_ivec3_vert_ref.vert new file mode 100644 index 00000000000..e7d43e50106 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag.frag new file mode 100644 index 00000000000..432eb4b6c8b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_frag_ref.frag new file mode 100644 index 00000000000..858da69cf7c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert.vert new file mode 100644 index 00000000000..efb11fc95ec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec2_vert_ref.vert new file mode 100644 index 00000000000..4b72078dc6c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag.frag new file mode 100644 index 00000000000..00de9eeadb1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_frag_ref.frag new file mode 100644 index 00000000000..3d9a2151ac7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert.vert new file mode 100644 index 00000000000..b7b75c56cae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/equal_vec3_vert_ref.vert new file mode 100644 index 00000000000..df3f3e2e964 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/equal/input.run.txt new file mode 100644 index 00000000000..cd4a81eb519 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html new file mode 100644 index 00000000000..7ee6ec4f2fd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: exp_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html new file mode 100644 index 00000000000..3a2549715c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: exp_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary.frag new file mode 100644 index 00000000000..86ed7588cd0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..f13fca97d9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg.frag new file mode 100644 index 00000000000..785a464714c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..08503fa51dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary.vert new file mode 100644 index 00000000000..df41faff3a1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..f83a25bb8e9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg.vert new file mode 100644 index 00000000000..7d1f08a6bbf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_float_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..b429ff8ff82 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary.frag new file mode 100644 index 00000000000..be85cb373bc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..9b11c76721a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg.frag new file mode 100644 index 00000000000..5a81055ee72 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..ddfeae7f811 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary.vert new file mode 100644 index 00000000000..c22d89ed377 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..47a68f504a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg.vert new file mode 100644 index 00000000000..aae926d6cfe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec2_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..90069564842 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary.frag new file mode 100644 index 00000000000..446532a2ef3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..b481b7dcd6b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg.frag new file mode 100644 index 00000000000..a836e87868d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..e710a7973a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary.vert new file mode 100644 index 00000000000..b1056c28a24 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..f1385688cac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg.vert new file mode 100644 index 00000000000..d6c6c56446e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/exp_vec3_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..f361d9febf8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp/input.run.txt new file mode 100644 index 00000000000..4f56a2b3297 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html new file mode 100644 index 00000000000..390e55e7cf7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: exp2_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html new file mode 100644 index 00000000000..6c5285c8c19 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: exp2_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary.frag new file mode 100644 index 00000000000..922a733df7c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..88a6eae8e24 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg.frag new file mode 100644 index 00000000000..9140264056f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..d8167046f1f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary.vert new file mode 100644 index 00000000000..c3b914833a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..69898a60302 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg.vert new file mode 100644 index 00000000000..8955e3cfb0c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_float_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..2fc614e5a3f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary.frag new file mode 100644 index 00000000000..8af82a79b24 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..77c44ff3d4d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg.frag new file mode 100644 index 00000000000..b7805beadfb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..ddfaea25027 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary.vert new file mode 100644 index 00000000000..9903e66923b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..da02403b26d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg.vert new file mode 100644 index 00000000000..b94b23dd354 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec2_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..8284a474ecf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary.frag new file mode 100644 index 00000000000..1f289ce1556 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..b75546900e9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg.frag new file mode 100644 index 00000000000..c401e57d88e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_frag_xvaryneg_ref.frag new file mode 100644 index 00000000000..6f945903d5f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary.vert new file mode 100644 index 00000000000..d59cb3ef5f8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..3e8cc48a036 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg.vert new file mode 100644 index 00000000000..4d154bc17cd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/exp2_vec3_vert_xvaryneg_ref.vert new file mode 100644 index 00000000000..b0bc7818d32 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/exp2/input.run.txt new file mode 100644 index 00000000000..f893cd413eb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html new file mode 100644 index 00000000000..98d93954fae --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: faceforward_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst.frag new file mode 100644 index 00000000000..07ef6fbf0db --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_frag_nvaryiconst_ref.frag new file mode 100644 index 00000000000..5b5b2fd3e9d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst.vert new file mode 100644 index 00000000000..77d5d796ecc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_float_vert_nvaryiconst_ref.vert new file mode 100644 index 00000000000..0e1d365b3bc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst.frag new file mode 100644 index 00000000000..ec0f1c2f357 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_frag_nvaryiconst_ref.frag new file mode 100644 index 00000000000..a50f4548506 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst.vert new file mode 100644 index 00000000000..80d186c978a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec2_vert_nvaryiconst_ref.vert new file mode 100644 index 00000000000..41a04ef6035 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst.frag new file mode 100644 index 00000000000..5db1d0fc5fc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_frag_nvaryiconst_ref.frag new file mode 100644 index 00000000000..fb68855f7fd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst.vert new file mode 100644 index 00000000000..a745681dd55 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/faceforward_vec3_vert_nvaryiconst_ref.vert new file mode 100644 index 00000000000..d08a74620a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/faceforward/input.run.txt new file mode 100644 index 00000000000..4107e639799 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html new file mode 100644 index 00000000000..cfda6296ad1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: floor_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary.frag new file mode 100644 index 00000000000..3f918841870 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..11ec5e6e275 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary.vert new file mode 100644 index 00000000000..1ed8d39c665 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..5be14322e69 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary.frag new file mode 100644 index 00000000000..1a56a4fcf47 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..f8aba8d5e62 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary.vert new file mode 100644 index 00000000000..c977d879b22 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..232d5fee3a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary.frag new file mode 100644 index 00000000000..bb7f72018d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..1209631ef0f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary.vert new file mode 100644 index 00000000000..febeb930c41 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/floor_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..247aa1aa35d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/floor/input.run.txt new file mode 100644 index 00000000000..337787db8b9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html new file mode 100644 index 00000000000..3c38469b4b2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: fract_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary.frag new file mode 100644 index 00000000000..8ad6c92f968 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..2105d7fcd78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary.vert new file mode 100644 index 00000000000..8724037ff68 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..773fd79049a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary.frag new file mode 100644 index 00000000000..6d9e3fa0bd1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..222b2e96f57 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary.vert new file mode 100644 index 00000000000..bb8acce361a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..31546ff4a82 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary.frag new file mode 100644 index 00000000000..bf409a7a040 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..8a684230394 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary.vert new file mode 100644 index 00000000000..2d83b034800 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/fract_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..5092c853393 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/fract/input.run.txt new file mode 100644 index 00000000000..74ccc68b54c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_frag.frag new file mode 100644 index 00000000000..f92c81a01d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/array_float_vert.vert new file mode 100644 index 00000000000..671012944ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_frag.frag new file mode 100644 index 00000000000..6ba41dea092 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_array_vert.vert new file mode 100644 index 00000000000..3d643b15239 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_frag.frag new file mode 100644 index 00000000000..900dbd26306 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_empty_bool_empty_vert.vert new file mode 100644 index 00000000000..bbf763e948c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_frag.frag new file mode 100644 index 00000000000..1d08ca5e063 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_array_vert.vert new file mode 100644 index 00000000000..f8b3ec06553 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_frag.frag new file mode 100644 index 00000000000..bfc49e26f78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_in_bool_empty_vert.vert new file mode 100644 index 00000000000..a2d51b77d9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_frag.frag new file mode 100644 index 00000000000..51adf2723c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_array_vert.vert new file mode 100644 index 00000000000..43429dc9462 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_frag.frag new file mode 100644 index 00000000000..af091de6bdd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_inout_bool_empty_vert.vert new file mode 100644 index 00000000000..41552dfeef5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_frag.frag new file mode 100644 index 00000000000..10df063d00c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_array_vert.vert new file mode 100644 index 00000000000..85615ac6889 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_frag.frag new file mode 100644 index 00000000000..0a67173a243 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bool_empty_out_bool_empty_vert.vert new file mode 100644 index 00000000000..92a46a9081e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_frag.frag new file mode 100644 index 00000000000..f8a77b8988c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_array_vert.vert new file mode 100644 index 00000000000..0dbbca0221f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_frag.frag new file mode 100644 index 00000000000..d2f5c7e2960 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_empty_bvec4_empty_vert.vert new file mode 100644 index 00000000000..e3354f23b93 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_frag.frag new file mode 100644 index 00000000000..f4479e6802e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_array_vert.vert new file mode 100644 index 00000000000..ae5dde8038a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_frag.frag new file mode 100644 index 00000000000..a13cee3abae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_in_bvec4_empty_vert.vert new file mode 100644 index 00000000000..b919bf6b864 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_frag.frag new file mode 100644 index 00000000000..e61a00534bd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_array_vert.vert new file mode 100644 index 00000000000..710ff576a3a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_frag.frag new file mode 100644 index 00000000000..5a114e9be3e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_bigarray_vert.vert new file mode 100644 index 00000000000..92f5db9a4c6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_frag.frag new file mode 100644 index 00000000000..e1f4a1f915d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_inout_bvec4_empty_vert.vert new file mode 100644 index 00000000000..4f8820bc45b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_frag.frag new file mode 100644 index 00000000000..e3f50a63f12 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_array_vert.vert new file mode 100644 index 00000000000..b64a447b196 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_frag.frag new file mode 100644 index 00000000000..1f923620085 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/bvec4_empty_out_bvec4_empty_vert.vert new file mode 100644 index 00000000000..99c318fe7e1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_frag.frag new file mode 100644 index 00000000000..b3a130eec1f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_array_vert.vert new file mode 100644 index 00000000000..4763c1ad8ce --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_frag.frag new file mode 100644 index 00000000000..51d735717da --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_empty_float_empty_vert.vert new file mode 100644 index 00000000000..f41995b3ef8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_frag.frag new file mode 100644 index 00000000000..33e0ab61112 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_array_vert.vert new file mode 100644 index 00000000000..a685e7345ef --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_frag.frag new file mode 100644 index 00000000000..09870afe500 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_in_float_empty_vert.vert new file mode 100644 index 00000000000..f1f47f3034a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_frag.frag new file mode 100644 index 00000000000..fd0fa109691 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_array_vert.vert new file mode 100644 index 00000000000..d4c82f266a7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_frag.frag new file mode 100644 index 00000000000..ce0d3d0c5b9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_inout_float_empty_vert.vert new file mode 100644 index 00000000000..04d063561ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_frag.frag new file mode 100644 index 00000000000..3df81949369 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_array_vert.vert new file mode 100644 index 00000000000..212f4e846b3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_frag.frag new file mode 100644 index 00000000000..c0aafb071e5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/float_empty_out_float_empty_vert.vert new file mode 100644 index 00000000000..48837c9f3d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html new file mode 100644 index 00000000000..ba8d2295fdf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html new file mode 100644 index 00000000000..e6fe9657677 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html new file mode 100644 index 00000000000..cf831600887 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_017_to_024.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html new file mode 100644 index 00000000000..0aa1e4a7bf9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_025_to_032.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_025_to_032.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html new file mode 100644 index 00000000000..7aec3eb9c8a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_033_to_040.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_033_to_040.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html new file mode 100644 index 00000000000..85fe75d5b86 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_041_to_048.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_041_to_048.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html new file mode 100644 index 00000000000..499c0df41a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_049_to_056.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_049_to_056.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html new file mode 100644 index 00000000000..f796f65b5f8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_057_to_064.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_057_to_064.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html new file mode 100644 index 00000000000..c1039bd40ca --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_065_to_072.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_065_to_072.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html new file mode 100644 index 00000000000..cd6ecefa58e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_073_to_080.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_073_to_080.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html new file mode 100644 index 00000000000..4acf196d867 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_081_to_088.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_081_to_088.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html new file mode 100644 index 00000000000..4ab869922e2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_089_to_096.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_089_to_096.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html new file mode 100644 index 00000000000..c7adfdc6c75 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_097_to_104.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_097_to_104.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html new file mode 100644 index 00000000000..bcffe3b3a7f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_105_to_112.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_105_to_112.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html new file mode 100644 index 00000000000..90f9f7bcb0d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_113_to_120.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: functions_113_to_120.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html new file mode 100644 index 00000000000..1c80683fd4f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/functions_121_to_126.html @@ -0,0 +1,203 @@ + + + + + +WebGL GLSL conformance test: functions_121_to_126.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/input.run.txt new file mode 100644 index 00000000000..00b4fa8fa64 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_frag.frag new file mode 100644 index 00000000000..59a502afe66 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_array_vert.vert new file mode 100644 index 00000000000..8b9e0417deb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_frag.frag new file mode 100644 index 00000000000..3f9fc443807 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_empty_int_empty_vert.vert new file mode 100644 index 00000000000..73e895d7f43 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_frag.frag new file mode 100644 index 00000000000..b9e2910bcc4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_array_vert.vert new file mode 100644 index 00000000000..3d807a18ebc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_frag.frag new file mode 100644 index 00000000000..4be3d649c7d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_in_int_empty_vert.vert new file mode 100644 index 00000000000..020d7949257 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_frag.frag new file mode 100644 index 00000000000..91d71268d7a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_array_vert.vert new file mode 100644 index 00000000000..efaf9f449c7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_frag.frag new file mode 100644 index 00000000000..e2780c41cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_inout_int_empty_vert.vert new file mode 100644 index 00000000000..e252ac4cf45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_frag.frag new file mode 100644 index 00000000000..a46c860f841 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_array_vert.vert new file mode 100644 index 00000000000..5dd10b83375 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_frag.frag new file mode 100644 index 00000000000..822948a2d9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/int_empty_out_int_empty_vert.vert new file mode 100644 index 00000000000..6a5d0b85c32 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_frag.frag new file mode 100644 index 00000000000..1ee72fd7fe6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_array_vert.vert new file mode 100644 index 00000000000..82be12d556d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_frag.frag new file mode 100644 index 00000000000..1a66f95e7a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_empty_ivec4_empty_vert.vert new file mode 100644 index 00000000000..3680ca05101 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_frag.frag new file mode 100644 index 00000000000..7aa71b48a26 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_array_vert.vert new file mode 100644 index 00000000000..df24cc8ff79 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_frag.frag new file mode 100644 index 00000000000..bc6c03adc4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_in_ivec4_empty_vert.vert new file mode 100644 index 00000000000..1f0e3cd2b13 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_frag.frag new file mode 100644 index 00000000000..4aae9eebf67 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_array_vert.vert new file mode 100644 index 00000000000..069dae62c65 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_frag.frag new file mode 100644 index 00000000000..d2f509df7dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_bigarray_vert.vert new file mode 100644 index 00000000000..0c69946a165 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_frag.frag new file mode 100644 index 00000000000..aa75e3262b5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_inout_ivec4_empty_vert.vert new file mode 100644 index 00000000000..40e9db60ca9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_frag.frag new file mode 100644 index 00000000000..88ec4b637a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_array_vert.vert new file mode 100644 index 00000000000..c33908198fd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_frag.frag new file mode 100644 index 00000000000..9886a204f3e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/ivec4_empty_out_ivec4_empty_vert.vert new file mode 100644 index 00000000000..1e376e399a4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_frag.frag new file mode 100644 index 00000000000..77743dde165 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_array_vert.vert new file mode 100644 index 00000000000..45a997b176c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_frag.frag new file mode 100644 index 00000000000..6e1c87dfc65 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_empty_mat4_empty_vert.vert new file mode 100644 index 00000000000..2f607b71a9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_frag.frag new file mode 100644 index 00000000000..c29074351f9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_array_vert.vert new file mode 100644 index 00000000000..2230711d88d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_frag.frag new file mode 100644 index 00000000000..7c1839ced35 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_in_mat4_empty_vert.vert new file mode 100644 index 00000000000..3d78bbad982 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_frag.frag new file mode 100644 index 00000000000..9c75370b322 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_array_vert.vert new file mode 100644 index 00000000000..6b86b875589 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_frag.frag new file mode 100644 index 00000000000..469c839cbd2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_inout_mat4_empty_vert.vert new file mode 100644 index 00000000000..485c1f4b320 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_frag.frag new file mode 100644 index 00000000000..ba6c49a5036 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_array_vert.vert new file mode 100644 index 00000000000..a0dde522342 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_frag.frag new file mode 100644 index 00000000000..a3396fccdf0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/mat4_empty_out_mat4_empty_vert.vert new file mode 100644 index 00000000000..832f1c334ad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_frag.frag new file mode 100644 index 00000000000..2328826d691 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_float_vert.vert new file mode 100644 index 00000000000..b5b7095b43e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_frag.frag new file mode 100644 index 00000000000..b19d0edbb2e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/qualifiers_struct_vert.vert new file mode 100644 index 00000000000..ace4bf44483 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_frag.frag new file mode 100644 index 00000000000..1ffc79ea334 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_array_vert.vert new file mode 100644 index 00000000000..df7c8af7780 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_frag.frag new file mode 100644 index 00000000000..59691446f31 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_empty_vec4_empty_vert.vert new file mode 100644 index 00000000000..f6ca32e1019 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_frag.frag new file mode 100644 index 00000000000..9120bb3812f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_array_vert.vert new file mode 100644 index 00000000000..4805d42fd51 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_frag.frag new file mode 100644 index 00000000000..bbe63fa2874 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_in_vec4_empty_vert.vert new file mode 100644 index 00000000000..c6ab4b4e519 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_frag.frag new file mode 100644 index 00000000000..3aafe12675a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_array_vert.vert new file mode 100644 index 00000000000..1c0d0451144 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_frag.frag new file mode 100644 index 00000000000..3f28f2822c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_bigarray_vert.vert new file mode 100644 index 00000000000..7a3ba4e2e69 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_frag.frag new file mode 100644 index 00000000000..04a76748b73 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_inout_vec4_empty_vert.vert new file mode 100644 index 00000000000..f35fbdd856d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_frag.frag new file mode 100644 index 00000000000..c8ebf2cf6be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_array_vert.vert new file mode 100644 index 00000000000..df37032afb8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_frag.frag new file mode 100644 index 00000000000..403d8756505 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/vec4_empty_out_vec4_empty_vert.vert new file mode 100644 index 00000000000..070945644da --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_frag.frag new file mode 100644 index 00000000000..c926874adbd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/functions/void_empty_empty_void_empty_vert.vert new file mode 100644 index 00000000000..ebb2711cee2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html new file mode 100644 index 00000000000..9b1a509bfdc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_001_to_003.html @@ -0,0 +1,104 @@ + + + + + +WebGL GLSL conformance test: gl_FragCoord_001_to_003.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_w_frag.frag new file mode 100644 index 00000000000..3efa089c7a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag.frag new file mode 100644 index 00000000000..722b9a70ead --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_xy_frag_ref.frag new file mode 100644 index 00000000000..29a66e1b0b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag.frag new file mode 100644 index 00000000000..a18d52494fc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.frag new file mode 100644 index 00000000000..7be3a42faad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/gl_FragCoord_z_frag_ref.vert new file mode 100644 index 00000000000..2779f89e2c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FragCoord/input.run.txt new file mode 100644 index 00000000000..588cde7bff1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html new file mode 100644 index 00000000000..4b731e9c58d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_001_to_001.html @@ -0,0 +1,66 @@ + + + + + +WebGL GLSL conformance test: gl_FrontFacing_001_to_001.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/gl_FrontFacing_frag.frag new file mode 100644 index 00000000000..0c8d629ba2e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/gl_FrontFacing/input.run.txt new file mode 100644 index 00000000000..6244419195c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html new file mode 100644 index 00000000000..e904da5a096 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: greaterThan_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag.frag new file mode 100644 index 00000000000..58d0fb5bbab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_frag_ref.frag new file mode 100644 index 00000000000..8076d322a7b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert.vert new file mode 100644 index 00000000000..b22fdd48983 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec2_vert_ref.vert new file mode 100644 index 00000000000..bfd86980dec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag.frag new file mode 100644 index 00000000000..c236c7fab58 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_frag_ref.frag new file mode 100644 index 00000000000..b80c57649e5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert.vert new file mode 100644 index 00000000000..1161ff5e7d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_ivec3_vert_ref.vert new file mode 100644 index 00000000000..e17a32af112 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag.frag new file mode 100644 index 00000000000..cde28a32024 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_frag_ref.frag new file mode 100644 index 00000000000..042b25bf59a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert.vert new file mode 100644 index 00000000000..40155f24353 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec2_vert_ref.vert new file mode 100644 index 00000000000..2ba23bd8fbb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag.frag new file mode 100644 index 00000000000..9d8352fc1e8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_frag_ref.frag new file mode 100644 index 00000000000..2e7b8c4a1ad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert.vert new file mode 100644 index 00000000000..8958a1abce4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/greaterThan_vec3_vert_ref.vert new file mode 100644 index 00000000000..e51ff30099c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThan/input.run.txt new file mode 100644 index 00000000000..9d2acae74dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html new file mode 100644 index 00000000000..7a32ff4291c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: greaterThanEqual_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag.frag new file mode 100644 index 00000000000..4d9082c1929 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_frag_ref.frag new file mode 100644 index 00000000000..e49d6c58a28 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert.vert new file mode 100644 index 00000000000..6f99994dffc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec2_vert_ref.vert new file mode 100644 index 00000000000..d876f2432f5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag.frag new file mode 100644 index 00000000000..f0477e102be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_frag_ref.frag new file mode 100644 index 00000000000..5db473dad1e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert.vert new file mode 100644 index 00000000000..1f313ee09be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_ivec3_vert_ref.vert new file mode 100644 index 00000000000..08d8584c7bb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag.frag new file mode 100644 index 00000000000..5c22c3d8f0b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_frag_ref.frag new file mode 100644 index 00000000000..4d574e18854 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert.vert new file mode 100644 index 00000000000..640a258eced --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec2_vert_ref.vert new file mode 100644 index 00000000000..018777eab45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag.frag new file mode 100644 index 00000000000..1cdadb38724 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_frag_ref.frag new file mode 100644 index 00000000000..0c499bf3aa1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert.vert new file mode 100644 index 00000000000..0be1185d955 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/greaterThanEqual_vec3_vert_ref.vert new file mode 100644 index 00000000000..771b86f1f98 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/greaterThanEqual/input.run.txt new file mode 100644 index 00000000000..45628830136 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/input.run.txt new file mode 100644 index 00000000000..6eb579d476f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html new file mode 100644 index 00000000000..be770b5aba0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: inversesqrt_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary.frag new file mode 100644 index 00000000000..f0e12695424 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..440b90b6ea8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary.vert new file mode 100644 index 00000000000..07f52dfcbf6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..293646aab5b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary.frag new file mode 100644 index 00000000000..b7bfff05259 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..073da26ec36 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary.vert new file mode 100644 index 00000000000..cab16ca1803 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..5fa9496931e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary.frag new file mode 100644 index 00000000000..935fd3ef744 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..60825321149 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary.vert new file mode 100644 index 00000000000..2cdd7593792 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/inversesqrt/inversesqrt_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..f69629c7955 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/input.run.txt new file mode 100644 index 00000000000..9a3147ec3cb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html new file mode 100644 index 00000000000..f89ff7d6317 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: length_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary.frag new file mode 100644 index 00000000000..a82c9d35b09 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..1d8b5594dab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary.vert new file mode 100644 index 00000000000..97fc87505db --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..3d37b84fddd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary.frag new file mode 100644 index 00000000000..2d824ff60d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..f322b4d5fc3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary.vert new file mode 100644 index 00000000000..5becfad2122 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..37f22c220b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary.frag new file mode 100644 index 00000000000..7423f4c4c49 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..f817d2b0fd1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary.vert new file mode 100644 index 00000000000..2dc32aceb9f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/length/length_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..a4c07f034f5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/input.run.txt new file mode 100644 index 00000000000..f49c916d979 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html new file mode 100644 index 00000000000..0e94d23bcb8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: lessThan_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag.frag new file mode 100644 index 00000000000..869b5f7622f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_frag_ref.frag new file mode 100644 index 00000000000..c13a2268a48 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert.vert new file mode 100644 index 00000000000..7beff555f17 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec2_vert_ref.vert new file mode 100644 index 00000000000..5ab80c2fffa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag.frag new file mode 100644 index 00000000000..ab8ab911bc9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_frag_ref.frag new file mode 100644 index 00000000000..95ec76e829b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert.vert new file mode 100644 index 00000000000..7639cbeb32c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_ivec3_vert_ref.vert new file mode 100644 index 00000000000..50d690f7ccd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag.frag new file mode 100644 index 00000000000..6302e2c8a9c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_frag_ref.frag new file mode 100644 index 00000000000..1d68288992b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert.vert new file mode 100644 index 00000000000..4bf52729f2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec2_vert_ref.vert new file mode 100644 index 00000000000..7a531cacf02 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag.frag new file mode 100644 index 00000000000..e934d82afbc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_frag_ref.frag new file mode 100644 index 00000000000..c982fd10713 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert.vert new file mode 100644 index 00000000000..a1df0d7d12a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThan/lessThan_vec3_vert_ref.vert new file mode 100644 index 00000000000..e432113b2e0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/input.run.txt new file mode 100644 index 00000000000..656332cccac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html new file mode 100644 index 00000000000..b6c80662966 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: lessThanEqual_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag.frag new file mode 100644 index 00000000000..3c858795a05 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_frag_ref.frag new file mode 100644 index 00000000000..f9217e1fd10 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert.vert new file mode 100644 index 00000000000..d4681be4220 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec2_vert_ref.vert new file mode 100644 index 00000000000..101da9695a9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag.frag new file mode 100644 index 00000000000..5709110808d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_frag_ref.frag new file mode 100644 index 00000000000..cbd52545a74 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert.vert new file mode 100644 index 00000000000..305baf75a34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_ivec3_vert_ref.vert new file mode 100644 index 00000000000..88e4ebdfd3c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag.frag new file mode 100644 index 00000000000..cb69631340c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_frag_ref.frag new file mode 100644 index 00000000000..817e52d57a1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert.vert new file mode 100644 index 00000000000..cf96c2d9496 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec2_vert_ref.vert new file mode 100644 index 00000000000..30ad6b42d9a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag.frag new file mode 100644 index 00000000000..8fbc7c1da77 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_frag_ref.frag new file mode 100644 index 00000000000..f57661a340e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert.vert new file mode 100644 index 00000000000..c69bb0155c4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/lessThanEqual/lessThanEqual_vec3_vert_ref.vert new file mode 100644 index 00000000000..08324d8fe72 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/input.run.txt new file mode 100644 index 00000000000..beb1561c1be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html new file mode 100644 index 00000000000..3e5726fcc31 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: log_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html new file mode 100644 index 00000000000..cb786329590 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: log_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary.frag new file mode 100644 index 00000000000..c4685cc82dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01.frag new file mode 100644 index 00000000000..c9a26bc037b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary01_ref.frag new file mode 100644 index 00000000000..c255e618b92 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..472235d605e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary.vert new file mode 100644 index 00000000000..b6361d1d663 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01.vert new file mode 100644 index 00000000000..258894e5a6a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary01_ref.vert new file mode 100644 index 00000000000..fb19501b226 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..4df24e358f8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary.frag new file mode 100644 index 00000000000..9ecfb257690 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01.frag new file mode 100644 index 00000000000..9b36e90c380 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary01_ref.frag new file mode 100644 index 00000000000..5496f9db10c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..01d706c9dfe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary.vert new file mode 100644 index 00000000000..95dbc058b43 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01.vert new file mode 100644 index 00000000000..9bd23ab760e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary01_ref.vert new file mode 100644 index 00000000000..3a23b5aa61e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..4996ed1ee48 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary.frag new file mode 100644 index 00000000000..eb2db1ac8be --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01.frag new file mode 100644 index 00000000000..a19f80ebc74 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary01_ref.frag new file mode 100644 index 00000000000..1bdcbc69042 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..74f4cd89008 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary.vert new file mode 100644 index 00000000000..76627e5fde3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01.vert new file mode 100644 index 00000000000..48d13cd75e9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary01_ref.vert new file mode 100644 index 00000000000..3905ef7cb9b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log/log_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..c17738cfbcf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/input.run.txt new file mode 100644 index 00000000000..4205bf17ca3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html new file mode 100644 index 00000000000..386df4cb2ae --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: log2_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html new file mode 100644 index 00000000000..e6a4978120c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: log2_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary.frag new file mode 100644 index 00000000000..06c6a090a54 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01.frag new file mode 100644 index 00000000000..a6f3341cee6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary01_ref.frag new file mode 100644 index 00000000000..2185924efca --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..c43ea54d06f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary.vert new file mode 100644 index 00000000000..51123e0cd2b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01.vert new file mode 100644 index 00000000000..1356d8dbd49 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary01_ref.vert new file mode 100644 index 00000000000..4871f988b78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..ba305ff36cc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary.frag new file mode 100644 index 00000000000..e103f8fe58d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01.frag new file mode 100644 index 00000000000..c1646e3b0ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary01_ref.frag new file mode 100644 index 00000000000..b360fd2d9ce --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..ba37c09cca2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary.vert new file mode 100644 index 00000000000..81f012a4514 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01.vert new file mode 100644 index 00000000000..0cfaf57468b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary01_ref.vert new file mode 100644 index 00000000000..835f3da1cb2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..8f79dd44697 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary.frag new file mode 100644 index 00000000000..2b406997e16 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01.frag new file mode 100644 index 00000000000..614a6db9eae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary01_ref.frag new file mode 100644 index 00000000000..32020337fb4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..f84f000e1df --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary.vert new file mode 100644 index 00000000000..e98b3703e5f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01.vert new file mode 100644 index 00000000000..779abfe8458 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary01_ref.vert new file mode 100644 index 00000000000..fda8284a53c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/log2/log2_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..9c8454faf82 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_frag.frag new file mode 100644 index 00000000000..c6b5af5085f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat2_vert.vert new file mode 100644 index 00000000000..859c040b31d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_frag.frag new file mode 100644 index 00000000000..2d66cb16a2a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat3_vert.vert new file mode 100644 index 00000000000..ec5792f97a4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_frag.frag new file mode 100644 index 00000000000..f0750abb173 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/array_const_mat4_vert.vert new file mode 100644 index 00000000000..bb816ba1d85 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_frag.frag new file mode 100644 index 00000000000..00f8504ad48 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_copy_vert.vert new file mode 100644 index 00000000000..84e95ccbd7d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_frag.frag new file mode 100644 index 00000000000..4eb12436b67 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat2_vert.vert new file mode 100644 index 00000000000..d1c6fd84c13 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_frag.frag new file mode 100644 index 00000000000..bb93bcca422 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_copy_vert.vert new file mode 100644 index 00000000000..3aaa541ef9a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_frag.frag new file mode 100644 index 00000000000..cc1142a19b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat3_vert.vert new file mode 100644 index 00000000000..e070caebb8a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_frag.frag new file mode 100644 index 00000000000..e2df5e915dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_copy_vert.vert new file mode 100644 index 00000000000..8f119e19bff --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_frag.frag new file mode 100644 index 00000000000..ec6c1105f4a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/const_mat4_vert.vert new file mode 100644 index 00000000000..730087dacb2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/input.run.txt new file mode 100644 index 00000000000..730999d88dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_frag.frag new file mode 100644 index 00000000000..431b6471792 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_2vec2_vert.vert new file mode 100644 index 00000000000..6747a489889 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_frag.frag new file mode 100644 index 00000000000..b74a9a71d60 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_4float_vert.vert new file mode 100644 index 00000000000..c5a7f1a486f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_frag.frag new file mode 100644 index 00000000000..12acbc5b999 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_copy_vert.vert new file mode 100644 index 00000000000..6aeede3f8c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_frag.frag new file mode 100644 index 00000000000..38af35b1899 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_float_vert.vert new file mode 100644 index 00000000000..894b3a05891 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_frag.frag new file mode 100644 index 00000000000..a105f5fc6f5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat2_vert.vert new file mode 100644 index 00000000000..93d56cfd219 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_frag.frag new file mode 100644 index 00000000000..133a71f8479 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_3vec3_vert.vert new file mode 100644 index 00000000000..c0b92b88ffe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_frag.frag new file mode 100644 index 00000000000..e65c7241eeb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_9float_vert.vert new file mode 100644 index 00000000000..b13848605b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_frag.frag new file mode 100644 index 00000000000..7ba51a323c6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_copy_vert.vert new file mode 100644 index 00000000000..5b11278e017 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_frag.frag new file mode 100644 index 00000000000..7cb58fe8232 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_float_vert.vert new file mode 100644 index 00000000000..4cc0a4ea69c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_frag.frag new file mode 100644 index 00000000000..180e74875ed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat3_vert.vert new file mode 100644 index 00000000000..c1e4fce15bb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_frag.frag new file mode 100644 index 00000000000..d0504bed44d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_16float_vert.vert new file mode 100644 index 00000000000..d1ef12d5f36 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_frag.frag new file mode 100644 index 00000000000..449495736ac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_4vec4_vert.vert new file mode 100644 index 00000000000..c219f99fbbc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_frag.frag new file mode 100644 index 00000000000..9a9711cbefc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_copy_vert.vert new file mode 100644 index 00000000000..ee5c07864c7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_frag.frag new file mode 100644 index 00000000000..972cdceb39a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat4_vert.vert new file mode 100644 index 00000000000..910729c2bd5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html new file mode 100644 index 00000000000..a4bc1194e49 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: mat_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html new file mode 100644 index 00000000000..8e979b3cd95 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: mat_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html new file mode 100644 index 00000000000..fd59d1b9329 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_017_to_024.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: mat_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html new file mode 100644 index 00000000000..f090bd761ed --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_025_to_032.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: mat_025_to_032.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html new file mode 100644 index 00000000000..f1dd2fe4b2f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_033_to_040.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: mat_033_to_040.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html new file mode 100644 index 00000000000..570e6904624 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat/mat_041_to_046.html @@ -0,0 +1,203 @@ + + + + + +WebGL GLSL conformance test: mat_041_to_046.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/input.run.txt new file mode 100644 index 00000000000..f79e127c276 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html new file mode 100644 index 00000000000..be179ececf3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3_001_to_006.html @@ -0,0 +1,365 @@ + + + + + +WebGL GLSL conformance test: mat3_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_frag.frag new file mode 100644 index 00000000000..f5c7dac7ba0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect0_vert.vert new file mode 100644 index 00000000000..d6d1f971a1d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_frag.frag new file mode 100644 index 00000000000..23bc15d1dee --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arrayindirect1_vert.vert new file mode 100644 index 00000000000..e23890384e6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_frag.frag new file mode 100644 index 00000000000..7bca3f11ea5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mat3/mat3arraysimple_vert.vert new file mode 100644 index 00000000000..53887e9a9f1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/input.run.txt new file mode 100644 index 00000000000..91d20c86eb8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html new file mode 100644 index 00000000000..4a3d580cb5d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixCompMult_001_to_004.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: matrixCompMult_001_to_004.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag.frag new file mode 100644 index 00000000000..8db7ddf3df3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_frag_ref.frag new file mode 100644 index 00000000000..fed33bea1af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert.vert new file mode 100644 index 00000000000..e912de35c85 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat2_vert_ref.vert new file mode 100644 index 00000000000..cda02927d1b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag.frag new file mode 100644 index 00000000000..dfc55262ca9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_frag_ref.frag new file mode 100644 index 00000000000..21365a0dcc6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert.vert new file mode 100644 index 00000000000..5c250873150 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/matrixCompMult/matrixMultComp_mat3_vert_ref.vert new file mode 100644 index 00000000000..336db100c08 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/input.run.txt new file mode 100644 index 00000000000..552692d6781 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html new file mode 100644 index 00000000000..fc89b533253 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: max_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..1dc58237564 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..44188757ee4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..18df63489a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_float_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..44602be927b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..12cccbaf5a2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..63d52b2ff0c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..54a94edf52a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec2_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..b8ad06aa831 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..b44d0c85135 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..d17d8cdea45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..549f510fc31 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/max/max_vec3_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..84de202744b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/input.run.txt new file mode 100644 index 00000000000..5c675deae6d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html new file mode 100644 index 00000000000..e0330ab9512 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: min_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..fdc3e23a67d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..acf1eebb266 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..b854733dd5b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_float_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..73849e092c5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..ea5563eb19e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..82ae1b891ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..ae6459783d4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec2_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..1f8d54b3a51 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..80232206f99 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..2432efe93a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..96629e770a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/min/min_vec3_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..65d273dc3d1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/input.run.txt new file mode 100644 index 00000000000..f1c7ead9805 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html new file mode 100644 index 00000000000..a9f4de17797 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: mix_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 00000000000..c04c6ba63f8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_frag_xvary_yconsthalf_aconsthalf_ref.frag b/tests/wpt/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 00000000000..74f96295902 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 00000000000..bce9965068d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_float_vert_xvary_yconsthalf_aconsthalf_ref.vert b/tests/wpt/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 00000000000..adce952197a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 00000000000..4578aa893fa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_frag_xvary_yconsthalf_aconsthalf_ref.frag b/tests/wpt/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 00000000000..b75166792d3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 00000000000..ffdbd26777f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec2_vert_xvary_yconsthalf_aconsthalf_ref.vert b/tests/wpt/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 00000000000..38d2de72799 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf.frag new file mode 100644 index 00000000000..fef30dcedcb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_frag_xvary_yconsthalf_aconsthalf_ref.frag b/tests/wpt/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 00000000000..fda46efc75f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf.vert new file mode 100644 index 00000000000..690f41ec993 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mix/mix_vec3_vert_xvary_yconsthalf_aconsthalf_ref.vert b/tests/wpt/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 00000000000..d9dec9bbba9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/input.run.txt new file mode 100644 index 00000000000..d369e576f84 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html new file mode 100644 index 00000000000..5c202b01d06 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_001_to_008.html @@ -0,0 +1,181 @@ + + + + + +WebGL GLSL conformance test: mod_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1.frag new file mode 100644 index 00000000000..9f22543d9bc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_frag_xvary_yconst1_ref.frag new file mode 100644 index 00000000000..2c35298a701 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1.vert new file mode 100644 index 00000000000..17d54ce2125 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_float_vert_xvary_yconst1_ref.vert new file mode 100644 index 00000000000..ad6fc8185ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1.frag new file mode 100644 index 00000000000..335b8ff4904 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_frag_xvary_yconst1_ref.frag new file mode 100644 index 00000000000..143a832ff90 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1.vert new file mode 100644 index 00000000000..dad066a142b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec2_vert_xvary_yconst1_ref.vert new file mode 100644 index 00000000000..1f583fd97dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1.frag new file mode 100644 index 00000000000..1b8bd31d2d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_frag_xvary_yconst1_ref.frag new file mode 100644 index 00000000000..6f934b60181 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1.vert new file mode 100644 index 00000000000..468dd4d3a10 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_vec3_vert_xvary_yconst1_ref.vert new file mode 100644 index 00000000000..1eb6c4ffc49 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_frag.frag new file mode 100644 index 00000000000..a56c581252e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/mod/mod_x_large_y_large_vert.vert new file mode 100644 index 00000000000..0327f8f1da5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/input.run.txt new file mode 100644 index 00000000000..56ce6dcbe73 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html new file mode 100644 index 00000000000..1ad4e5883a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: normalize_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary.frag new file mode 100644 index 00000000000..9d07f0390ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..1e96c743e2f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary.vert new file mode 100644 index 00000000000..81e999b8bd1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..29e23f5cb59 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary.frag new file mode 100644 index 00000000000..be1756b5bb6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..0e4e031ea60 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary.vert new file mode 100644 index 00000000000..4bea42efd6e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..b03a2c70b6e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary.frag new file mode 100644 index 00000000000..3f7e6eb1d9e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..62f0cea72f4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary.vert new file mode 100644 index 00000000000..33121c03487 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/normalize/normalize_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..665730a3df8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/input.run.txt new file mode 100644 index 00000000000..89038b74454 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html new file mode 100644 index 00000000000..c749f2a70f5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_001_to_004.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: not_001_to_004.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag.frag new file mode 100644 index 00000000000..129ba6669ed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_frag_ref.frag new file mode 100644 index 00000000000..3a94ec0faab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert.vert new file mode 100644 index 00000000000..3fb1ff9722d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec2_vert_ref.vert new file mode 100644 index 00000000000..974d7864517 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag.frag new file mode 100644 index 00000000000..8b2d4e3e9ee --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_frag_ref.frag new file mode 100644 index 00000000000..2172e768377 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert.vert new file mode 100644 index 00000000000..554724cb63e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/not/not_bvec3_vert_ref.vert new file mode 100644 index 00000000000..d2a4a5d2e50 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/input.run.txt new file mode 100644 index 00000000000..9bc23768eaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html new file mode 100644 index 00000000000..77037cf9da3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: notEqual_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html new file mode 100644 index 00000000000..63d7127c9fa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_009_to_012.html @@ -0,0 +1,105 @@ + + + + + +WebGL GLSL conformance test: notEqual_009_to_012.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag.frag new file mode 100644 index 00000000000..a655860a6d2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_frag_ref.frag new file mode 100644 index 00000000000..6d009d10a1b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert.vert new file mode 100644 index 00000000000..9d0e5062437 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec2_vert_ref.vert new file mode 100644 index 00000000000..4529bfc401b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag.frag new file mode 100644 index 00000000000..2f3b4f4e162 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_frag_ref.frag new file mode 100644 index 00000000000..1eaab0520f4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert.vert new file mode 100644 index 00000000000..a4599ec0b34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_bvec3_vert_ref.vert new file mode 100644 index 00000000000..2d54c8f4c90 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag.frag new file mode 100644 index 00000000000..cf10bdc4dfd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_frag_ref.frag new file mode 100644 index 00000000000..e5102a7f452 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert.vert new file mode 100644 index 00000000000..751831fdb46 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec2_vert_ref.vert new file mode 100644 index 00000000000..6ec10073f1c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag.frag new file mode 100644 index 00000000000..6559eb0a026 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_frag_ref.frag new file mode 100644 index 00000000000..b63e5d72223 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert.vert new file mode 100644 index 00000000000..02c5818bea0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_ivec3_vert_ref.vert new file mode 100644 index 00000000000..a0cf5eb28ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag.frag new file mode 100644 index 00000000000..ccf27b52bfd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_frag_ref.frag new file mode 100644 index 00000000000..d76c69cf28a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert.vert new file mode 100644 index 00000000000..7544d3f6d02 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec2_vert_ref.vert new file mode 100644 index 00000000000..673f0b271aa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag.frag new file mode 100644 index 00000000000..55fdd1a6e3c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_frag_ref.frag new file mode 100644 index 00000000000..a55f8a12716 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert.vert new file mode 100644 index 00000000000..94f0bc4ca00 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/notEqual/notEqual_vec3_vert_ref.vert new file mode 100644 index 00000000000..336c1134529 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_frag.frag new file mode 100644 index 00000000000..2967fc0d00a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/addsubtract_vert.vert new file mode 100644 index 00000000000..4eaa2f93d63 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_frag.frag new file mode 100644 index 00000000000..43694b09109 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/assignments_vert.vert new file mode 100644 index 00000000000..b35cb6c0ffa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_frag.frag new file mode 100644 index 00000000000..e65ab2e474c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/division_vert.vert new file mode 100644 index 00000000000..3c963988401 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_frag.frag new file mode 100644 index 00000000000..a8a5d471b5d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/equality_vert.vert new file mode 100644 index 00000000000..34ef88e6270 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/input.run.txt new file mode 100644 index 00000000000..b6e176588bf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_frag.frag new file mode 100644 index 00000000000..12b73de9c9c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/logical_vert.vert new file mode 100644 index 00000000000..8733bf779b5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_frag.frag new file mode 100644 index 00000000000..dd23c5b132c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/multiplicative_vert.vert new file mode 100644 index 00000000000..138b12d9c75 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html new file mode 100644 index 00000000000..7c20383bcb9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: operators_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html new file mode 100644 index 00000000000..80de22017ba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: operators_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html new file mode 100644 index 00000000000..4c55884d670 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_017_to_024.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: operators_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html new file mode 100644 index 00000000000..5536c5cf5e1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/operators_025_to_026.html @@ -0,0 +1,103 @@ + + + + + +WebGL GLSL conformance test: operators_025_to_026.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_frag.frag new file mode 100644 index 00000000000..70da817094f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixdecrement_vert.vert new file mode 100644 index 00000000000..27782385e65 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_frag.frag new file mode 100644 index 00000000000..0fecc5d2dc3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/postfixincrement_vert.vert new file mode 100644 index 00000000000..30fa784e95b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_frag.frag new file mode 100644 index 00000000000..92b04b78556 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixdecrement_vert.vert new file mode 100644 index 00000000000..4509b9b41a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_frag.frag new file mode 100644 index 00000000000..534b826a974 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/prefixincrement_vert.vert new file mode 100644 index 00000000000..4b51c6a32f9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_frag.frag new file mode 100644 index 00000000000..fe2716d0d2b --- /dev/null +++ b/tests/wpt/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 = (mk); + 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/relational_vert.vert new file mode 100644 index 00000000000..322bb841687 --- /dev/null +++ b/tests/wpt/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 = (mk); + 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/operators/selection_frag.frag new file mode 100644 index 00000000000..9611e2c101e --- /dev/null +++ b/tests/wpt/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 ); + (yk)?( result1 = true ):( result1 = false ); + (y + + + + +WebGL GLSL conformance test: pow_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html new file mode 100644 index 00000000000..d91fd648e85 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_009_to_016.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: pow_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html new file mode 100644 index 00000000000..ff261e0057c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_017_to_024.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: pow_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary.frag new file mode 100644 index 00000000000..dc2534ce429 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconst2_yvary_ref.frag new file mode 100644 index 00000000000..8e2cd4eefea --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary.frag new file mode 100644 index 00000000000..60d20306ae3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xconsthalf_yvary_ref.frag new file mode 100644 index 00000000000..96be455a3c9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2.frag new file mode 100644 index 00000000000..8682a0e9f38 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconst2_ref.frag new file mode 100644 index 00000000000..0b82bded596 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..e071d29a594 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..5ff3ddbe9f7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary.vert new file mode 100644 index 00000000000..83f22bb80db --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconst2_yvary_ref.vert new file mode 100644 index 00000000000..130327c6ee2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary.vert new file mode 100644 index 00000000000..0533c7560bb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xconsthalf_yvary_ref.vert new file mode 100644 index 00000000000..fe9bdc84eeb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2.vert new file mode 100644 index 00000000000..f0be45abe88 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconst2_ref.vert new file mode 100644 index 00000000000..f76054b2ba2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..7609fa58991 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_float_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..f58d044b212 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary.frag new file mode 100644 index 00000000000..e47822c0a89 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconst2_yvary_ref.frag new file mode 100644 index 00000000000..30b36043597 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary.frag new file mode 100644 index 00000000000..67daa472056 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xconsthalf_yvary_ref.frag new file mode 100644 index 00000000000..e7cc4c966ff --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2.frag new file mode 100644 index 00000000000..6ae78c70dcd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconst2_ref.frag new file mode 100644 index 00000000000..0540ebe0f5a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..196535a8c61 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..cb591dc5f77 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary.vert new file mode 100644 index 00000000000..ec59a85bc42 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconst2_yvary_ref.vert new file mode 100644 index 00000000000..35f12854d18 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary.vert new file mode 100644 index 00000000000..ab3c56d49ed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xconsthalf_yvary_ref.vert new file mode 100644 index 00000000000..d5a1a620288 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2.vert new file mode 100644 index 00000000000..0411d3f0eba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconst2_ref.vert new file mode 100644 index 00000000000..c83de730290 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..80e7e176b86 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec2_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..abf19d3b0ec --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary.frag new file mode 100644 index 00000000000..7aa24fb92c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconst2_yvary_ref.frag new file mode 100644 index 00000000000..339406c5e32 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary.frag new file mode 100644 index 00000000000..7b35c866440 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xconsthalf_yvary_ref.frag new file mode 100644 index 00000000000..9000d040fad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2.frag new file mode 100644 index 00000000000..319fb17a840 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconst2_ref.frag new file mode 100644 index 00000000000..439476d7031 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf.frag new file mode 100644 index 00000000000..82b120f153d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_frag_xvary_yconsthalf_ref.frag new file mode 100644 index 00000000000..407bc1db273 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary.vert new file mode 100644 index 00000000000..875ff7f9325 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconst2_yvary_ref.vert new file mode 100644 index 00000000000..155519ef171 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary.vert new file mode 100644 index 00000000000..ebb4c42a5c4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xconsthalf_yvary_ref.vert new file mode 100644 index 00000000000..d797011e1af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2.vert new file mode 100644 index 00000000000..38ef59d3e16 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconst2_ref.vert new file mode 100644 index 00000000000..0cd2ef6ff58 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf.vert new file mode 100644 index 00000000000..3ab23619965 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/pow/pow_vec3_vert_xvary_yconsthalf_ref.vert new file mode 100644 index 00000000000..da90056737b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/input.run.txt new file mode 100644 index 00000000000..891a82745f9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html new file mode 100644 index 00000000000..c369bc843cf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: radians_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary.frag new file mode 100644 index 00000000000..141c45d5323 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..5e9ba0b4586 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary.vert new file mode 100644 index 00000000000..8a858b641ed --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..2c21ac03437 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary.frag new file mode 100644 index 00000000000..594e26ac016 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..6c95619e320 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary.vert new file mode 100644 index 00000000000..b232f5646c2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..9530c8b3f67 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary.frag new file mode 100644 index 00000000000..5cebc76b712 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..3026b494c4a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary.vert new file mode 100644 index 00000000000..7f91ba40401 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/radians/radians_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..74cad8da0bc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/input.run.txt new file mode 100644 index 00000000000..b32c960e6c9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html new file mode 100644 index 00000000000..fa9b9ff21cc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: reflect_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst.frag new file mode 100644 index 00000000000..23780bbec2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..7c9a07eb58c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst.vert new file mode 100644 index 00000000000..1881b976c2c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_float_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..3b6162907c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst.frag new file mode 100644 index 00000000000..d614676d8e0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..07a4a7c74b7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst.vert new file mode 100644 index 00000000000..5f1e20ed116 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec2_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..dee1b983c7e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst.frag new file mode 100644 index 00000000000..a7287f2304a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..cd141895823 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst.vert new file mode 100644 index 00000000000..f375b86a4d4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/reflect/reflect_vec3_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..58a9b84f95f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/input.run.txt new file mode 100644 index 00000000000..c7deedd54c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html new file mode 100644 index 00000000000..54be58ed849 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: refract_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst.frag new file mode 100644 index 00000000000..6cd7faa0100 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..a0159b0f518 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst.vert new file mode 100644 index 00000000000..83dcb5930dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_float_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..31826c6c25f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst.frag new file mode 100644 index 00000000000..189a168f82e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..bad139c37e7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst.vert new file mode 100644 index 00000000000..62b77e91c8c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec2_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..d01fb22ba9f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst.frag new file mode 100644 index 00000000000..421cf9b5813 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_frag_ivarynconst_ref.frag new file mode 100644 index 00000000000..16be25c1da3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst.vert new file mode 100644 index 00000000000..6423ca40e4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/refract/refract_vec3_vert_ivarynconst_ref.vert new file mode 100644 index 00000000000..0fa9b7cbcaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/input.run.txt new file mode 100644 index 00000000000..b22bf9d68e2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html new file mode 100644 index 00000000000..345eeff4f4c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: sign_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary.frag new file mode 100644 index 00000000000..0a3fcd169cd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..082dea1d1d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary.vert new file mode 100644 index 00000000000..e2a048f3480 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..7646fb73662 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary.frag new file mode 100644 index 00000000000..3dbdde2079e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..08a6c3d0343 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary.vert new file mode 100644 index 00000000000..fde1a269c83 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..000159fc54f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary.frag new file mode 100644 index 00000000000..21b915804c5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..ef1123e9144 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary.vert new file mode 100644 index 00000000000..991fbcad8c0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sign/sign_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..143f2ae0af2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/input.run.txt new file mode 100644 index 00000000000..2995c565885 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html new file mode 100644 index 00000000000..036caff279b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: sin_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary.frag new file mode 100644 index 00000000000..ce1bd224fd3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..331b426efbe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary.vert new file mode 100644 index 00000000000..e1fd79d7272 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..983193b6e76 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary.frag new file mode 100644 index 00000000000..6227170b3dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..031564337b0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary.vert new file mode 100644 index 00000000000..615eb679358 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..aef1f985a6a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary.frag new file mode 100644 index 00000000000..892e996e900 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..271f12a88a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary.vert new file mode 100644 index 00000000000..d60370e4509 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sin/sin_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..7c4571cb181 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/input.run.txt new file mode 100644 index 00000000000..4121dd5f8cf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html new file mode 100644 index 00000000000..ce062c398c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: smoothstep_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter.frag new file mode 100644 index 00000000000..f7b8ed3d5d5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_frag_xvary_edgeconstquarter_ref.frag new file mode 100644 index 00000000000..92e49f0f059 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter.vert new file mode 100644 index 00000000000..bf8ff22cce9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_float_vert_xvary_edgeconstquarter_ref.vert new file mode 100644 index 00000000000..55422bffd2f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter.frag new file mode 100644 index 00000000000..bd235720c5b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_frag_xvary_edgeconstquarter_ref.frag new file mode 100644 index 00000000000..8790241d9af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter.vert new file mode 100644 index 00000000000..06f12e32874 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec2_vert_xvary_edgeconstquarter_ref.vert new file mode 100644 index 00000000000..00b4f7a25c1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter.frag new file mode 100644 index 00000000000..e7ad681e780 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_frag_xvary_edgeconstquarter_ref.frag new file mode 100644 index 00000000000..e07971e0f39 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter.vert new file mode 100644 index 00000000000..e12ed931752 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/smoothstep/smoothstep_vec3_vert_xvary_edgeconstquarter_ref.vert new file mode 100644 index 00000000000..4798adb9073 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/input.run.txt new file mode 100644 index 00000000000..a151ee6448b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html new file mode 100644 index 00000000000..3a5b4de8804 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: sqrt_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary.frag new file mode 100644 index 00000000000..bb2604b1864 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..2055b814db8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary.vert new file mode 100644 index 00000000000..7982ebf2a1e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..eb4f1441377 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary.frag new file mode 100644 index 00000000000..e70a2ccbdfa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..4253e103457 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary.vert new file mode 100644 index 00000000000..30587af1d67 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..cb61ec8f079 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary.frag new file mode 100644 index 00000000000..b4d5c281cad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..1fb1f880a95 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary.vert new file mode 100644 index 00000000000..1e3c8beae77 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/sqrt/sqrt_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..e54f86babb1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/input.run.txt new file mode 100644 index 00000000000..6b8ac005dc5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html new file mode 100644 index 00000000000..27ee2cfacfc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: step_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf.frag new file mode 100644 index 00000000000..94e69d79c7c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 00000000000..b601eb78bfe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf.vert new file mode 100644 index 00000000000..2a3834f21d6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_float_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 00000000000..3db47cac60e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf.frag new file mode 100644 index 00000000000..93cc99fe2d3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 00000000000..d8d361010af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf.vert new file mode 100644 index 00000000000..d0df7388634 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec2_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 00000000000..11c5640e5aa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf.frag new file mode 100644 index 00000000000..87c64f539f9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_frag_xvary_edgeconsthalf_ref.frag new file mode 100644 index 00000000000..3d99682225a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf.vert new file mode 100644 index 00000000000..0ac85addc02 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/step/step_vec3_vert_xvary_edgeconsthalf_ref.vert new file mode 100644 index 00000000000..d85a52ebe7f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/input.run.txt new file mode 100644 index 00000000000..89c3da16ec0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_frag.frag new file mode 100644 index 00000000000..8f13ba1b19b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/nestedstructcomb_various_vert.vert new file mode 100644 index 00000000000..1c6338bc26e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html new file mode 100644 index 00000000000..994b23f3bc5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html new file mode 100644 index 00000000000..fcd04512f86 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html new file mode 100644 index 00000000000..9a7d25ead9b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_017_to_024.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html new file mode 100644 index 00000000000..dc9f40967c9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_025_to_032.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_025_to_032.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html new file mode 100644 index 00000000000..7f61d582878 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_033_to_040.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_033_to_040.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html new file mode 100644 index 00000000000..aa6e60874aa --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_041_to_048.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_041_to_048.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html new file mode 100644 index 00000000000..e9cc39acc58 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_049_to_056.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: struct_049_to_056.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_frag.frag new file mode 100644 index 00000000000..0f2386181aa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bool_vert.vert new file mode 100644 index 00000000000..97d40e0a15e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_frag.frag new file mode 100644 index 00000000000..9361a6fa2b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_bvec2bvec3bvec4_vert.vert new file mode 100644 index 00000000000..a40c4d74972 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_frag.frag new file mode 100644 index 00000000000..57139805bb2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_float_vert.vert new file mode 100644 index 00000000000..2bb966bf275 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_frag.frag new file mode 100644 index 00000000000..6274b72c18b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat2_vert.vert new file mode 100644 index 00000000000..2b07347b623 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_frag.frag new file mode 100644 index 00000000000..a3d1fd19305 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat3_vert.vert new file mode 100644 index 00000000000..c3c0ee0c5e0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_frag.frag new file mode 100644 index 00000000000..bae5878ae21 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_mat4_vert.vert new file mode 100644 index 00000000000..aea82c688d1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_frag.frag new file mode 100644 index 00000000000..a42d68747ef --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec2_vert.vert new file mode 100644 index 00000000000..a3660fe241d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_frag.frag new file mode 100644 index 00000000000..6e485e966dd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec3_vert.vert new file mode 100644 index 00000000000..e532d39563c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_frag.frag new file mode 100644 index 00000000000..85d19e8ac11 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/struct_vec4_vert.vert new file mode 100644 index 00000000000..f85a3ad8737 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_frag.frag new file mode 100644 index 00000000000..bcc8be4f71f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bool_vert.vert new file mode 100644 index 00000000000..6a5cc91bf32 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_frag.frag new file mode 100644 index 00000000000..b279f0948a9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_bvec2bvec3bvec4_vert.vert new file mode 100644 index 00000000000..2d315fe3856 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_frag.frag new file mode 100644 index 00000000000..b685fa4425b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_float_vert.vert new file mode 100644 index 00000000000..157e29221ea --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_frag.frag new file mode 100644 index 00000000000..38086d66503 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat2_vert.vert new file mode 100644 index 00000000000..9d1c3a9175c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_frag.frag new file mode 100644 index 00000000000..ff41c1c0f7e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat3_vert.vert new file mode 100644 index 00000000000..f6d8e90fffe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_frag.frag new file mode 100644 index 00000000000..6484dd1213b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_mat4_vert.vert new file mode 100644 index 00000000000..f01d4c9a22f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_frag.frag new file mode 100644 index 00000000000..56c15b6e907 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec2_vert.vert new file mode 100644 index 00000000000..1ec34123f3d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_frag.frag new file mode 100644 index 00000000000..7d0530c8113 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec3_vert.vert new file mode 100644 index 00000000000..a686f9c6d7f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_frag.frag new file mode 100644 index 00000000000..e628b8caf18 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structcopy_vec4_vert.vert new file mode 100644 index 00000000000..70f46538a91 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_frag.frag new file mode 100644 index 00000000000..4fe547d2bda --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bool_vert.vert new file mode 100644 index 00000000000..63e554ed5f4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_frag.frag new file mode 100644 index 00000000000..44ad71d0e56 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_bvec2bvec3bvec4_vert.vert new file mode 100644 index 00000000000..41485c25f2c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_frag.frag new file mode 100644 index 00000000000..8cb2e49b088 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_float_vert.vert new file mode 100644 index 00000000000..18b3353c2d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_frag.frag new file mode 100644 index 00000000000..d623090a120 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat2_vert.vert new file mode 100644 index 00000000000..770b63d74dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_frag.frag new file mode 100644 index 00000000000..5a963a931c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat3_vert.vert new file mode 100644 index 00000000000..25bd7cd2f60 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_frag.frag new file mode 100644 index 00000000000..01662141953 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_mat4_vert.vert new file mode 100644 index 00000000000..d1aeb61c867 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_frag.frag new file mode 100644 index 00000000000..9beed3ac49d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec2_vert.vert new file mode 100644 index 00000000000..d9db7a3573f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_frag.frag new file mode 100644 index 00000000000..6f23082574b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec3_vert.vert new file mode 100644 index 00000000000..b07d8f1fb16 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_frag.frag new file mode 100644 index 00000000000..0d365ea01e6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/struct/structnest_vec4_vert.vert new file mode 100644 index 00000000000..7dae13b129d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/input.run.txt new file mode 100644 index 00000000000..11fe45566aa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html new file mode 100644 index 00000000000..3dbab036817 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_001_to_008.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html new file mode 100644 index 00000000000..f6ae7de75ba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_009_to_016.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html new file mode 100644 index 00000000000..d2898580066 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_017_to_024.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_017_to_024.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html new file mode 100644 index 00000000000..6ec581ca61d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_025_to_032.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_025_to_032.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html new file mode 100644 index 00000000000..8850421ceee --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_033_to_040.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_033_to_040.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html new file mode 100644 index 00000000000..7f534fc21be --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_041_to_048.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_041_to_048.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html new file mode 100644 index 00000000000..9440071fba7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_049_to_056.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_049_to_056.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html new file mode 100644 index 00000000000..aca148e591f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_057_to_064.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_057_to_064.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html new file mode 100644 index 00000000000..270a5c7ee51 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_065_to_072.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_065_to_072.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html new file mode 100644 index 00000000000..7f21df7c48b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_073_to_080.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_073_to_080.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html new file mode 100644 index 00000000000..3ae60cb437a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_081_to_088.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_081_to_088.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html new file mode 100644 index 00000000000..1659c8603a2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_089_to_096.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_089_to_096.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html new file mode 100644 index 00000000000..9660f8faabf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_097_to_104.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_097_to_104.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html new file mode 100644 index 00000000000..4d0e7a50ea2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_105_to_112.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_105_to_112.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html new file mode 100644 index 00000000000..6cd1a86195e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/swizzlers_113_to_120.html @@ -0,0 +1,157 @@ + + + + + +WebGL GLSL conformance test: swizzlers_113_to_120.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_frag.frag new file mode 100644 index 00000000000..4729f7efe19 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_bgr_1vec3_vert.vert new file mode 100644 index 00000000000..b4caea0eeb6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_frag.frag new file mode 100644 index 00000000000..94b618626a7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_br_g_1vec2_1float_vert.vert new file mode 100644 index 00000000000..615ad13e2d1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_frag.frag new file mode 100644 index 00000000000..2b5c4c13b9a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_gb_r_1vec2_1float_vert.vert new file mode 100644 index 00000000000..99ea09fc418 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_frag.frag new file mode 100644 index 00000000000..18cac5c00ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_grb_1vec3_vert.vert new file mode 100644 index 00000000000..1b87fd8424b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_frag.frag new file mode 100644 index 00000000000..9519bcd1b91 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_ps_t_1vec2_1float_vert.vert new file mode 100644 index 00000000000..9ad785edab4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_frag.frag new file mode 100644 index 00000000000..2ae097c641c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_pts_1vec3_vert.vert new file mode 100644 index 00000000000..56dd2a5fdb4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_frag.frag new file mode 100644 index 00000000000..adf9042881c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rb_g_1vec2_1float_vert.vert new file mode 100644 index 00000000000..eba6b333724 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_frag.frag new file mode 100644 index 00000000000..25429ea75ac --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rg_b_1vec2_1float_vert.vert new file mode 100644 index 00000000000..ff44c4bd3a8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_frag.frag new file mode 100644 index 00000000000..6c783be7dfd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_rgb_1vec3_vert.vert new file mode 100644 index 00000000000..3cbb049d620 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_frag.frag new file mode 100644 index 00000000000..108d85653f0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_sp_t_1vec2_1float_vert.vert new file mode 100644 index 00000000000..4f3327c746f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_frag.frag new file mode 100644 index 00000000000..aee4b3ddd96 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_st_p_1vec2_1float_vert.vert new file mode 100644 index 00000000000..240354816a3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_frag.frag new file mode 100644 index 00000000000..a363ee8b410 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_stp_1vec3_vert.vert new file mode 100644 index 00000000000..985e8f29894 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_frag.frag new file mode 100644 index 00000000000..68c116336d2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tp_s_1vec2_1float_vert.vert new file mode 100644 index 00000000000..c6f48a25fc0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_frag.frag new file mode 100644 index 00000000000..8eb24f2e5e1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_tsp_1vec3_vert.vert new file mode 100644 index 00000000000..0a031f39510 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_frag.frag new file mode 100644 index 00000000000..0b3e4b8b86e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xy_z_1vec2_1float_vert.vert new file mode 100644 index 00000000000..03451256c0d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_frag.frag new file mode 100644 index 00000000000..20b6a6ba7a2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xyz_1vec3_vert.vert new file mode 100644 index 00000000000..ab46b50ff70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_frag.frag new file mode 100644 index 00000000000..e80787db287 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_xz_y_1vec2_1float_vert.vert new file mode 100644 index 00000000000..d747725f332 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_frag.frag new file mode 100644 index 00000000000..940a5f2c9c5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yxz_1vec3_vert.vert new file mode 100644 index 00000000000..ebe9e6e63d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_frag.frag new file mode 100644 index 00000000000..736e53ef96e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_yz_x_1vec2_1float_vert.vert new file mode 100644 index 00000000000..4e43c5be23a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_frag.frag new file mode 100644 index 00000000000..18d845ea57a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zx_y_1vec2_1float_vert.vert new file mode 100644 index 00000000000..121ca1f670c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_frag.frag new file mode 100644 index 00000000000..925cef8fa65 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec3_zyx_1vec3_vert.vert new file mode 100644 index 00000000000..aa1f2e2d1b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_frag.frag new file mode 100644 index 00000000000..70f238c7bc1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ar_bg_2vec2_vert.vert new file mode 100644 index 00000000000..4994e10937c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_frag.frag new file mode 100644 index 00000000000..ec8c9ef3869 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arb_g_1vec3_1float_vert.vert new file mode 100644 index 00000000000..fe1e74fed26 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_frag.frag new file mode 100644 index 00000000000..673828ad446 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_arbg_1vec4_vert.vert new file mode 100644 index 00000000000..e384b19ca2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_frag.frag new file mode 100644 index 00000000000..23edf0e74ca --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_bar_g_1vec3_1float_vert.vert new file mode 100644 index 00000000000..ab8b2b2dc18 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_frag.frag new file mode 100644 index 00000000000..f6515119ab7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_barg_1vec4_vert.vert new file mode 100644 index 00000000000..2142720d48f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_frag.frag new file mode 100644 index 00000000000..45c35f7b770 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_br_ag_2vec2_vert.vert new file mode 100644 index 00000000000..c181e0c0c91 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_frag.frag new file mode 100644 index 00000000000..116ea98ede3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gr_ab_2vec2_vert.vert new file mode 100644 index 00000000000..bb3993f1b78 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_frag.frag new file mode 100644 index 00000000000..8c0ebcba3d6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_gra_b_1vec3_1float_vert.vert new file mode 100644 index 00000000000..1ec63ed7510 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_frag.frag new file mode 100644 index 00000000000..c3d9bd446c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_grab_1vec4_vert.vert new file mode 100644 index 00000000000..85f8d0c7563 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_frag.frag new file mode 100644 index 00000000000..c93c7d9c791 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqs_t_1vec3_1float_vert.vert new file mode 100644 index 00000000000..1fa79b24bbe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_frag.frag new file mode 100644 index 00000000000..5fd159a9ecf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_pqst_1vec4_vert.vert new file mode 100644 index 00000000000..1a4d502a4d7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_frag.frag new file mode 100644 index 00000000000..0ec5014030e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ps_qt_2vec2_vert.vert new file mode 100644 index 00000000000..7b6f4394d8a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_frag.frag new file mode 100644 index 00000000000..5ad2f2a99a5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qs_pt_2vec2_vert.vert new file mode 100644 index 00000000000..0f36642aca0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_frag.frag new file mode 100644 index 00000000000..edcdcc93998 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qsp_t_1vec3_1float_vert.vert new file mode 100644 index 00000000000..cdf2a3934af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_frag.frag new file mode 100644 index 00000000000..b71f46821c8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_qspt_1vec4_vert.vert new file mode 100644 index 00000000000..dec21c445de --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_frag.frag b/tests/wpt/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 00000000000..59fe5e4ebf3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_r_g_b_a_4float_vert.vert b/tests/wpt/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 00000000000..bd69ccbe2ea --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_frag.frag new file mode 100644 index 00000000000..25cbce4af20 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rg_ba_2vec2_vert.vert new file mode 100644 index 00000000000..1b1fa0e2593 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_frag.frag new file mode 100644 index 00000000000..2a433f0729a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgb_a_1vec3_1float_vert.vert new file mode 100644 index 00000000000..68e1a75b962 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_frag.frag new file mode 100644 index 00000000000..fddd35f4efa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_rgba_1vec4_vert.vert new file mode 100644 index 00000000000..adf605add96 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_frag.frag b/tests/wpt/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 00000000000..4a388571840 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_s_t_p_q_4float_vert.vert b/tests/wpt/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 00000000000..689d7d5e7db --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_frag.frag new file mode 100644 index 00000000000..37de3144155 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_st_pq_2vec2_vert.vert new file mode 100644 index 00000000000..9c57a8d5da4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_frag.frag new file mode 100644 index 00000000000..74a2d98133b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stp_q_1vec3_1float_vert.vert new file mode 100644 index 00000000000..93316f4ebdc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_frag.frag new file mode 100644 index 00000000000..b42f676c284 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_stpq_1vec4_vert.vert new file mode 100644 index 00000000000..e8496216389 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_frag.frag new file mode 100644 index 00000000000..81d0648b3bf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_ts_qp_2vec2_vert.vert new file mode 100644 index 00000000000..d433805fd58 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_frag.frag new file mode 100644 index 00000000000..7d3014b2678 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsq_p_1vec3_1float_vert.vert new file mode 100644 index 00000000000..c30c6aa9529 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_frag.frag new file mode 100644 index 00000000000..82fe0de6877 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_tsqp_1vec4_vert.vert new file mode 100644 index 00000000000..7296ff0ae9a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_frag.frag new file mode 100644 index 00000000000..f94933ca4a7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wx_zy_2vec2_vert.vert new file mode 100644 index 00000000000..dd3af2d9f86 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_frag.frag new file mode 100644 index 00000000000..e594be66a4a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxz_y_1vec3_1float_vert.vert new file mode 100644 index 00000000000..3229f29aab7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_frag.frag new file mode 100644 index 00000000000..357ae8fceaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_wxzy_1vec4_vert.vert new file mode 100644 index 00000000000..147c13482ca --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_frag.frag b/tests/wpt/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 00000000000..26e24a171ab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_x_y_z_w_4float_vert.vert b/tests/wpt/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 00000000000..1b70abe6dca --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_frag.frag new file mode 100644 index 00000000000..2328a66d43f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xy_zw_2vec2_vert.vert new file mode 100644 index 00000000000..b0b7c276c57 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_frag.frag new file mode 100644 index 00000000000..f3a731f2b15 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyz_w_1vec3_1float_vert.vert new file mode 100644 index 00000000000..8ae968d1840 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_frag.frag new file mode 100644 index 00000000000..5aa9952c49b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_xyzw_1vec4_vert.vert new file mode 100644 index 00000000000..71b245113d4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_frag.frag new file mode 100644 index 00000000000..9353fac0388 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yx_wz_2vec2_vert.vert new file mode 100644 index 00000000000..0d05df10109 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_frag.frag new file mode 100644 index 00000000000..0b2675d816f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxw_z_1vec3_1float_vert.vert new file mode 100644 index 00000000000..00f5f2e7e84 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_frag.frag new file mode 100644 index 00000000000..8e6fd39d498 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_yxwz_1vec4_vert.vert new file mode 100644 index 00000000000..99bf91c1ee9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_frag.frag new file mode 100644 index 00000000000..07c47e31b70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwx_y_1vec3_1float_vert.vert new file mode 100644 index 00000000000..9bb3028ebc6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_frag.frag new file mode 100644 index 00000000000..2ef1689ca7d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zwxy_1vec4_vert.vert new file mode 100644 index 00000000000..106077653f5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_frag.frag new file mode 100644 index 00000000000..32bb27036e6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/swizzlers/vec4_zx_wy_2vec2_vert.vert new file mode 100644 index 00000000000..ff8513507e2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/input.run.txt new file mode 100644 index 00000000000..443a00f7001 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html new file mode 100644 index 00000000000..a3855f74867 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_001_to_006.html @@ -0,0 +1,131 @@ + + + + + +WebGL GLSL conformance test: tan_001_to_006.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary.frag new file mode 100644 index 00000000000..f5c02d0457a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_frag_xvary_ref.frag new file mode 100644 index 00000000000..65a820e13eb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary.vert new file mode 100644 index 00000000000..501b5725fe8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_float_vert_xvary_ref.vert new file mode 100644 index 00000000000..97cd3cca258 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary.frag new file mode 100644 index 00000000000..759e622e95e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_frag_xvary_ref.frag new file mode 100644 index 00000000000..0b427094bdd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary.vert new file mode 100644 index 00000000000..9bb1d5b0fdb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec2_vert_xvary_ref.vert new file mode 100644 index 00000000000..fdd63bc2e6d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary.frag new file mode 100644 index 00000000000..5e442b591a9 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_frag_xvary_ref.frag new file mode 100644 index 00000000000..09d152b2518 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary.vert new file mode 100644 index 00000000000..66929bae675 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/tan/tan_vec3_vert_xvary_ref.vert new file mode 100644 index 00000000000..fd99616bac6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_frag.frag new file mode 100644 index 00000000000..91f6ba06950 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/bvec4_2int_2float_vert.vert new file mode 100644 index 00000000000..9a672e0ef73 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/input.run.txt new file mode 100644 index 00000000000..e5ba07f12c5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_frag.frag new file mode 100644 index 00000000000..a603bad89cb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/ivec3_3int_vert.vert new file mode 100644 index 00000000000..81d0b3701ff --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_frag.frag new file mode 100644 index 00000000000..d2b17980a70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_2float_vert.vert new file mode 100644 index 00000000000..0a1854c8129 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_frag.frag new file mode 100644 index 00000000000..6dae4e49bd1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec2_vec3_vert.vert new file mode 100644 index 00000000000..b0be5bb6f25 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_frag.frag new file mode 100644 index 00000000000..50f3b951b9c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_float_vec2_vert.vert new file mode 100644 index 00000000000..cb6dbca18ff --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_frag.frag new file mode 100644 index 00000000000..d093aa29fdd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec2_float_vert.vert new file mode 100644 index 00000000000..21da106893c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_frag.frag new file mode 100644 index 00000000000..b0c8e3b6cfe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec3_vec4_vert.vert new file mode 100644 index 00000000000..60e3e4d79a3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_frag.frag new file mode 100644 index 00000000000..15ce47066dc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_ivec4_vert.vert new file mode 100644 index 00000000000..510fd123a32 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_frag.frag new file mode 100644 index 00000000000..6e330f797af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec4_vec3_float_vert.vert new file mode 100644 index 00000000000..3ad46ce59d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html new file mode 100644 index 00000000000..307d8500d52 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_001_to_008.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: vec_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html new file mode 100644 index 00000000000..f66ce63b49c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_009_to_016.html @@ -0,0 +1,253 @@ + + + + + +WebGL GLSL conformance test: vec_009_to_016.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html new file mode 100644 index 00000000000..d9451df749d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec/vec_017_to_018.html @@ -0,0 +1,103 @@ + + + + + +WebGL GLSL conformance test: vec_017_to_018.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/input.run.txt new file mode 100644 index 00000000000..1d1f9189d7f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html new file mode 100644 index 00000000000..ab222c39335 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3_001_to_008.html @@ -0,0 +1,335 @@ + + + + + +WebGL GLSL conformance test: vec3_001_to_008.html + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_frag.frag new file mode 100644 index 00000000000..4e79fa7353a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3array_vert.vert new file mode 100644 index 00000000000..7a45f45b08e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_frag.frag new file mode 100644 index 00000000000..ac74a0c1c87 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arraydirect_vert.vert new file mode 100644 index 00000000000..203a6f0bcf1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_frag.frag new file mode 100644 index 00000000000..0f7a74ef10a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3arrayindirect_vert.vert new file mode 100644 index 00000000000..8b4e1ededa8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_frag.frag new file mode 100644 index 00000000000..7096a0f1c34 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL/vec3/vec3single_vert.vert new file mode 100644 index 00000000000..2755eebb22e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.frag new file mode 100644 index 00000000000..dc65a5a7183 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/compressed_paletted_texture/compressed_paletted_texture.vert new file mode 100644 index 00000000000..16a2c2a72b6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.frag new file mode 100644 index 00000000000..e605bf75854 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.frag new file mode 100644 index 00000000000..6cae5b9557d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdx/dFdx_frag_ref.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.frag new file mode 100644 index 00000000000..dfeb3db7c15 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag.vert new file mode 100644 index 00000000000..a373ce62499 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.frag new file mode 100644 index 00000000000..1036de45551 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/dFdy/dFdy_frag_ref.vert new file mode 100644 index 00000000000..a373ce62499 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default.vert new file mode 100644 index 00000000000..4cb92aa773d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.frag new file mode 100644 index 00000000000..8db3c6954f7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/default_shaders/default_textured.vert new file mode 100644 index 00000000000..1b5b7831a46 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.frag new file mode 100644 index 00000000000..cae6f567444 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.frag new file mode 100644 index 00000000000..023f07111a1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dx.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.frag new file mode 100644 index 00000000000..24e6be01333 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_dy.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.frag new file mode 100644 index 00000000000..6dc825a7865 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.frag new file mode 100644 index 00000000000..5f7173c3e88 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dx.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.frag new file mode 100644 index 00000000000..1f25729b44e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2ExtensionTests/fwidth/fwidth_frag_ref_dy.vert new file mode 100644 index 00000000000..19f17bd5edc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.frag new file mode 100644 index 00000000000..b25540e1e6e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects.vert new file mode 100644 index 00000000000..3c0c0e0764a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.frag new file mode 100644 index 00000000000..30115c372b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_multitexturing.vert new file mode 100644 index 00000000000..a327a7e0d86 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/buffer_objects/buffer_objects_pointSize.vert new file mode 100644 index 00000000000..2811521b7fb --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/copy_texture/copy_texture.frag new file mode 100644 index 00000000000..3fc499ba0b0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default.vert new file mode 100644 index 00000000000..72e83fd0322 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.frag new file mode 100644 index 00000000000..8db3c6954f7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/default_shaders/default_textured.vert new file mode 100644 index 00000000000..1b5b7831a46 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.frag new file mode 100644 index 00000000000..2f751e7062b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse.vert new file mode 100644 index 00000000000..aafe53fbba4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/lighting_diffuse/lighting_diffuse_ref.vert new file mode 100644 index 00000000000..da6387dcc67 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.frag new file mode 100644 index 00000000000..e9d460fb20c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_rasterization/point_rasterization.vert new file mode 100644 index 00000000000..5ff01258741 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.frag new file mode 100644 index 00000000000..96a04a9ce24 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/point_sprites/point_sprites.vert new file mode 100644 index 00000000000..a85dd66bb8a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.frag new file mode 100644 index 00000000000..f91d4b0e8d5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2FixedTests/user_clip_planes/user_clip_planes.vert new file mode 100644 index 00000000000..ed27fe77e45 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_frag.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/attach_shader/unsuccessfulcompile_vert.vert new file mode 100644 index 00000000000..c73892a4cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.frag new file mode 100644 index 00000000000..870d53d0533 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/bind_attribute_location/brick.vert new file mode 100644 index 00000000000..8895eba8810 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/brick.vert new file mode 100644 index 00000000000..c73892a4cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/texture.frag new file mode 100644 index 00000000000..c37982eb2a6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/compile_shader/wood.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/delete_object/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/detach_shader/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.frag new file mode 100644 index 00000000000..92e465d7e3b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/framebuffer_objects/fboShader0.vert new file mode 100644 index 00000000000..97b4bcf81bd --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat2.vert new file mode 100644 index 00000000000..2f30ce65417 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat3.vert new file mode 100644 index 00000000000..6653570d694 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_mat4.vert new file mode 100644 index 00000000000..41cbc95b24f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_attribute/brick_vec.vert new file mode 100644 index 00000000000..cbb971545b2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.frag new file mode 100644 index 00000000000..41c8d30a202 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_active_uniform/brick.vert new file mode 100644 index 00000000000..cc24e815f70 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.frag new file mode 100644 index 00000000000..2bec40d3cf1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_attribute_location/brick.vert new file mode 100644 index 00000000000..2a94ead4fbc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_handle/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/get_uniform_location/brick.vert new file mode 100644 index 00000000000..24227d48f74 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.frag new file mode 100644 index 00000000000..99c78e20739 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramInfoLog_2.0/simple.vert new file mode 100644 index 00000000000..cc4028a5f7d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetProgramiv_2.0/brick.vert new file mode 100644 index 00000000000..24227d48f74 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.frag new file mode 100644 index 00000000000..99c78e20739 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetShaderInfoLog_2.0/simple.vert new file mode 100644 index 00000000000..cc4028a5f7d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.frag new file mode 100644 index 00000000000..5ca53807ea2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/bvec_tests.vert new file mode 100644 index 00000000000..1d9153361e3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.frag new file mode 100644 index 00000000000..6d7e37eba35 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/ivec_tests.vert new file mode 100644 index 00000000000..d854d0f4b4b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.frag new file mode 100644 index 00000000000..ea3f8599515 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/mat_tests.vert new file mode 100644 index 00000000000..f3f6e0dcc75 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.frag new file mode 100644 index 00000000000..e3f2c84db2c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetUniform/vec_tests.vert new file mode 100644 index 00000000000..86138149d75 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests.vert new file mode 100644 index 00000000000..e9b83a49094 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/mat_tests2.vert new file mode 100644 index 00000000000..2d0fbeea7d1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glGetVertexAttrib/vec_tests.vert new file mode 100644 index 00000000000..fc870e7393f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_frag.frag new file mode 100644 index 00000000000..a8d9f3fe430 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.frag new file mode 100644 index 00000000000..ba62f2f2d93 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1b_vert.vert new file mode 100644 index 00000000000..a28e76a77ad --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_frag.frag new file mode 100644 index 00000000000..9156be3c0ae --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.frag new file mode 100644 index 00000000000..ac8f2b4ccaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1f_vert.vert new file mode 100644 index 00000000000..06699439726 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_frag.frag new file mode 100644 index 00000000000..35d70bce9ce --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.frag new file mode 100644 index 00000000000..ac8f2b4ccaa --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/1i_vert.vert new file mode 100644 index 00000000000..7f22a96747d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21f_frag.frag new file mode 100644 index 00000000000..c60e5e07d60 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/21i_frag.frag new file mode 100644 index 00000000000..16960a59bab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22f_frag.frag new file mode 100644 index 00000000000..dd823e36172 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/22i_frag.frag new file mode 100644 index 00000000000..67577430b14 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23f_frag.frag new file mode 100644 index 00000000000..8d7a6c3ba68 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/23i_frag.frag new file mode 100644 index 00000000000..c4574b87078 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24f_frag.frag new file mode 100644 index 00000000000..5363d5e4970 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/24i_frag.frag new file mode 100644 index 00000000000..8427354158f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_frag.frag new file mode 100644 index 00000000000..83e9039ca81 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.frag new file mode 100644 index 00000000000..7ce39a19131 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2b_vert.vert new file mode 100644 index 00000000000..b4096752887 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_frag.frag new file mode 100644 index 00000000000..655e0d31d64 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.frag new file mode 100644 index 00000000000..14a4b29599f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2f_vert.vert new file mode 100644 index 00000000000..41ecaf70ebf --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_frag.frag new file mode 100644 index 00000000000..edb986a0b4f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.frag new file mode 100644 index 00000000000..14a4b29599f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2i_vert.vert new file mode 100644 index 00000000000..8cd247668f3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/2m_frag.frag new file mode 100644 index 00000000000..98e98ac4a5e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_frag.frag new file mode 100644 index 00000000000..80f1ef9f871 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.frag new file mode 100644 index 00000000000..be8e7b195fe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3b_vert.vert new file mode 100644 index 00000000000..d74e4a37f55 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_frag.frag new file mode 100644 index 00000000000..00e8aa71d2e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.frag new file mode 100644 index 00000000000..603ba0d6537 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3f_vert.vert new file mode 100644 index 00000000000..d35becff12f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_frag.frag new file mode 100644 index 00000000000..a2f0a3cddbe --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.frag new file mode 100644 index 00000000000..603ba0d6537 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3i_vert.vert new file mode 100644 index 00000000000..d27c38f5886 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/3m_frag.frag new file mode 100644 index 00000000000..9de57288406 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_frag.frag new file mode 100644 index 00000000000..1700c2b7635 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_firstthree_vert.frag new file mode 100644 index 00000000000..ee81a869b36 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_frag.frag new file mode 100644 index 00000000000..024f3ca5443 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_lastthree_vert.frag new file mode 100644 index 00000000000..408d6035431 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4b_vert.vert new file mode 100644 index 00000000000..a8ce5e1d7ea --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_frag.frag new file mode 100644 index 00000000000..bda6bc1394b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.frag new file mode 100644 index 00000000000..4f771b09f90 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4f_vert.vert new file mode 100644 index 00000000000..53129488413 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_frag.frag new file mode 100644 index 00000000000..bd00e3c3309 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.frag new file mode 100644 index 00000000000..4f771b09f90 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4i_vert.vert new file mode 100644 index 00000000000..ea97a42551b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/4m_frag.frag new file mode 100644 index 00000000000..030ef608f1e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/default.vert new file mode 100644 index 00000000000..45426238de0 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.frag new file mode 100644 index 00000000000..fc4b633d382 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2VSU.vert new file mode 100644 index 00000000000..c5908900ae8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.frag new file mode 100644 index 00000000000..fc4b633d382 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrix2arrayVSU.vert new file mode 100644 index 00000000000..b28a0a52ec7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.frag new file mode 100644 index 00000000000..fc4b633d382 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/glUniform/matrixVSU.vert new file mode 100644 index 00000000000..1e4264cbcce --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_frag.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/link_program/unsuccessfulcompile_vert.vert new file mode 100644 index 00000000000..c73892a4cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.frag new file mode 100644 index 00000000000..9010f5a1212 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/precision_specifiers/precision_specifiers.vert new file mode 100644 index 00000000000..4cc0174c81c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.frag new file mode 100644 index 00000000000..966495e61c6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/relink_program/simple.vert new file mode 100644 index 00000000000..703847d5ff5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_frag.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/shader_source/unsuccessfulcompile_vert.vert new file mode 100644 index 00000000000..6e3536513c3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/three_uniforms/4f_frag.frag new file mode 100644 index 00000000000..b37c5a0e03a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_frag.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/use_program/unsuccessfulcompile_vert.vert new file mode 100644 index 00000000000..c73892a4cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_frag.frag new file mode 100644 index 00000000000..9069489545a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/successfulcompile_vert.vert new file mode 100644 index 00000000000..3b42e9d1595 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_frag.frag new file mode 100644 index 00000000000..fd471888521 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/validate_program/unsuccessfulcompile_vert.vert new file mode 100644 index 00000000000..c73892a4cab --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/GL2Tests/vertex_program_point_size/point_size.vert new file mode 100644 index 00000000000..6d5b454fb06 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/README.md b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/README.md new file mode 100644 index 00000000000..e44d84eae46 --- /dev/null +++ b/tests/wpt/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 /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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/mustpass.run.txt new file mode 100644 index 00000000000..e6b87db93af --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/ogles-utils.js new file mode 100644 index 00000000000..73be9240ea3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/ogles/process-ogles2-tests.py new file mode 100644 index 00000000000..c7afc6ae6d1 --- /dev/null +++ b/tests/wpt/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 = """ + + + + +WebGL GLSL conformance test: %(title)s +%(css)s +%(scripts)s + + + +
+
+ + + +""" + 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, '') + scripts_html = RelativizePaths(outname, scripts, '') + + 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/00_test_list.txt new file mode 100644 index 00000000000..fd5efc7363a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html new file mode 100644 index 00000000000..0f7b6d13b88 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/get-active-test.html @@ -0,0 +1,142 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html new file mode 100644 index 00000000000..e77725e790f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-long-names-test.html @@ -0,0 +1,176 @@ + + + + + + +WebGL BindAttribLocation Long Names Conformance Tests + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html new file mode 100644 index 00000000000..abdcb0ce1c2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-bind-attrib-location-test.html @@ -0,0 +1,162 @@ + + + + + + +WebGL BindAttribLocation Conformance Tests + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html new file mode 100644 index 00000000000..a5db952621d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-attribute.html @@ -0,0 +1,108 @@ + + + + + + +WebGL getActiveAttrib conformance test. + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html new file mode 100644 index 00000000000..3bb7dd1c54f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-get-active-uniform.html @@ -0,0 +1,167 @@ + + + + + + +WebGL getActiveUniform conformance test. + + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html new file mode 100644 index 00000000000..d337b65f1e0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-getshadersource.html @@ -0,0 +1,62 @@ + + + + + + + WebGL getShaderSource conformance test. + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html new file mode 100644 index 00000000000..8c0ced55a90 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/gl-shader-test.html @@ -0,0 +1,117 @@ + + + + + + +WebGL ShaderL Conformance Tests + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html new file mode 100644 index 00000000000..3f28fc95b14 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/invalid-UTF-16.html @@ -0,0 +1,71 @@ + + + + + + + + + + + + + +

+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html new file mode 100644 index 00000000000..53e1e61e3e3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/program-test.html @@ -0,0 +1,427 @@ + + + + + +WebGL Program Compiling/Linking Conformance Test + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html new file mode 100644 index 00000000000..3277e94ecbe --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/programs/use-program-crash-with-discard-in-fragment-shader.html @@ -0,0 +1,100 @@ + + + + + + +WebGL Program Conformance Tests + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/00_test_list.txt new file mode 100644 index 00000000000..bff4db57ee6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html new file mode 100644 index 00000000000..d1e812befe9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-pack-alignment.html @@ -0,0 +1,265 @@ + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html new file mode 100644 index 00000000000..f3334d5b6ba --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/reading/read-pixels-test.html @@ -0,0 +1,245 @@ + + + + + + +WebGL ReadPixels conformance test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/00_test_list.txt new file mode 100644 index 00000000000..82a471c2ab2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html new file mode 100644 index 00000000000..40fe4a3d56c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/feedback-loop.html @@ -0,0 +1,127 @@ + + + + + + + WebGL Rendering Feedback Loop + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html new file mode 100644 index 00000000000..a44dc9c8e7f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-object-attachment.html @@ -0,0 +1,665 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html new file mode 100644 index 00000000000..c4ff2589e64 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-state-restoration.html @@ -0,0 +1,130 @@ + + + + + + +WebGL Framebuffer state restoration Test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html new file mode 100644 index 00000000000..80d038c4668 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/framebuffer-test.html @@ -0,0 +1,199 @@ + + + + + + +WebGL Framebuffer Test + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html new file mode 100644 index 00000000000..1a1392e61f6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/renderbuffers/renderbuffer-initialization.html @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/00_test_list.txt new file mode 100644 index 00000000000..1f58bb448b7 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/culling.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/culling.html new file mode 100644 index 00000000000..bb462c999d4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/culling.html @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html new file mode 100644 index 00000000000..75741aeb0fc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-arrays-out-of-bounds.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html new file mode 100644 index 00000000000..0d4e05e27bb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/draw-elements-out-of-bounds.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html new file mode 100644 index 00000000000..7d208ff88a0 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-switch.html @@ -0,0 +1,113 @@ + + + + + + +WebGL framebuffer switching conformance test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html new file mode 100644 index 00000000000..a2e7904a759 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/framebuffer-texture-switch.html @@ -0,0 +1,109 @@ + + + + + + +WebGL framebuffer texture attachment switching conformance test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html new file mode 100644 index 00000000000..6d1a5b58607 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-clear.html @@ -0,0 +1,90 @@ + + + + + + +WebGL clear conformance test. + + + + + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html new file mode 100644 index 00000000000..c9241b85053 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawarrays.html @@ -0,0 +1,101 @@ + + + + + + + WebGL drawArrays Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html new file mode 100644 index 00000000000..a866f5d2b9a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-drawelements.html @@ -0,0 +1,127 @@ + + + + + + + WebGL drawElements Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html new file mode 100644 index 00000000000..5e7cd59a0f9 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-canvas-dimensions.html @@ -0,0 +1,101 @@ + + + + + + +WebGL Scissor Canvas Dimensions Test + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html new file mode 100644 index 00000000000..89941d95519 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-fbo-test.html @@ -0,0 +1,133 @@ + + + + + + +WebGL Scissor FBO Test + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html new file mode 100644 index 00000000000..0bf1ecb5aa2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-scissor-test.html @@ -0,0 +1,118 @@ + + + + + + +WebGL Scissor Test + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html new file mode 100644 index 00000000000..d659cc7d549 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/gl-viewport-test.html @@ -0,0 +1,135 @@ + + + + + + +WebGL Viewport Test + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html new file mode 100644 index 00000000000..32a86f9b894 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/line-loop-tri-fan.html @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html new file mode 100644 index 00000000000..c1542f4fa9f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/many-draw-calls.html @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + +
+ +
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html new file mode 100644 index 00000000000..683efba5dd6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/more-than-65536-indices.html @@ -0,0 +1,147 @@ + + + + + + +WebGL More than 65536 indices. + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html new file mode 100644 index 00000000000..f6da01dd9d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/multisample-corruption.html @@ -0,0 +1,62 @@ + + + + + + + WebGL Multisample Renderbuffer Corruption Test + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html new file mode 100644 index 00000000000..f619aa4f770 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/negative-one-index.html @@ -0,0 +1,114 @@ + + + + + + + -1 Index Rendering Test + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html new file mode 100644 index 00000000000..e813e0220dd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-no-attributes.html @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html new file mode 100644 index 00000000000..dd5cbba78f2 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-size.html @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html new file mode 100644 index 00000000000..4e7a97afdd5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/point-with-gl-pointcoord-in-fragment-shader.html @@ -0,0 +1,142 @@ + + + + + + +WebGL Point with gl_PointCoord in Fragment Shader Test + + + + + + + +
+ +
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html new file mode 100644 index 00000000000..8c15384ec36 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/polygon-offset.html @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/simple.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/simple.html new file mode 100644 index 00000000000..1b705224c1c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/simple.html @@ -0,0 +1,100 @@ + + + + + + + Simple Rendering Test + + + + + + + + +There is supposed to be an example drawing here, but it's not important. + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html new file mode 100644 index 00000000000..7fa99f0f881 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/rendering/triangle.html @@ -0,0 +1,96 @@ + + + + + + + Rendering Test + + + + + + + + +There is supposed to be an example drawing here, but it's not important. + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg new file mode 100644 index 00000000000..2b16f42abc3 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/1-channel.jpg differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/3x3.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/3x3.png new file mode 100644 index 00000000000..6cf1e7447a3 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/3x3.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg new file mode 100644 index 00000000000..a70bbb0219d Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/blue-1x1.jpg differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/boolUniformShader.vert new file mode 100644 index 00000000000..9226b3b5c0f --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png new file mode 100644 index 00000000000..e78cfe79979 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/bug-32888-texture.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/floatUniformShader.vert new file mode 100644 index 00000000000..58991b47416 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/fragmentShader.frag new file mode 100644 index 00000000000..08596ed5db1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-conformance-test.js new file mode 100644 index 00000000000..b259a946d4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-constructor-tests-generator.js new file mode 100644 index 00000000000..258ebdf8431 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-feature-tests.css new file mode 100644 index 00000000000..c8063d92b2a --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/glsl-generator.js new file mode 100644 index 00000000000..940c0cd17b0 --- /dev/null +++ b/tests/wpt/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.} 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png new file mode 100644 index 00000000000..183e55de219 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256-with-128-alpha.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png new file mode 100644 index 00000000000..01e486b5a92 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-256.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png new file mode 100644 index 00000000000..a5a89beb709 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-default-gamma.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png new file mode 100644 index 00000000000..637c792da03 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma0.1.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png new file mode 100644 index 00000000000..40ceeb04651 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma1.0.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png new file mode 100644 index 00000000000..73fcf7b41b6 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma2.0.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png new file mode 100644 index 00000000000..d878f1e967d Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma4.0.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png new file mode 100644 index 00000000000..8a69ed1f3d3 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp-gamma9.0.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png new file mode 100644 index 00000000000..a5a89beb709 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/gray-ramp.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png new file mode 100644 index 00000000000..7fcb96960e1 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/green-2x2-16bit.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/intArrayUniformShader.vert new file mode 100644 index 00000000000..d82074e4737 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/intUniformShader.vert new file mode 100644 index 00000000000..051c05e2b85 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/iterable-test.js new file mode 100644 index 00000000000..31abe501120 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/matUniformShader.vert new file mode 100644 index 00000000000..123a4be03bc --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.frag new file mode 100644 index 00000000000..b2dfc9f1d4e --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/noopUniformShader.vert new file mode 100644 index 00000000000..821e440d4c2 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4 b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4 new file mode 100644 index 00000000000..59f5f774a78 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.mp4 differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv new file mode 100644 index 00000000000..4458678fbfd Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.theora.ogv differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm new file mode 100644 index 00000000000..47277bdaac1 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/npot-video.webmvp8.webm differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/oes-texture-float-and-half-float-linear.js new file mode 100644 index 00000000000..7cc06312d8c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/ogles-tests.css new file mode 100644 index 00000000000..42269c8b604 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg new file mode 100644 index 00000000000..e3b70bef3f2 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/opengl_logo.jpg differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/out-of-bounds-test.js new file mode 100644 index 00000000000..1da05eb8d85 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/pnglib.js new file mode 100644 index 00000000000..d2a9b99e085 --- /dev/null +++ b/tests/wpt/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 +* @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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4 b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4 new file mode 100644 index 00000000000..4bd6d596589 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.mp4 differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.png new file mode 100644 index 00000000000..605ac9ba1bb Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg new file mode 100644 index 00000000000..9f8adfae532 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv new file mode 100644 index 00000000000..1543915a108 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.theora.ogv differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm new file mode 100644 index 00000000000..fde59a18b4d Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-green.webmvp8.webm differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png new file mode 100644 index 00000000000..3188d2d75b4 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/red-indexed.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/samplerUniformShader.frag new file mode 100644 index 00000000000..11cba127460 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png new file mode 100644 index 00000000000..aa8bf377179 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-cie-rgb-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png new file mode 100644 index 00000000000..63454ec0dd7 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colormatch-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg new file mode 100644 index 00000000000..a9186968fbd Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.jpg differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png new file mode 100644 index 00000000000..59226273768 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-colorspin-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png new file mode 100644 index 00000000000..2792b0ac570 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-e-srgb-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png new file mode 100644 index 00000000000..2904e895235 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-smpte-c-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png new file mode 100644 index 00000000000..a0201f113fd Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/small-square-with-srgb-iec61966-2.1-profile.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/structUniformShader.vert new file mode 100644 index 00000000000..59c719a0014 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-canvas.js new file mode 100644 index 00000000000..665236b5ab5 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image-data.js b/tests/wpt/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 00000000000..7b6d98fffa3 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-image.js new file mode 100644 index 00000000000..0b6404247cb --- /dev/null +++ b/tests/wpt/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 . + 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-svg-image.js b/tests/wpt/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 00000000000..bcc497eb476 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-video.js new file mode 100644 index 00000000000..e59d3b1a755 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/tex-image-and-sub-image-2d-with-webgl-canvas.js b/tests/wpt/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 00000000000..4a8c6bf034c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png new file mode 100644 index 00000000000..e2326f5510a Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/thunderbird-logo-64x64.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png new file mode 100644 index 00000000000..2be31274404 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/transparent-on-left-indexed.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/vertexShader.vert new file mode 100644 index 00000000000..fe6640b75ba --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/webgl-test-utils.js new file mode 100644 index 00000000000..4f2bae34e3c --- /dev/null +++ b/tests/wpt/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.} shaders The shaders to + * attach, or the source, or the id of a script to get + * the source from. + * @param {!Array.} opt_attribs The attribs names. + * @param {!Array.} 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.} 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.} lowerLeftTexCoords The texture coordinates for the lower left corner. + * @param {!Array.} 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.} 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.} lowerLeftTexCoords The texture coordinates for the lower left corner. + * @param {!Array.} 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.} The created buffers. + * [positions, , 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.} 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.} 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. 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. 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.} 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.} 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.} 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.} 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.} 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.} 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.} 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.} innerColor The color expected inside + * the area. A 4 element array where each element is in the + * range 0 to 255. + * @param {!Array.} 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.} 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.} 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): 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.} 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.} 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.} 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.} 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png new file mode 100644 index 00000000000..e55630c1160 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/resources/zero-alpha.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/00_test_list.txt new file mode 100644 index 00000000000..7ffc67eb7d8 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html new file mode 100644 index 00000000000..ad42f7bd639 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enable-enum-test.html @@ -0,0 +1,163 @@ + + + + + + +WebGL gl.ENABLE enums Conformance Tests + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html new file mode 100644 index 00000000000..18facdf1c2c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-enum-tests.html @@ -0,0 +1,114 @@ + + + + + + +WebGL gl enums Conformance Tests + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html new file mode 100644 index 00000000000..2cb967df036 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-get-calls.html @@ -0,0 +1,221 @@ + + + + + + +WebGL gl calls Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html new file mode 100644 index 00000000000..fb44941caf7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-geterror.html @@ -0,0 +1,100 @@ + + + + + + +WebGL get error conformance test. + + + + + + + + + +
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html new file mode 100644 index 00000000000..fa4d51551dc --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-getstring.html @@ -0,0 +1,83 @@ + + + + + + +WebGL gl.getParameter Strings Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html new file mode 100644 index 00000000000..4fedc675b72 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/gl-object-get-calls.html @@ -0,0 +1,464 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html new file mode 100644 index 00000000000..b60efc2a7c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/state/state-uneffected-after-compositing.html @@ -0,0 +1,109 @@ + + + + + + +WebGL: Check that state is not lost by compositing + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/00_test_list.txt new file mode 100644 index 00000000000..0bd6281955c --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html new file mode 100644 index 00000000000..d99f54af168 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/compressed-tex-image.html @@ -0,0 +1,84 @@ + + + + + + +WebGL CompressedTexImage and CompressedTexSubImage Tests + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html new file mode 100644 index 00000000000..2706526230e --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-2d-formats.html @@ -0,0 +1,196 @@ + + + + + +Verify copyTexImage2D follows format restictions + + + + + + + + +
+ + +
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html new file mode 100644 index 00000000000..63280be933b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/copy-tex-image-and-sub-image-2d.html @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html new file mode 100644 index 00000000000..fb83dce24b4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/default-texture.html @@ -0,0 +1,65 @@ + + + + + + +Tests texture access with no texture bound + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html new file mode 100644 index 00000000000..e9db9e6c230 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-get-tex-parameter.html @@ -0,0 +1,136 @@ + + + + + + +WebGL getTexParameter test + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html new file mode 100644 index 00000000000..103f3d923d6 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-pixelstorei.html @@ -0,0 +1,119 @@ + + + + + + +WebGL pixelStorei Test + + + + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html new file mode 100644 index 00000000000..26e46e7cc86 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/gl-teximage.html @@ -0,0 +1,424 @@ + + + + + + +WebGL texImage2D conformance test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html new file mode 100644 index 00000000000..b44f5eee339 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/mipmap-fbo.html @@ -0,0 +1,89 @@ + + + + + + + Tests if mipmap generation on a texture filled by an FBO works correctly + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html new file mode 100644 index 00000000000..1e33a24d2d5 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/origin-clean-conformance.html @@ -0,0 +1,151 @@ + + + + + + +WebGL Origin Restrictions Conformance Tests + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-array-buffer-view.html b/tests/wpt/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 00000000000..a21f2de5e55 --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html b/tests/wpt/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 00000000000..82c4c5eac5c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgb565.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html b/tests/wpt/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 00000000000..e6f5060327d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba4444.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html b/tests/wpt/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 00000000000..e1f546c2fc3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas-rgba5551.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html new file mode 100644 index 00000000000..be6e2e0a08f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-canvas.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgb565.html b/tests/wpt/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 00000000000..240a4072816 --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba4444.html b/tests/wpt/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 00000000000..11d5f9112fc --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data-rgba5551.html b/tests/wpt/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 00000000000..c154ed6828f --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html b/tests/wpt/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 00000000000..ca3c77c4788 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-data.html @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html b/tests/wpt/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 00000000000..09f13c2c59f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgb565.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html b/tests/wpt/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 00000000000..c72824ba1a3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba4444.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html b/tests/wpt/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 00000000000..d238fe92bf1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image-rgba5551.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html new file mode 100644 index 00000000000..27ebfe85119 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-image.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html b/tests/wpt/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 00000000000..21cd6518512 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-svg-image.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html b/tests/wpt/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 00000000000..73a7e5cdce7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgb565.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html b/tests/wpt/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 00000000000..e6fdf95de01 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba4444.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html b/tests/wpt/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 00000000000..ded4438aa6f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video-rgba5551.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html new file mode 100644 index 00000000000..261c069a6ea --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-video.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgb565.html b/tests/wpt/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 00000000000..21e6a872ce6 --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba4444.html b/tests/wpt/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 00000000000..e8fdb8752eb --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas-rgba5551.html b/tests/wpt/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 00000000000..0b60cf8f0d4 --- /dev/null +++ b/tests/wpt/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 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html b/tests/wpt/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 00000000000..1e713831515 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-sub-image-2d-with-webgl-canvas.html @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html new file mode 100644 index 00000000000..ff1a44710ca --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-and-uniform-binding-bugs.html @@ -0,0 +1,65 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html new file mode 100644 index 00000000000..28bce9f39a4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-canvas-corruption.html @@ -0,0 +1,74 @@ + + + + + + +Testing 3D canvas is usable after being used as texImage2D source + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html new file mode 100644 index 00000000000..e24822bd208 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-webgl.html @@ -0,0 +1,101 @@ + + + + + + +WebGL texImage2D from WebGL conformance test. + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html new file mode 100644 index 00000000000..84e69042370 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-format-and-type.html @@ -0,0 +1,745 @@ + + + + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html new file mode 100644 index 00000000000..a025b3be0b3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-image-with-invalid-data.html @@ -0,0 +1,147 @@ + + + + + + texImage2D and texSubImage2D tests with invalid data + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html new file mode 100644 index 00000000000..4d7a5489253 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-input-validation.html @@ -0,0 +1,385 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html new file mode 100644 index 00000000000..df8865d8c94 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d-bad-args.html @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html new file mode 100644 index 00000000000..e5f825d5476 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/tex-sub-image-2d.html @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html new file mode 100644 index 00000000000..c719e650150 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texparameter-test.html @@ -0,0 +1,207 @@ + + + + + + + WebGL TexParameter conformance test. + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html new file mode 100644 index 00000000000..44452b0ac6a --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind-2.html @@ -0,0 +1,233 @@ + + + + + + + WebGL ActiveTexture BindTexture conformance test #2 + + + + + + + + + +
+
+ + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html new file mode 100644 index 00000000000..31c1eb79bc4 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-active-bind.html @@ -0,0 +1,143 @@ + + + + + + +WebGL ActiveTexture BindTexture conformance test. + + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html new file mode 100644 index 00000000000..f171839b5d7 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-attachment-formats.html @@ -0,0 +1,200 @@ + + + + + + +WebGL Texture Attachment Format Conformance Tests + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html new file mode 100644 index 00000000000..06282aa91d3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-clear.html @@ -0,0 +1,66 @@ + + + + + + +WebGL texture clear conformance test. + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html new file mode 100644 index 00000000000..d9f0767af00 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-complete.html @@ -0,0 +1,87 @@ + + + + + + +WebGL "Texture Complete" texture conformance test. + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html new file mode 100644 index 00000000000..5ee7a47d112 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-copying-feedback-loops.html @@ -0,0 +1,105 @@ + + + + + + +WebGL Texture Copying Feedback Loops Test + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html new file mode 100644 index 00000000000..0002dce9946 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-draw-with-2d-and-cube.html @@ -0,0 +1,127 @@ + + + + + + +WebGL ActiveTexture BindTexture conformance test. + + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html new file mode 100644 index 00000000000..883886a9428 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-fakeblack.html @@ -0,0 +1,119 @@ + + + + + + + Tests if fake black textures are corectly implemented on desktops + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html new file mode 100644 index 00000000000..80adad6c6ed --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-formats-test.html @@ -0,0 +1,292 @@ + + + + + + +WebGL Texture Format Conformance Tests + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html new file mode 100644 index 00000000000..9fe480befea --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-hd-dpi.html @@ -0,0 +1,141 @@ + + + + + + +WebGL HD-DPI issues texture conformance test. + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html new file mode 100644 index 00000000000..d435f90e004 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-mips.html @@ -0,0 +1,320 @@ + + + + + + +WebGL texture mips conformance test. + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html new file mode 100644 index 00000000000..87973b63c87 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot-video.html @@ -0,0 +1,163 @@ + + + + + + + + + + + + + + +
+
+ + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html new file mode 100644 index 00000000000..c19d1bbdece --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-npot.html @@ -0,0 +1,329 @@ + + + + + + +WebGL Non-Power of 2 texture conformance test. + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html new file mode 100644 index 00000000000..c04d571c4c8 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-cube-maps.html @@ -0,0 +1,356 @@ + + + + + + +WebGL texture size cube map conformance test. + + + + + + + + +
+
+ + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html new file mode 100644 index 00000000000..176e1ce96a1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size-limit.html @@ -0,0 +1,175 @@ + + + + + + +WebGL texture size limit conformance test. + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html new file mode 100644 index 00000000000..659be1fba64 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-size.html @@ -0,0 +1,238 @@ + + + + + + +WebGL texture size conformance test. + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html new file mode 100644 index 00000000000..d4d860671f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-sub-image-cube-maps.html @@ -0,0 +1,338 @@ + + + + + + +WebGL texture texSubImage2Ds cube map conformance test. + + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html new file mode 100644 index 00000000000..f64b95be3c1 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-transparent-pixels-initialized.html @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + +
+
+ + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html new file mode 100644 index 00000000000..831e318dd34 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-cube-maps.html @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html new file mode 100644 index 00000000000..78ff5ef4fbb --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/textures/texture-upload-size.html @@ -0,0 +1,172 @@ + + + + + + +WebGL texture upload size conformance test + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/00_test_list.txt new file mode 100644 index 00000000000..732aad646c6 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html new file mode 100644 index 00000000000..c0540c9d34b --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-crash.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html new file mode 100644 index 00000000000..0bcaaf4ef34 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-buffer-view-crash.html @@ -0,0 +1,62 @@ + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html new file mode 100644 index 00000000000..b4aa3db5b57 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-large-array-tests.html @@ -0,0 +1,104 @@ + + + + + + + + + + + +
+
+ + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html new file mode 100644 index 00000000000..f2f3a093eaf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/array-unit-tests.html @@ -0,0 +1,1118 @@ + + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html new file mode 100644 index 00000000000..a1c518ee787 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-crash.html @@ -0,0 +1,56 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html new file mode 100644 index 00000000000..5deeb60d277 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/data-view-test.html @@ -0,0 +1,379 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-test-cases.js new file mode 100644 index 00000000000..462eaae1bde --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/resources/typed-array-worker.js new file mode 100644 index 00000000000..c68ee07c29b --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html new file mode 100644 index 00000000000..f9d05f5656d --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/typedarrays/typed-arrays-in-workers.html @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + +
+
+ + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/00_test_list.txt new file mode 100644 index 00000000000..008515acba1 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html new file mode 100644 index 00000000000..4285d9d4e4f --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-arrays.html @@ -0,0 +1,512 @@ + + + + + + +WebGL uniform array Conformance Tests + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html new file mode 100644 index 00000000000..9383f6f84cd --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniform-bool.html @@ -0,0 +1,82 @@ + + + + + + +WebGL uniformMatrix Conformance Tests + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html new file mode 100644 index 00000000000..a283b50e72c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-uniformmatrix4fv.html @@ -0,0 +1,106 @@ + + + + + + +WebGL uniformMatrix Conformance Tests + + + + + + + +
+
+ + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html new file mode 100644 index 00000000000..e2a59876822 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/gl-unknown-uniform.html @@ -0,0 +1,91 @@ + + + + + + +WebGL Unknown Uniform Conformance Test + + + + + + + +
+
+ + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html new file mode 100644 index 00000000000..3151ef2ff3c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/null-uniform-location.html @@ -0,0 +1,104 @@ + + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html new file mode 100644 index 00000000000..530c45d894c --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/out-of-bounds-uniform-array-access.html @@ -0,0 +1,191 @@ + + + + + + +WebGL out of bounds uniform array access. + + + + + + + +
+ + +
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html new file mode 100644 index 00000000000..4ddd334a6f3 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-default-values.html @@ -0,0 +1,362 @@ + + + + + + +WebGL uniform default values + + + + + + + + +
+
+ + + + + + + + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html new file mode 100644 index 00000000000..2d79a982402 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-location.html @@ -0,0 +1,117 @@ + + + + + + + + + + + + +
+
+ + + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html new file mode 100644 index 00000000000..57b5580dced --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-samplers-test.html @@ -0,0 +1,135 @@ + + + + + + + WebGL sampler uniforms conformance test. + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html new file mode 100644 index 00000000000..622c68d8bce --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/conformance/uniforms/uniform-values-per-program.html @@ -0,0 +1,202 @@ + + + + + + + WebGL uniform values are per program conformance test. + + + + + + + + + + + + +
+
+ + + + + diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png new file mode 100644 index 00000000000..4ec9751070e Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/50x50pixel-black-with-red-triangle.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png new file mode 100644 index 00000000000..ba80dbe760f Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/canvas-compositing-test.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/extra/tex-image-with-video-test.js new file mode 100644 index 00000000000..fa1cacf8e2d --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/cookies.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/cookies.js new file mode 100644 index 00000000000..d12170ef091 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/desktop-gl-constants.js new file mode 100644 index 00000000000..6bea0acb4e4 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-post.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-post.js new file mode 100644 index 00000000000..ae4031cbaa2 --- /dev/null +++ b/tests/wpt/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('
TEST COMPLETE'); +if (_jsTestPreVerboseLogging) { + _logToConsole('TEST COMPLETE'); +} +notifyFinishedToHarness() diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-pre.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-pre.js new file mode 100644 index 00000000000..4b902f96f25 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-pre.js @@ -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. +*/ + +(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(); + } +} + +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); + } + 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, "&").replace(/PASS ' + escapeHTML(msg) + ''); + if (_jsTestPreVerboseLogging) { + _logToConsole('PASS ' + msg); + } +} + +function testFailed(msg) +{ + reportTestResultsToHarness(false, msg); + _addSpan('FAIL ' + escapeHTML(msg) + ''); + _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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-style.css b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/js-test-style.css new file mode 100644 index 00000000000..f12147ca432 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/test-eval.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/test-eval.js new file mode 100644 index 00000000000..2d863239e92 --- /dev/null +++ b/tests/wpt/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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/webgl-logo.png b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/webgl-logo.png new file mode 100644 index 00000000000..b9b22e1ab45 Binary files /dev/null and b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/webgl-logo.png differ diff --git a/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/resources/webgl-test-harness.js new file mode 100644 index 00000000000..1bf7283aa93 --- /dev/null +++ b/tests/wpt/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.)} 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 will + * be ignored version is less then + * + */ +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 ' + + '' + + 'http://localhost:8000/webgl-conformance-tests.html', + 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/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/test-guidelines.md b/tests/wpt/web-platform-tests/webgl/conformance-1.0.3/test-guidelines.md new file mode 100644 index 00000000000..9c4de558b9f --- /dev/null +++ b/tests/wpt/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 + + + +* 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. + + +
+
+ + + * 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 `` + + * All HTML files must have a `` + + * 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 ` 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` + + diff --git a/tests/wpt/web-platform-tests/webgl/tools/import-conformance-tests.py b/tests/wpt/web-platform-tests/webgl/tools/import-conformance-tests.py new file mode 100755 index 00000000000..0082e3c7dbf --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/tools/import-conformance-tests.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python + +import os +import subprocess +import sys +import tempfile +import shutil +import bisect +import argparse + +KHRONOS_REPO_URL = "https://github.com/KhronosGroup/WebGL.git" +PATCHES = [ + ("js-test-pre.patch", "resources/js-test-pre.js"), + ("unit.patch", "conformance/more/unit.js") +] + +def usage(): + print("Usage: {} version destination [existing_webgl_repo]".format(sys.argv[0])) + sys.exit(1) + +def get_tests(base_dir, file_name, tests_list): + list_file = os.path.join(base_dir, file_name) + if not os.path.isfile(list_file): + print("Test list ({}) not found".format(list_file)) + sys.exit(1) + + print("Processing: {}".format(list_file)) + + with open(list_file, "r") as f: + for line in f: + line = line.strip() + if not line or line.startswith("#") or line.startswith("//"): + continue # It's an empty line or a comment + + # Lines often are in the form: + # --min-version x.x.x abc.html + # + # We only care about the last part + line = line.split(" ")[-1] + + if line.endswith(".html"): + tests_list.append(os.path.join(base_dir, line)) + if line.endswith(".txt"): + (next_dir, file_name) = os.path.split(os.path.join(base_dir, line)) + get_tests(next_dir, file_name, tests_list) + + +# Insert the test harness scripts before any other script +def process_test(test): + (new, new_path) = tempfile.mkstemp() + script_tag_found = False + with open(test) as test_file: + for line in test_file: + if not script_tag_found and "\n".format(indent)) + os.write(new, "{}\n".format(indent)) + os.write(new, line) + + os.close(new) + shutil.move(new_path, test) + + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("version", help="WebGL test suite version (e.g.: 1.0.3)") + parser.add_argument("destination", help="Test suite destination") + parser.add_argument("-e", "--existing-repo", help="Path to an existing clone of the khronos WebGL repository") + args = parser.parse_args() + + version = args.version + destination = args.destination + + print("Trying to import WebGL conformance test suite {} into {}".format(version, destination)) + + if args.existing_repo: + directory = args.existing_repo + print("Using existing WebGL repository: {}".format(directory)) + else: + directory = tempfile.mkdtemp() + print("Cloning WebGL repository into temporary directory {}".format(directory)) + subprocess.check_call(["git", "clone", KHRONOS_REPO_URL, directory]) + + suite_dir = os.path.join(directory, "conformance-suites", version) + print("Test suite directory: {}".format(suite_dir)) + + if not os.path.isdir(suite_dir): + print("Test suite directory ({}) not found, aborting...".format(suite_dir)) + sys.exit(1) + + # We recursively copy all the test suite to `destination` + shutil.copytree(suite_dir, destination) + + # Get all the tests, remove any html file which is not in the list, and + # later process them. + tests = [] + get_tests(destination, "00_test_list.txt", tests) + + test_count = len(tests) + + print("Found {} tests.".format(test_count)) + print("Removing non-test html files") + + # To use binary search, which speeds things up a little + # instead of f in tests + tests.sort() + + # Remove html files that are not tests + for dirpath, dirnames, filenames in os.walk(destination): + for f in filenames: + if not f.endswith('.html'): + continue + + f = os.path.join(dirpath, f) + pos = bisect.bisect_left(tests, f) + if pos == test_count or tests[pos] != f: + print("Removing: {}".format(f)) + os.remove(f) + + # Insert our harness into the tests + for test in tests: + process_test(test) + + # Try to apply the patches to the required files + + this_dir = os.path.abspath(os.path.dirname(sys.argv[0])) + for patch, file_name in PATCHES: + try: + patch = os.path.join(this_dir, patch) + subprocess.check_call(["patch", "-d", destination, file_name, patch]) + except subprocess.CalledProcessError: + print("Automatic patch failed for {}".format(file_name)) + print("Please review the WPT integration and update {} accordingly".format(os.path.basename(patch))) + +if __name__ == '__main__': + main() diff --git a/tests/wpt/web-platform-tests/webgl/tools/js-test-pre.patch b/tests/wpt/web-platform-tests/webgl/tools/js-test-pre.patch new file mode 100644 index 00000000000..9c0f7897c33 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/tools/js-test-pre.patch @@ -0,0 +1,69 @@ +--- resources/js-test-pre.js 2015-06-18 23:26:41.217622000 +0200 ++++ ../conformance-1.0.3/resources/js-test-pre.js 2015-12-30 19:20:27.852467185 +0100 +@@ -71,9 +71,14 @@ + } + } + ++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); + } + } + +@@ -92,7 +97,7 @@ + window.console.log(msg); + } + +-var _jsTestPreVerboseLogging = false; ++var _jsTestPreVerboseLogging = true; + + function enableJSTestPreVerboseLogging() + { +@@ -105,31 +110,18 @@ + if (msg === undefined) { + msg = document.title; + } +- // For MSIE 6 compatibility +- var span = document.createElement("span"); +- span.innerHTML = '

' + msg + '

On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".

'; +- var description = document.getElementById("description"); +- if (description.firstChild) +- description.replaceChild(span, description.firstChild); +- else +- description.appendChild(span); +- if (_jsTestPreVerboseLogging) { +- _logToConsole(msg); +- } ++ _logToConsole("DESCRIPTION: " + msg); + } + + function _addSpan(contents) + { +- var span = document.createElement("span"); +- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace +- span.innerHTML = contents + '
'; + } + + function debug(msg) + { + _addSpan(msg); + if (_jsTestPreVerboseLogging) { +- _logToConsole(msg); ++ _logToConsole(msg); + } + } + +@@ -143,7 +135,7 @@ + reportTestResultsToHarness(true, msg); + _addSpan('PASS ' + escapeHTML(msg) + ''); + if (_jsTestPreVerboseLogging) { +- _logToConsole('PASS ' + msg); ++ _logToConsole('PASS ' + msg); + } + } + diff --git a/tests/wpt/web-platform-tests/webgl/tools/unit.patch b/tests/wpt/web-platform-tests/webgl/tools/unit.patch new file mode 100644 index 00000000000..58a242c5168 --- /dev/null +++ b/tests/wpt/web-platform-tests/webgl/tools/unit.patch @@ -0,0 +1,17 @@ +--- conformance/more/unit.js 2015-06-18 23:26:41.085626000 +0200 ++++ ../conformance-1.0.3/conformance/more/unit.js 2015-12-30 19:46:34.570636491 +0100 +@@ -892,9 +892,14 @@ + 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); + } + } + diff --git a/tests/wpt/web-platform-tests/websockets/interfaces.html b/tests/wpt/web-platform-tests/websockets/interfaces.html deleted file mode 100644 index 8cde6777655..00000000000 --- a/tests/wpt/web-platform-tests/websockets/interfaces.html +++ /dev/null @@ -1,79 +0,0 @@ - -Web Sockets IDL tests - - - - - -

Web Sockets IDL tests

-
- - - diff --git a/tests/wpt/web-platform-tests/workers/interfaces.idl b/tests/wpt/web-platform-tests/workers/interfaces.idl index 7b30ba56301..d83d3930929 100644 --- a/tests/wpt/web-platform-tests/workers/interfaces.idl +++ b/tests/wpt/web-platform-tests/workers/interfaces.idl @@ -1,21 +1,3 @@ -// ----------------------------------------------------------------------------- -// URL -// ----------------------------------------------------------------------------- -[NoInterfaceObject/*, - Exposed=(Window,Worker)*/] -interface URLUtilsReadOnly { - stringifier readonly attribute USVString href; - readonly attribute USVString origin; - - readonly attribute USVString protocol; - readonly attribute USVString host; - readonly attribute USVString hostname; - readonly attribute USVString port; - readonly attribute USVString pathname; - readonly attribute USVString search; - readonly attribute USVString hash; -}; - // ----------------------------------------------------------------------------- // DOM // ----------------------------------------------------------------------------- @@ -111,5 +93,14 @@ interface NavigatorOnLine { }; //[Exposed=Worker] -interface WorkerLocation { }; -WorkerLocation implements URLUtilsReadOnly; +interface WorkerLocation { + stringifier readonly attribute USVString href; + readonly attribute USVString origin; + readonly attribute USVString protocol; + readonly attribute USVString host; + readonly attribute USVString hostname; + readonly attribute USVString port; + readonly attribute USVString pathname; + readonly attribute USVString search; + readonly attribute USVString hash; +};