diff --git a/LayoutTests/http/tests/webgl/resources/js-test-pre.js b/LayoutTests/http/tests/webgl/resources/js-test-pre.js index 75bdbced7116..ffd42e530b6e 100644 --- a/LayoutTests/http/tests/webgl/resources/js-test-pre.js +++ b/LayoutTests/http/tests/webgl/resources/js-test-pre.js @@ -128,7 +128,7 @@ function debug(msg) { _addSpan(msg); if (_jsTestPreVerboseLogging) { - _logToConsole(msg); + _logToConsole(msg); } } @@ -142,7 +142,7 @@ function testPassed(msg) reportTestResultsToHarness(true, msg); _addSpan('PASS ' + escapeHTML(msg) + ''); if (_jsTestPreVerboseLogging) { - _logToConsole('PASS ' + msg); + _logToConsole('PASS ' + msg); } } diff --git a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-post.js b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-post.js index 23df5503d128..2b19b3b98fc0 100644 --- a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-post.js +++ b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-post.js @@ -15,6 +15,17 @@ if (_jsTestPreVerboseLogging) { let fails_class = 'pass'; if (RESULTS.fail) { fails_class = 'fail'; + } else { + const parseBoolean = v => v.toLowerCase().startsWith('t') || parseFloat(v) > 0; + const params = new URLSearchParams(window.location.search); + if (parseBoolean(params.get('runUntilFail') || '')) { + setTimeout(() => { + params.set('runCount', parseInt(params.get('runCount') || '0') + 1); + const url = new URL(window.location.href); + url.search = params.toString(); + window.location.href = url.toString(); + }, 100); + } } e_results.classList.add('pass'); e_results.innerHTML = `

TEST COMPLETE: ${RESULTS.pass} PASS, ` + diff --git a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-pre.js b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-pre.js index e1cb9f749c02..adc1f8a5aa55 100644 --- a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-pre.js +++ b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/js-test-pre.js @@ -93,20 +93,25 @@ const RESULTS = { fail: 0, }; +// We cache these values since they will potentially be accessed many (100k+) +// times and accessing window can be significantly slower than a local variable. +const locationPathname = window.location.pathname; +const webglTestHarness = window.parent.webglTestHarness; + function reportTestResultsToHarness(success, msg) { if (success) { RESULTS.pass += 1; } else { RESULTS.fail += 1; } - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg); + if (webglTestHarness) { + webglTestHarness.reportResults(locationPathname, success, msg); } } function reportSkippedTestResultsToHarness(success, msg) { - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg, true); + if (webglTestHarness) { + webglTestHarness.reportResults(locationPathname, success, msg, true); } } @@ -116,8 +121,8 @@ function notifyFinishedToHarness() { } window._didNotifyFinishedToHarness = true; - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.notifyFinished(window.location.pathname); + if (webglTestHarness) { + webglTestHarness.notifyFinished(locationPathname); } if (window.nonKhronosFrameworkNotifyDone) { window.nonKhronosFrameworkNotifyDone(); @@ -268,9 +273,9 @@ function getCurrentTestName() */ function testPassedOptions(msg, addSpan) { + reportTestResultsToHarness(true, _currentTestName + ": " + msg); if (addSpan && !quietMode()) { - reportTestResultsToHarness(true, _currentTestName + ": " + msg); _addSpan('PASS ' + escapeHTML(_currentTestName) + ": " + escapeHTML(msg) + ''); } if (_jsTestPreVerboseLogging) { @@ -285,9 +290,9 @@ function testPassedOptions(msg, addSpan) */ function testSkippedOptions(msg, addSpan) { + reportSkippedTestResultsToHarness(true, _currentTestName + ": " + msg); if (addSpan && !quietMode()) { - reportSkippedTestResultsToHarness(true, _currentTestName + ": " + msg); _addSpan('SKIP ' + escapeHTML(_currentTestName) + ": " + escapeHTML(msg) + ''); } if (_jsTestPreVerboseLogging) { diff --git a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/webgl-test-utils.js b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/webgl-test-utils.js index 9affa1082304..f17f69fa3057 100644 --- a/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/webgl-test-utils.js +++ b/LayoutTests/http/tests/webgl/resources/webgl_test_files/js/webgl-test-utils.js @@ -1573,6 +1573,29 @@ var create3DContext = function(opt_canvas, opt_attributes, opt_version) { if (!hasAttributeCaseInsensitive(attributes, "antialias")) { attributes.antialias = false; } + + const parseString = v => v; + const parseBoolean = v => v.toLowerCase().startsWith('t') || parseFloat(v) > 0; + const params = new URLSearchParams(window.location.search); + for (const [key, parseFn] of Object.entries({ + alpha: parseBoolean, + antialias: parseBoolean, + depth: parseBoolean, + desynchronized: parseBoolean, + failIfMajorPerformanceCaveat: parseBoolean, + powerPreference: parseString, + premultipliedAlpha: parseBoolean, + preserveDrawingBuffer: parseBoolean, + stencil: parseBoolean, + })) { + const value = params.get(key); + if (value) { + const v = parseFn(value); + attributes[key] = v; + debug(`setting context attribute: ${key} = ${v}`); + } + } + if (!opt_version) { opt_version = getDefault3DContextVersion(); } @@ -1607,6 +1630,12 @@ var create3DContext = function(opt_canvas, opt_attributes, opt_version) { } window._wtu_contexts.push(context); } + + if (params.get('showRenderer')) { + const ext = context.getExtension('WEBGL_debug_renderer_info'); + debug(`RENDERER: ${context.getParameter(ext ? ext.UNMASKED_RENDERER_WEBGL : context.RENDERER)}`); + } + return context; }; @@ -3296,6 +3325,98 @@ function linearChannelToSRGB(value) { return Math.trunc(value * 255 + 0.5); } +/** + * Return the named color in the specified color space. + * @param {string} colorName The name of the color to convert. + * Supported color names are: + * 'Red', which is the CSS color color('srgb' 1 0 0 1) + * 'Green', which is the CSS color color('srgb' 0 1 0 1) + * @param {string} colorSpace The color space to convert to. Supported + color spaces are: + * null, which is treated as sRGB + * 'srgb' + * 'display-p3'. + * Documentation on the formulas for color conversion between + * spaces can be found at + https://www.w3.org/TR/css-color-4/#predefined-to-predefined + * @return {!Array.} color The color in the specified color + * space as an 8-bit RGBA array with unpremultiplied alpha. + */ +var namedColorInColorSpace = function(colorName, colorSpace) { + var result; + switch (colorSpace) { + case undefined: + case 'srgb': + switch(colorName) { + case 'Red': + return [255, 0, 0, 255]; + case 'Green': + return [0, 255, 0, 255]; + break; + default: + throw 'unexpected color name: ' + colorName; + }; + break; + case 'display-p3': + switch(colorName) { + case 'Red': + return [234, 51, 35, 255]; + break; + case 'Green': + return [117, 251, 76, 255]; + break; + default: + throw 'unexpected color name: ' + colorName; + } + break; + default: + throw 'unexpected color space: ' + colorSpace; + } +} + +/** + * Return the named color as it would be sampled with the specified + * internal format + * @param {!Array.} color The color as an 8-bit RGBA array. + * @param {string} internalformat The internal format. + * @return {!Array.} color The color, as it would be sampled by + * the specified internal format, as an 8-bit RGBA array. + */ +var colorAsSampledWithInternalFormat = function(color, internalFormat) { + switch (internalFormat) { + case 'ALPHA': + return [0, 0, 0, color[3]]; + case 'LUMINANCE': + return [color[0], color[0], color[0], 255]; + case 'LUMINANCE_ALPHA': + return [color[0], color[0], color[0], color[3]]; + case 'SRGB8': + case 'SRGB8_ALPHA8': + return [sRGBChannelToLinear(color[0]), + sRGBChannelToLinear(color[1]), + sRGBChannelToLinear(color[2]), + color[3]]; + case 'R16F': + case 'R32F': + case 'R8': + case 'R8UI': + case 'RED': + case 'RED_INTEGER': + return [color[0], 0, 0, 0]; + case 'RG': + case 'RG16F': + case 'RG32F': + case 'RG8': + case 'RG8UI': + case 'RG_INTEGER': + return [color[0], color[1], 0, 0]; + break; + default: + break; + } + return color; +} + function comparePixels(cmp, ref, tolerance, diff) { if (cmp.length != ref.length) { testFailed("invalid pixel size."); @@ -3516,6 +3637,10 @@ var API = { // fullscreen api setupFullscreen: setupFullscreen, + // color converter API + namedColorInColorSpace: namedColorInColorSpace, + colorAsSampledWithInternalFormat: colorAsSampledWithInternalFormat, + // sRGB converter api sRGBToLinear: sRGBToLinear, linearToSRGB: linearToSRGB, diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine-expected.txt new file mode 100644 index 000000000000..009333b36dc1 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine.html new file mode 100644 index 000000000000..0ae566499e31 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_combine.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_matrix_combine.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix-expected.txt new file mode 100644 index 000000000000..3529fb020290 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html new file mode 100644 index 000000000000..d30227f2a491 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_matrix_to_matrix.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix-expected.txt new file mode 100644 index 000000000000..0d53250f140f --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html new file mode 100644 index 000000000000..e99880bbc2b9 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_scalar_to_matrix.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar-expected.txt new file mode 100644 index 000000000000..ddd6f4e933da --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html new file mode 100644 index 000000000000..7fa046f2a5eb --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_scalar_to_scalar.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector-expected.txt new file mode 100644 index 000000000000..27b225a37cb4 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector.html new file mode 100644 index 000000000000..117ab8029cdf --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_scalar_to_vector.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_scalar_to_vector.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine-expected.txt new file mode 100644 index 000000000000..9f93b45f0c50 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine.html new file mode 100644 index 000000000000..494073499a57 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_combine.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_vector_combine.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal-expected.txt new file mode 100644 index 000000000000..b08542c7a819 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal.html new file mode 100644 index 000000000000..5f7122629a2f --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_illegal.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_vector_illegal.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar-expected.txt new file mode 100644 index 000000000000..785937445421 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar.html new file mode 100644 index 000000000000..23dce2361777 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_scalar.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_vector_to_scalar.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector-expected.txt new file mode 100644 index 000000000000..ddf514f087ce --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector.html new file mode 100644 index 000000000000..7088df1950f9 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions_vector_to_vector.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for conversions_vector_to_vector.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2-expected.txt new file mode 100644 index 000000000000..08a5a2c59a01 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2.html similarity index 68% rename from LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles.html rename to LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2.html index ca1fd120dcde..efce83a8b6f5 100644 --- a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles.html +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec2.html @@ -3,15 +3,15 @@ -WebGL Conformance Test Wrapper for swizzles.html +WebGL Conformance Test Wrapper for swizzles_bvec2.html

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

-Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.html?webglVersion=2 +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.html
- +
diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3-expected.txt new file mode 100644 index 000000000000..b8a409bfe97b --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3.html new file mode 100644 index 000000000000..4dbe37ffc14a --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec3.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_bvec3.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4-expected.txt new file mode 100644 index 000000000000..ad846ecef377 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4.html new file mode 100644 index 000000000000..7d15d6cbc4fb --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_bvec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_bvec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2-expected.txt new file mode 100644 index 000000000000..0967f7a6360d --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2.html new file mode 100644 index 000000000000..ce1072463d62 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec2.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec2.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3-expected.txt new file mode 100644 index 000000000000..8c94f5eec5ad --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3.html new file mode 100644 index 000000000000..aba709b18342 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec3.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec3.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4-expected.txt new file mode 100644 index 000000000000..a626b34451c2 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4.html new file mode 100644 index 000000000000..4362bff31887 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_ivec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2-expected.txt similarity index 86% rename from LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions-expected.txt rename to LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2-expected.txt index 7319d1f11c58..850f1ddcaaf6 100644 --- a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions-expected.txt +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2-expected.txt @@ -1,4 +1,4 @@ This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. -Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions.html +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.html [ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2.html similarity index 70% rename from LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions.html rename to LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2.html index c82e13dcc071..9e8af9524c25 100644 --- a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/conversions.html +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec2.html @@ -3,15 +3,15 @@ -WebGL Conformance Test Wrapper for conversions.html +WebGL Conformance Test Wrapper for swizzles_vec2.html

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

-Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/conversions.html +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.html
- +
diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3-expected.txt similarity index 86% rename from LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles-expected.txt rename to LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3-expected.txt index 197bb881de64..60ec43d04046 100644 --- a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles-expected.txt +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3-expected.txt @@ -1,4 +1,4 @@ This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. -Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.html +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.html [ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3.html similarity index 70% rename from LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles.html rename to LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3.html index 5ecbd86af6d9..677951d0250b 100644 --- a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles.html +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec3.html @@ -3,15 +3,15 @@ -WebGL Conformance Test Wrapper for swizzles.html +WebGL Conformance Test Wrapper for swizzles_vec3.html

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

-Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.html +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.html
- +
diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4-expected.txt b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4-expected.txt new file mode 100644 index 000000000000..526964202729 --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.html +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4.html b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4.html new file mode 100644 index 000000000000..6b0635de503e --- /dev/null +++ b/LayoutTests/webgl/1.0.x/deqp/data/gles2/shaders/swizzles_vec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_vec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.html +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2-expected.txt new file mode 100644 index 000000000000..56ae9277ae0a --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2.html new file mode 100644 index 000000000000..50f3cdcd4cdf --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec2.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_bvec2.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3-expected.txt new file mode 100644 index 000000000000..2d5b1e27d4e9 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3.html new file mode 100644 index 000000000000..4054797b390d --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec3.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_bvec3.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4-expected.txt new file mode 100644 index 000000000000..fc8f11a7c000 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4.html new file mode 100644 index 000000000000..cdb77fad4e4c --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_bvec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_bvec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2-expected.txt new file mode 100644 index 000000000000..7fa5800e9966 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2.html new file mode 100644 index 000000000000..edbe21128185 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec2.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec2.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3-expected.txt new file mode 100644 index 000000000000..ea9780c7eed4 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3.html new file mode 100644 index 000000000000..f41d7701aa76 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec3.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec3.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4-expected.txt new file mode 100644 index 000000000000..74ecca0afb65 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4.html new file mode 100644 index 000000000000..bfad771fe6a6 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_ivec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_ivec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2-expected.txt similarity index 80% rename from LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles-expected.txt rename to LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2-expected.txt index f8dbe7e0b190..5ea765e92ea6 100644 --- a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles-expected.txt +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2-expected.txt @@ -1,4 +1,4 @@ This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. -Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.html?webglVersion=2 +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.html?webglVersion=2 [ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2.html new file mode 100644 index 000000000000..bffdba18f981 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec2.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_vec2.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3-expected.txt new file mode 100644 index 000000000000..1ffb1f2da020 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3.html new file mode 100644 index 000000000000..a543ff6f5b87 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec3.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_vec3.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4-expected.txt b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4-expected.txt new file mode 100644 index 000000000000..9c53348afb08 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4-expected.txt @@ -0,0 +1,4 @@ +This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL. + +Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.html?webglVersion=2 +[ PASS ] All tests passed diff --git a/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4.html b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4.html new file mode 100644 index 000000000000..6dec339395d4 --- /dev/null +++ b/LayoutTests/webgl/2.0.y/deqp/data/gles3/shaders/swizzles_vec4.html @@ -0,0 +1,18 @@ + + + + + +WebGL Conformance Test Wrapper for swizzles_vec4.html + + + + +

This test runs the WebGL Test listed below in an iframe and reports PASS or FAIL.

+Test: ../../../../../resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.html?webglVersion=2 +
+ +
+
+ + diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-texture-compression-rgtc.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-texture-compression-rgtc.html index 70dcf9ba7b7c..d9c34af25f3c 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-texture-compression-rgtc.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance/extensions/ext-texture-compression-rgtc.html @@ -120,16 +120,16 @@ gl.bindTexture(gl.TEXTURE_2D, tex); gl.texImage2D(gl.TEXTURE_2D, 0, ext.COMPRESSED_RED_RGTC1_EXT, 4, 4, 0, gl.RED, gl.UNSIGNED_BYTE, null); - wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "COMPRESSED_RED_RGTC1_EXT fails with texImage2D"); + wtu.glErrorShouldBe(gl, [gl.INVALID_VALUE, gl.INVALID_OPERATION], "COMPRESSED_RED_RGTC1_EXT fails with texImage2D"); gl.texImage2D(gl.TEXTURE_2D, 0, ext.COMPRESSED_SIGNED_RED_RGTC1_EXT, 4, 4, 0, gl.RED, gl.BYTE, null); - wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "COMPRESSED_SIGNED_RED_RGTC1_EXT fails with texImage2D"); + wtu.glErrorShouldBe(gl, [gl.INVALID_VALUE, gl.INVALID_OPERATION], "COMPRESSED_SIGNED_RED_RGTC1_EXT fails with texImage2D"); gl.texImage2D(gl.TEXTURE_2D, 0, ext.COMPRESSED_RED_GREEN_RGTC2_EXT, 4, 4, 0, gl.RG, gl.UNSIGNED_BYTE, null); - wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "COMPRESSED_RED_GREEN_RGTC2_EXT fails with texImage2D"); + wtu.glErrorShouldBe(gl, [gl.INVALID_VALUE, gl.INVALID_OPERATION], "COMPRESSED_RED_GREEN_RGTC2_EXT fails with texImage2D"); gl.texImage2D(gl.TEXTURE_2D, 0, ext.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT, 4, 4, 0, gl.RG, gl.BYTE, null); - wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT fails with texImage2D"); + wtu.glErrorShouldBe(gl, [gl.INVALID_VALUE, gl.INVALID_OPERATION], "COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT fails with texImage2D"); gl.deleteTexture(tex); } diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/reading/read-pixels-test.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/reading/read-pixels-test.html index 078b43642712..3791be244863 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance/reading/read-pixels-test.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance/reading/read-pixels-test.html @@ -39,6 +39,43 @@ gl = wtu.create3DContext(canvas, {antialias: antialias}); var contextVersion = wtu.getDefault3DContextVersion(); + debug(""); + debug("Test null pixels"); + gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, null); + wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "null pixels"); + + debug(""); + debug("Test pixels size"); + gl.readPixels(0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(0)); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "empty pixels array with 0x0 read data"); + gl.readPixels(0, 0, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(0)); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "empty pixels array with 1x0 read data"); + gl.readPixels(0, 0, 0, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(0)); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "empty pixels array with 0x1 read data"); + gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(3)); + wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "small pixels array for 1x1 read data"); + if (contextVersion >= 2) { + gl.readPixels(0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(0), 1); + wtu.glErrorShouldBe(gl, gl.INVALID_VALUE, "offset is greater than array size"); + gl.readPixels(0, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(1), 1); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no space left in pixels array with 0x0 read data"); + gl.readPixels(0, 0, 1, 0, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(1), 1); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no space left in pixels array with 1x0 read data"); + gl.readPixels(0, 0, 0, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(1), 1); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no space left in pixels array with 0x1 read data"); + gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(4), 1); + wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "no space left in pixels array with 1x1 read data"); + gl.readPixels(0, 0, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, new Uint8Array(5), 1); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "read 1x1 data fits into pixels with offset"); + } + + debug(""); + debug("Test combined depth-stencil type"); + // The combined type is undefined in WebGL 1.0 and never allowed as a read type in WebGL 2.0 + gl.readPixels(0, 0, 1, 1, gl.RGBA, 0x8DAD /* FLOAT_32_UNSIGNED_INT_24_8_REV */, new Uint8Array(32)); + wtu.glErrorShouldBe(gl, gl.INVALID_ENUM, "FLOAT_32_UNSIGNED_INT_24_8_REV is rejected"); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "no extra error generated"); + var width = 2; var height = 2; var continueTestFunc = continueTestPart1; diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance/textures/misc/texture-video-transparent.html b/LayoutTests/webgl/resources/webgl_test_files/conformance/textures/misc/texture-video-transparent.html index 76d07fa240ee..9cc34debb886 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance/textures/misc/texture-video-transparent.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance/textures/misc/texture-video-transparent.html @@ -7,7 +7,7 @@ -Upload texture from animating transparent WebM +Upload texture from animating transparent WebM or HEVC @@ -34,7 +34,7 @@ function init() { - description("Upload texture from animating transparent WebM"); + description("Upload texture from animating transparent WebM or HEVC"); document.addEventListener("visibilitychange", visibilityChanged, false); @@ -54,14 +54,16 @@ gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA); video = document.getElementById("vid"); - const type = 'video/webm; codecs="vp8"'; + const typeWebM = 'video/webm; codecs="vp8"'; + const typeHEVC = 'video/mp4; codecs="hvc1"'; if (!video.canPlayType) { testFailed("video.canPlayType required method missing"); finishTest(); return; } - if (!video.canPlayType(type).replace(/no/, '')) { - debug(type + " unsupported"); + if (!video.canPlayType(typeWebM).replace(/no/, '') && !video.canPlayType(typeHEVC).replace(/no/, '')) { + debug(typeWebM + " unsupported"); + debug(typeHEVC + " unsupported"); finishTest(); return; }; @@ -109,7 +111,7 @@ // Draw the triangles wtu.clearAndDrawUnitQuad(gl, [255, 0, 0, 255]); - const tolerance = 5; + const tolerance = 20; const red = [255, 0, 0]; const green = [0, 255, 0]; const blue = [0, 0, 255]; @@ -155,6 +157,7 @@
diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance2/buffers/get-buffer-sub-data.html b/LayoutTests/webgl/resources/webgl_test_files/conformance2/buffers/get-buffer-sub-data.html index 4907bc695dd4..5919a86996d5 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance2/buffers/get-buffer-sub-data.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance2/buffers/get-buffer-sub-data.html @@ -59,17 +59,7 @@ wtu.glErrorShouldBe(gl, gl.NO_ERROR, "Should not generate GL error"); debug("Check array data to match original data set by the buffer"); -var failed = false; -for (var i = 0; i < vertices.length; i++) { - if (floatArray[i] != retArray[i]) { - failed = true; - break; - } -} -if (failed) - testFailed("The returned array buffer fails to match original data"); -else - testPassed("The returned array buffer matches original data"); +shouldBeTrue("areArraysEqual(retArray, floatArray)"); debug("Test that getBufferSubData successfully works with dstOffset"); retArray = new Float32Array(vertices.length); @@ -99,18 +89,96 @@ debug("Test that getBufferSubData fails when given a dstOffset+length beyond the end of retArray"); wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, retArray.length - 1, 2)"); +debug("Test that getBufferSubData successfully works with srcByteOffset"); +retArray = new Float32Array(vertices.length - 2); +const float32Size = Float32Array.BYTES_PER_ELEMENT; +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 2*float32Size, retArray)"); +shouldBeTrue("areArraysEqual(retArray, floatArray.slice(2))"); + +retArray = new Float32Array(vertices.length); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 2*float32Size, retArray, 2)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 2), [0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(2), floatArray.slice(2))"); + +retArray = new Float32Array(vertices.length); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 4*float32Size, retArray, 3, 3)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 3), [0, 0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(3, 6), floatArray.slice(4, 7))"); +shouldBeTrue("areArraysEqual(retArray.slice(6), [0, 0, 0])"); + debug("Test that getBufferSubData fails when given a buffer with its size larger than the original data"); var extraLargeBuffer = new Float32Array(vertices.length + 1); -gl.getBufferSubData(gl.ARRAY_BUFFER, 0, extraLargeBuffer); wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, extraLargeBuffer)", "Extra length should generate INVALID_VALUE."); +extraLargeBuffer = new Float32Array(vertices.length - 1); +wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, + "gl.getBufferSubData(gl.ARRAY_BUFFER, 2*float32Size, extraLargeBuffer)", + "Extra length should generate INVALID_VALUE."); debug("Test that getBufferSubData fails when offset summed with buffer length is larger than the size of the original data size"); wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, retArray.byteLength + 1, retArray)"); wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, 1, retArray)"); +debug("Test that getBufferSubData successfully works with offset view into ArrayBuffer"); +const verticesLengthInBytes = vertices.length * float32Size; +const retStorage = new ArrayBuffer(4* verticesLengthInBytes); // Over allocate 4x +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray)"); +shouldBeTrue("areArraysEqual(retArray, floatArray)"); + +debug("Test that getBufferSubData successfully works with offset view into ArrayBuffer and dstOffset"); +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, 2)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 2), [0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(2), floatArray.slice(0, floatArray.length - 2))"); + +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, retArray.length)"); +shouldBeTrue("areArraysEqual(retArray, [0, 0, 0, 0, 0, 0, 0, 0, 0])"); + +debug("Test that getBufferSubData fails when given a dstOffset beyond the end of offset view into ArrayBuffer"); +wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, retArray.length + 1)"); + +debug("Test that getBufferSubData successfully works with offset view into ArrayBuffer and dstOffset and length"); +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, 2, 2)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 2), [0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(2, 4), floatArray.slice(0, 2))"); +shouldBeTrue("areArraysEqual(retArray.slice(4), [0, 0, 0, 0, 0])"); + +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, retArray.length - 1, 1)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 8), [0, 0, 0, 0, 0, 0, 0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(8), floatArray.slice(0, 1))"); + +debug("Test that getBufferSubData fails when given a dstOffset+length beyond the end of offset view into ArrayBuffer"); +wtu.shouldGenerateGLError(gl, gl.INVALID_VALUE, "gl.getBufferSubData(gl.ARRAY_BUFFER, 0, retArray, retArray.length - 1, 2)"); + +debug("Test that getBufferSubData successfully works with offset view into ArrayBuffer and srcByteOffset"); +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length - 2); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 2*float32Size, retArray)"); +shouldBeTrue("areArraysEqual(retArray, floatArray.slice(2))"); + +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 2*float32Size, retArray, 2)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 2), [0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(2), floatArray.slice(2))"); + +retArray = new Float32Array(retStorage, verticesLengthInBytes, vertices.length); +retArray.fill(0); +wtu.shouldGenerateGLError(gl, gl.NO_ERROR, "gl.getBufferSubData(gl.ARRAY_BUFFER, 4*float32Size, retArray, 3, 3)"); +shouldBeTrue("areArraysEqual(retArray.slice(0, 3), [0, 0, 0])"); +shouldBeTrue("areArraysEqual(retArray.slice(3, 6), floatArray.slice(4, 7))"); +shouldBeTrue("areArraysEqual(retArray.slice(6), [0, 0, 0])"); + debug("Test that getBufferSubData fails when 0 is bound to the target"); gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, null); wtu.shouldGenerateGLError(gl, gl.INVALID_OPERATION, diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance2/extensions/ext-provoking-vertex.html b/LayoutTests/webgl/resources/webgl_test_files/conformance2/extensions/ext-provoking-vertex.html new file mode 100644 index 000000000000..0f389b3379e8 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance2/extensions/ext-provoking-vertex.html @@ -0,0 +1,166 @@ + + + + + + +WebGL EXT_provoking_vertex Conformance Tests + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance2/textures/misc/tex-new-formats.html b/LayoutTests/webgl/resources/webgl_test_files/conformance2/textures/misc/tex-new-formats.html index df10edb4d35b..760bc6bd1947 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance2/textures/misc/tex-new-formats.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance2/textures/misc/tex-new-formats.html @@ -37,6 +37,7 @@ testPassed("WebGL context exists"); runTexFormatsTest(); + runDepthStencilFormatTest(); wtu.glErrorShouldBe(gl, gl.NO_ERROR, "there should be no errors"); } @@ -556,6 +557,35 @@ }); } +function runDepthStencilFormatTest() { + debug(""); + debug("Testing FLOAT_32_UNSIGNED_INT_24_8_REV with data"); + const fb = gl.createFramebuffer(); + gl.bindFramebuffer(gl.FRAMEBUFFER, fb); + + const tex2D = gl.createTexture(); + gl.bindTexture(gl.TEXTURE_2D, tex2D); + gl.texImage2D(gl.TEXTURE_2D, 0, gl.DEPTH32F_STENCIL8, 1, 1, 0, gl.DEPTH_STENCIL, gl.FLOAT_32_UNSIGNED_INT_24_8_REV, new Uint8Array(8)); + wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); + gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.TEXTURE_2D, tex2D, 0); + if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) { + testFailed("2D texture with invalid type was created"); + } else { + testPassed("2D texture with invalid type was not created") + } + + const tex3D = gl.createTexture(); + gl.bindTexture(gl.TEXTURE_2D_ARRAY, tex3D); + gl.texImage3D(gl.TEXTURE_2D_ARRAY, 0, gl.DEPTH32F_STENCIL8, 1, 1, 1, 0, gl.DEPTH_STENCIL, gl.FLOAT_32_UNSIGNED_INT_24_8_REV, new Uint8Array(8)); + wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION); + gl.framebufferTextureLayer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, tex3D, 0, 0); + if (gl.checkFramebufferStatus(gl.FRAMEBUFFER) == gl.FRAMEBUFFER_COMPLETE) { + testFailed("2D array texture with invalid type was created"); + } else { + testPassed("2D array texture with invalid type was not created") + } +} + debug(""); var successfullyParsed = true; diff --git a/LayoutTests/webgl/resources/webgl_test_files/conformance2/transform_feedback/simultaneous_binding.html b/LayoutTests/webgl/resources/webgl_test_files/conformance2/transform_feedback/simultaneous_binding.html index 228b4ab5cf47..11d1eaa82999 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/conformance2/transform_feedback/simultaneous_binding.html +++ b/LayoutTests/webgl/resources/webgl_test_files/conformance2/transform_feedback/simultaneous_binding.html @@ -304,6 +304,17 @@ gl.copyBufferSubData(gl.COPY_READ_BUFFER, gl.COPY_WRITE_BUFFER, 0, 0, 1); wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "copyBufferSubData with double bound buffer"); + debug("
Test that rejected operations do not change the bound buffer size"); + + gl.bindBuffer(gl.ARRAY_BUFFER, tfBuffer); + gl.bufferData(gl.ARRAY_BUFFER, 8, gl.STATIC_DRAW); + wtu.glErrorShouldBe(gl, gl.INVALID_OPERATION, "bufferData with double bound buffer"); + + gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null); + gl.bufferSubData(gl.ARRAY_BUFFER, 0, new Uint8Array(16)); + wtu.glErrorShouldBe(gl, gl.NO_ERROR, "bufferSubData should succeed"); + gl.bindBuffer(gl.ARRAY_BUFFER, null); + debug("
Test bufferData family with tf object unbound"); gl.bindTransformFeedback(gl.TRANSFORM_FEEDBACK, null); diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions.template similarity index 100% rename from LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions.html rename to LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions.template diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.html new file mode 100644 index 000000000000..8b36a38db849 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.test new file mode 100644 index 000000000000..43e32a614e6e --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_combine.test @@ -0,0 +1,553 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group matrix_combine "Matrix Combine Constructors" + + case vec2_vec2_to_mat2 + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) | vec2(-0.5, -2.25) ]; + input vec2 in1 = [ vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) | vec2(-32.0, 64.0) | vec2(0.0, 0.5) | vec2(1.0, 1.25) ]; + output mat2 out0 = [ mat2(0.0, 0.5, -0.5, -2.25) | mat2(1.0, 1.25, -0.75, -0.0322580645161) | mat2(-32.0, 64.0, -32.0, 64.0) | mat2(-0.75, -0.0322580645161, 0.0, 0.5) | mat2(-0.5, -2.25, 1.0, 1.25) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_bvec2_to_mat2 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input bvec2 in1 = [ bvec2(true, true) | bvec2(false, false) | bvec2(true, false) | bvec2(false, false) | bvec2(false, true) ]; + output mat2 out0 = [ mat2(1.0, 0.0, 1.0, 1.0) | mat2(0.0, 0.0, 0.0, 0.0) | mat2(0.0, 1.0, 1.0, 0.0) | mat2(0.0, 0.0, 0.0, 0.0) | mat2(1.0, 1.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_float_float_float_to_mat2 + values + { + input float in0 = [ 0.0 | -0.5 | -20.125 | 2.0 | 36.8125 | 1.0 | 3.5 | -8.25 ]; + input float in1 = [ -8.25 | 2.0 | -0.5 | -20.125 | 3.5 | 1.0 | 36.8125 | 0.0 ]; + input float in2 = [ 36.8125 | -8.25 | 3.5 | 2.0 | -0.5 | -20.125 | 1.0 | 0.0 ]; + input float in3 = [ 36.8125 | 0.0 | 2.0 | 3.5 | -8.25 | -0.5 | -20.125 | 1.0 ]; + output mat2 out0 = [ mat2(0.0, -8.25, 36.8125, 36.8125) | mat2(-0.5, 2.0, -8.25, 0.0) | mat2(-20.125, -0.5, 3.5, 2.0) | mat2(2.0, -20.125, 2.0, 3.5) | mat2(36.8125, 3.5, -0.5, -8.25) | mat2(1.0, 1.0, -20.125, -0.5) | mat2(3.5, 36.8125, 1.0, -20.125) | mat2(-8.25, 0.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case int_int_int_int_to_mat2 + values + { + input int in0 = [ 2 | 0 | -66 | 8 | 1 | 255 | 5 | -12 | 11 | -192 ]; + input int in1 = [ -192 | 2 | 5 | -12 | -66 | 255 | 8 | 1 | 11 | 0 ]; + input int in2 = [ 2 | 11 | -192 | 255 | 1 | 5 | 0 | -12 | 8 | -66 ]; + input int in3 = [ 255 | 0 | 11 | -66 | 2 | 8 | -192 | 1 | -12 | 5 ]; + output mat2 out0 = [ mat2(2.0, -192.0, 2.0, 255.0) | mat2(0.0, 2.0, 11.0, 0.0) | mat2(-66.0, 5.0, -192.0, 11.0) | mat2(8.0, -12.0, 255.0, -66.0) | mat2(1.0, -66.0, 1.0, 2.0) | mat2(255.0, 255.0, 5.0, 8.0) | mat2(5.0, 8.0, 0.0, -192.0) | mat2(-12.0, 1.0, -12.0, 1.0) | mat2(11.0, 11.0, 8.0, -12.0) | mat2(-192.0, 0.0, -66.0, 5.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_bool_to_mat2 + values + { + input bool in0 = [ false | true ]; + input bool in1 = [ false | true ]; + input bool in2 = [ true | false ]; + input bool in3 = [ false | true ]; + output mat2 out0 = [ mat2(0.0, 0.0, 1.0, 0.0) | mat2(1.0, 1.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_float_int_bool_to_mat2 + values + { + input bool in0 = [ false | true | true | false | false | true | true | true | false | false ]; + input float in1 = [ -0.5 | -20.125 | 3.5 | 2.0 | 1.0 | 0.0 | 0.0 | 1.0 | 36.8125 | -8.25 ]; + input int in2 = [ -66 | -192 | 5 | 255 | 0 | -12 | 11 | 1 | 2 | 8 ]; + input bool in3 = [ true | false | true | false | false | false | true | false | true | true ]; + output mat2 out0 = [ mat2(0.0, -0.5, -66.0, 1.0) | mat2(1.0, -20.125, -192.0, 0.0) | mat2(1.0, 3.5, 5.0, 1.0) | mat2(0.0, 2.0, 255.0, 0.0) | mat2(0.0, 1.0, 0.0, 0.0) | mat2(1.0, 0.0, -12.0, 0.0) | mat2(1.0, 0.0, 11.0, 1.0) | mat2(1.0, 1.0, 1.0, 0.0) | mat2(0.0, 36.8125, 2.0, 1.0) | mat2(0.0, -8.25, 8.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case vec2_ivec2_to_mat2 + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) ]; + input ivec2 in1 = [ ivec2(-32, 64) | ivec2(0, 0) | ivec2(0, -2) | ivec2(0, 0) | ivec2(1, 1) ]; + output mat2 out0 = [ mat2(0.0, 0.5, -32.0, 64.0) | mat2(-32.0, 64.0, 0.0, 0.0) | mat2(-0.5, -2.25, 0.0, -2.0) | mat2(-0.75, -0.0322580645161, 0.0, 0.0) | mat2(1.0, 1.25, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bvec2_to_mat2 + values + { + input vec2 in0 = [ vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(0.0, 0.5) ]; + input bvec2 in1 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) ]; + output mat2 out0 = [ mat2(-32.0, 64.0, 0.0, 1.0) | mat2(-0.5, -2.25, 0.0, 0.0) | mat2(-0.75, -0.0322580645161, 1.0, 0.0) | mat2(1.0, 1.25, 0.0, 0.0) | mat2(0.0, 0.5, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec3_float_to_mat2 + values + { + input bvec3 in0 = [ bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, false, false) | bvec3(false, true, false) | bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, false, false) ]; + input float in1 = [ -20.125 | -0.5 | 3.5 | -8.25 | 0.0 | 1.0 | 2.0 | 36.8125 ]; + output mat2 out0 = [ mat2(0.0, 1.0, 0.0, -20.125) | mat2(1.0, 1.0, 1.0, -0.5) | mat2(0.0, 0.0, 0.0, 3.5) | mat2(1.0, 0.0, 0.0, -8.25) | mat2(0.0, 1.0, 0.0, 0.0) | mat2(1.0, 0.0, 0.0, 1.0) | mat2(0.0, 0.0, 0.0, 2.0) | mat2(0.0, 0.0, 0.0, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case vec3_float_to_mat2 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) | vec3(-32.0, 64.0, -51.0) | vec3(-0.5, -2.25, -4.875) | vec3(1.0, 1.25, 1.125) ]; + input float in1 = [ -8.25 | 36.8125 | -0.5 | -20.125 | 1.0 | 2.0 | 0.0 | 3.5 ]; + output mat2 out0 = [ mat2(0.0, 0.5, 0.75, -8.25) | mat2(1.0, 1.25, 1.125, 36.8125) | mat2(-0.75, -0.0322580645161, 0.0526315789474, -0.5) | mat2(-0.5, -2.25, -4.875, -20.125) | mat2(0.0, 0.5, 0.75, 1.0) | mat2(-32.0, 64.0, -51.0, 2.0) | mat2(-0.5, -2.25, -4.875, 0.0) | mat2(1.0, 1.25, 1.125, 3.5) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_ivec2_int_to_mat2 + values + { + input int in0 = [ -66 | 255 | 8 | 0 | 5 | -12 | 1 | -192 | 2 | 11 ]; + input ivec2 in1 = [ ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(0, -2) | ivec2(0, 0) | ivec2(1, 1) ]; + input int in2 = [ 0 | -12 | 8 | -66 | 11 | 5 | 255 | 2 | 1 | -192 ]; + output mat2 out0 = [ mat2(-66.0, 0.0, -2.0, 0.0) | mat2(255.0, 0.0, 0.0, -12.0) | mat2(8.0, -32.0, 64.0, 8.0) | mat2(0.0, 1.0, 1.0, -66.0) | mat2(5.0, 0.0, 0.0, 11.0) | mat2(-12.0, 0.0, 0.0, 5.0) | mat2(1.0, -32.0, 64.0, 255.0) | mat2(-192.0, 0.0, -2.0, 2.0) | mat2(2.0, 0.0, 0.0, 1.0) | mat2(11.0, 1.0, 1.0, -192.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_ivec2_to_mat2 + values + { + input bool in0 = [ true | true | true | false | true | false | false | false ]; + input float in1 = [ 0.0 | 1.0 | 2.0 | -0.5 | 3.5 | -20.125 | 36.8125 | -8.25 ]; + input ivec2 in2 = [ ivec2(1, 1) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(0, -2) | ivec2(0, 0) | ivec2(0, 0) ]; + output mat2 out0 = [ mat2(1.0, 0.0, 1.0, 1.0) | mat2(1.0, 1.0, 1.0, 1.0) | mat2(1.0, 2.0, 0.0, -2.0) | mat2(0.0, -0.5, 0.0, 0.0) | mat2(1.0, 3.5, -32.0, 64.0) | mat2(0.0, -20.125, 0.0, -2.0) | mat2(0.0, 36.8125, 0.0, 0.0) | mat2(0.0, -8.25, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case vec3_vec3_vec3_to_mat3 + values + { + input vec3 in0 = [ vec3(1.0, 1.25, 1.125) | vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(-32.0, 64.0, -51.0) | vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) ]; + input vec3 in1 = [ vec3(-0.5, -2.25, -4.875) | vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(0.0, 0.5, 0.75) | vec3(-32.0, 64.0, -51.0) | vec3(1.0, 1.25, 1.125) ]; + input vec3 in2 = [ vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) | vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(-32.0, 64.0, -51.0) | vec3(1.0, 1.25, 1.125) ]; + output mat3 out0 = [ mat3(1.0, 1.25, 1.125, -0.5, -2.25, -4.875, -0.5, -2.25, -4.875) | mat3(-0.75, -0.0322580645161, 0.0526315789474, -0.75, -0.0322580645161, 0.0526315789474, 0.0, 0.5, 0.75) | mat3(-32.0, 64.0, -51.0, 0.0, 0.5, 0.75, -0.75, -0.0322580645161, 0.0526315789474) | mat3(-0.5, -2.25, -4.875, -32.0, 64.0, -51.0, -32.0, 64.0, -51.0) | mat3(0.0, 0.5, 0.75, 1.0, 1.25, 1.125, 1.0, 1.25, 1.125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case ivec3_ivec3_ivec3_to_mat3 + values + { + input ivec3 in0 = [ ivec3(0, -2, -4) | ivec3(1, 1, 1) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) | ivec3(0, 0, 0) ]; + input ivec3 in1 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + input ivec3 in2 = [ ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(0, 0, 0) | ivec3(-32, 64, -51) | ivec3(0, -2, -4) ]; + output mat3 out0 = [ mat3(0.0, -2.0, -4.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0) | mat3(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0) | mat3(-32.0, 64.0, -51.0, 0.0, -2.0, -4.0, 0.0, 0.0, 0.0) | mat3(0.0, 0.0, 0.0, -32.0, 64.0, -51.0, -32.0, 64.0, -51.0) | mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -2.0, -4.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case vec2_ivec2_float_float_int_bool_bool_to_mat3 + values + { + input vec2 in0 = [ vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) ]; + input ivec2 in1 = [ ivec2(-32, 64) | ivec2(0, -2) | ivec2(1, 1) | ivec2(0, 0) | ivec2(0, 0) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) ]; + input float in2 = [ -20.125 | -8.25 | 3.5 | 1.0 | 1.0 | -0.5 | 2.0 | 0.0 | 36.8125 | 0.0 ]; + input float in3 = [ 0.0 | -0.5 | 1.0 | -20.125 | 36.8125 | 0.0 | -8.25 | 2.0 | 3.5 | 1.0 ]; + input int in4 = [ 2 | 11 | 1 | 0 | 8 | 5 | -66 | 255 | -192 | -12 ]; + input bool in5 = [ false | true | true | false | false | true | false | true | false | true ]; + input bool in6 = [ false | true | false | false | true | true | true | true | false | false ]; + output mat3 out0 = [ mat3(-0.75, -0.0322580645161, -32.0, 64.0, -20.125, 0.0, 2.0, 0.0, 0.0) | mat3(1.0, 1.25, 0.0, -2.0, -8.25, -0.5, 11.0, 1.0, 1.0) | mat3(0.0, 0.5, 1.0, 1.0, 3.5, 1.0, 1.0, 1.0, 0.0) | mat3(-32.0, 64.0, 0.0, 0.0, 1.0, -20.125, 0.0, 0.0, 0.0) | mat3(-0.5, -2.25, 0.0, 0.0, 1.0, 36.8125, 8.0, 0.0, 1.0) | mat3(-32.0, 64.0, 0.0, -2.0, -0.5, 0.0, 5.0, 1.0, 1.0) | mat3(-0.75, -0.0322580645161, -32.0, 64.0, 2.0, -8.25, -66.0, 0.0, 1.0) | mat3(1.0, 1.25, 0.0, 0.0, 0.0, 2.0, 255.0, 1.0, 1.0) | mat3(0.0, 0.5, 1.0, 1.0, 36.8125, 3.5, -192.0, 0.0, 0.0) | mat3(-0.5, -2.25, 0.0, 0.0, 0.0, 1.0, -12.0, 1.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2, in3, in4, in5, in6); + ${OUTPUT} + } + "" + end + + case bool_float_int_vec2_bool_bvec2_float_to_mat3 + values + { + input bool in0 = [ false | false | false | true | false | false | true | true | true | true ]; + input float in1 = [ 3.5 | -20.125 | 36.8125 | 0.0 | 2.0 | -8.25 | 1.0 | -0.5 | 1.0 | 0.0 ]; + input int in2 = [ 255 | -192 | 11 | 0 | 8 | 5 | -66 | 2 | -12 | 1 ]; + input vec2 in3 = [ vec2(0.0, 0.5) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) | vec2(-32.0, 64.0) ]; + input bool in4 = [ true | true | false | false | false | true | false | true | false | true ]; + input bvec2 in5 = [ bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(false, true) ]; + input float in6 = [ 0.0 | 36.8125 | 3.5 | -0.5 | -8.25 | 1.0 | 0.0 | 1.0 | -20.125 | 2.0 ]; + output mat3 out0 = [ mat3(0.0, 3.5, 255.0, 0.0, 0.5, 1.0, 0.0, 0.0, 0.0) | mat3(0.0, -20.125, -192.0, 0.0, 0.5, 1.0, 0.0, 0.0, 36.8125) | mat3(0.0, 36.8125, 11.0, -0.5, -2.25, 0.0, 1.0, 1.0, 3.5) | mat3(1.0, 0.0, 0.0, 1.0, 1.25, 0.0, 0.0, 1.0, -0.5) | mat3(0.0, 2.0, 8.0, -0.5, -2.25, 0.0, 1.0, 1.0, -8.25) | mat3(0.0, -8.25, 5.0, -0.75, -0.0322580645161, 1.0, 0.0, 0.0, 1.0) | mat3(1.0, 1.0, -66.0, -32.0, 64.0, 0.0, 1.0, 0.0, 0.0) | mat3(1.0, -0.5, 2.0, 1.0, 1.25, 1.0, 1.0, 0.0, 1.0) | mat3(1.0, 1.0, -12.0, -0.75, -0.0322580645161, 0.0, 0.0, 0.0, -20.125) | mat3(1.0, 0.0, 1.0, -32.0, 64.0, 1.0, 0.0, 1.0, 2.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2, in3, in4, in5, in6); + ${OUTPUT} + } + "" + end + + case bool_bvec2_int_vec4_bool_to_mat3 + values + { + input bool in0 = [ true | false | false | false | false | true | true | true | true | false ]; + input bvec2 in1 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(true, false) | bvec2(false, true) ]; + input int in2 = [ 2 | -66 | 1 | 8 | -12 | 0 | 5 | 11 | 255 | -192 ]; + input vec4 in3 = [ vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(0.0, 0.5, 0.75, 0.825) | vec4(0.0, 0.5, 0.75, 0.825) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.5, -2.25, -4.875, 9.0) ]; + input bool in4 = [ false | false | true | true | true | false | true | false | false | true ]; + output mat3 out0 = [ mat3(1.0, 1.0, 1.0, 2.0, 1.0, 1.25, 1.125, 1.75, 0.0) | mat3(0.0, 0.0, 0.0, -66.0, -0.5, -2.25, -4.875, 9.0, 0.0) | mat3(0.0, 0.0, 1.0, 1.0, -0.75, -0.0322580645161, 0.0526315789474, 0.25, 1.0) | mat3(0.0, 0.0, 0.0, 8.0, 1.0, 1.25, 1.125, 1.75, 1.0) | mat3(0.0, 0.0, 0.0, -12.0, -0.75, -0.0322580645161, 0.0526315789474, 0.25, 1.0) | mat3(1.0, 1.0, 0.0, 0.0, -32.0, 64.0, -51.0, 24.0, 0.0) | mat3(1.0, 0.0, 0.0, 5.0, 0.0, 0.5, 0.75, 0.825, 1.0) | mat3(1.0, 1.0, 1.0, 11.0, 0.0, 0.5, 0.75, 0.825, 0.0) | mat3(1.0, 1.0, 0.0, 255.0, -32.0, 64.0, -51.0, 24.0, 0.0) | mat3(0.0, 0.0, 1.0, -192.0, -0.5, -2.25, -4.875, 9.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2, in3, in4); + ${OUTPUT} + } + "" + end + + case float_bvec4_ivec2_bool_bool_to_mat3 + values + { + input float in0 = [ -0.5 | 36.8125 | 1.0 | 0.0 | -20.125 | 2.0 | -8.25 | 3.5 ]; + input bvec4 in1 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, true) | bvec4(true, false, false, true) | bvec4(false, true, false, false) ]; + input ivec2 in2 = [ ivec2(1, 1) | ivec2(0, 0) | ivec2(0, 0) | ivec2(0, -2) | ivec2(0, -2) | ivec2(0, 0) | ivec2(1, 1) | ivec2(-32, 64) ]; + input bool in3 = [ true | false | true | false | true | false | false | true ]; + input bool in4 = [ false | true | false | true | false | false | true | true ]; + output mat3 out0 = [ mat3(-0.5, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0) | mat3(36.8125, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0) | mat3(0.0, 0.0, 1.0, 0.0, 0.0, 0.0, -2.0, 0.0, 1.0) | mat3(-20.125, 1.0, 1.0, 1.0, 1.0, 0.0, -2.0, 1.0, 0.0) | mat3(2.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) | mat3(-8.25, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 1.0) | mat3(3.5, 0.0, 1.0, 0.0, 0.0, -32.0, 64.0, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0, in1, in2, in3, in4); + ${OUTPUT} + } + "" + end + + case vec4_vec4_vec4_vec4_to_mat4 + values + { + input vec4 in0 = [ vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(0.0, 0.5, 0.75, 0.825) ]; + input vec4 in1 = [ vec4(1.0, 1.25, 1.125, 1.75) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(0.0, 0.5, 0.75, 0.825) ]; + input vec4 in2 = [ vec4(-32.0, 64.0, -51.0, 24.0) | vec4(0.0, 0.5, 0.75, 0.825) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) ]; + input vec4 in3 = [ vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(0.0, 0.5, 0.75, 0.825) ]; + output mat4 out0 = [ mat4(-32.0, 64.0, -51.0, 24.0, 1.0, 1.25, 1.125, 1.75, -32.0, 64.0, -51.0, 24.0, -0.5, -2.25, -4.875, 9.0) | mat4(-0.75, -0.0322580645161, 0.0526315789474, 0.25, -32.0, 64.0, -51.0, 24.0, 0.0, 0.5, 0.75, 0.825, -32.0, 64.0, -51.0, 24.0) | mat4(-0.5, -2.25, -4.875, 9.0, -0.75, -0.0322580645161, 0.0526315789474, 0.25, -0.75, -0.0322580645161, 0.0526315789474, 0.25, 1.0, 1.25, 1.125, 1.75) | mat4(1.0, 1.25, 1.125, 1.75, -0.5, -2.25, -4.875, 9.0, 1.0, 1.25, 1.125, 1.75, -0.75, -0.0322580645161, 0.0526315789474, 0.25) | mat4(0.0, 0.5, 0.75, 0.825, 0.0, 0.5, 0.75, 0.825, -0.5, -2.25, -4.875, 9.0, 0.0, 0.5, 0.75, 0.825) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case ivec4_ivec4_ivec4_ivec4_to_mat4 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(-32, 64, -51, 24) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(0, 0, 0, 0) ]; + input ivec4 in1 = [ ivec4(0, -2, -4, 9) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(0, 0, 0, 0) | ivec4(-32, 64, -51, 24) ]; + input ivec4 in2 = [ ivec4(0, 0, 0, 0) | ivec4(0, -2, -4, 9) | ivec4(1, 1, 1, 1) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + input ivec4 in3 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(0, 0, 0, 0) | ivec4(-32, 64, -51, 24) ]; + output mat4 out0 = [ mat4(0.0, 0.0, 0.0, 0.0, 0.0, -2.0, -4.0, 9.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | mat4(-32.0, 64.0, -51.0, 24.0, 1.0, 1.0, 1.0, 1.0, 0.0, -2.0, -4.0, 9.0, 1.0, 1.0, 1.0, 1.0) | mat4(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 0.0, -2.0, -4.0, 9.0) | mat4(0.0, -2.0, -4.0, 9.0, 0.0, 0.0, 0.0, 0.0, -32.0, 64.0, -51.0, 24.0, 0.0, 0.0, 0.0, 0.0) | mat4(0.0, 0.0, 0.0, 0.0, -32.0, 64.0, -51.0, 24.0, 0.0, 0.0, 0.0, 0.0, -32.0, 64.0, -51.0, 24.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bvec4_bvec4_bvec4_bvec4_to_mat4 + values + { + input bvec4 in0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, false, false, true) | bvec4(false, true, false, false) | bvec4(false, false, false, true) ]; + input bvec4 in1 = [ bvec4(true, true, true, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, false, false, true) | bvec4(false, false, false, false) ]; + input bvec4 in2 = [ bvec4(true, true, true, true) | bvec4(false, false, false, true) | bvec4(false, false, false, false) | bvec4(true, false, false, true) | bvec4(false, true, false, false) ]; + input bvec4 in3 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) ]; + output mat4 out0 = [ mat4(0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0) | mat4(1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat4(1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0) | mat4(0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0) | mat4(0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case float_ivec3_bvec3_vec4_ivec2_float_vec2_to_mat4 + values + { + input float in0 = [ -0.5 | -20.125 | 1.0 | 2.0 | 3.5 | 36.8125 | -8.25 | 0.0 ]; + input ivec3 in1 = [ ivec3(1, 1, 1) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) | ivec3(0, -2, -4) | ivec3(0, 0, 0) | ivec3(0, -2, -4) ]; + input bvec3 in2 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) ]; + input vec4 in3 = [ vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(0.0, 0.5, 0.75, 0.825) | vec4(0.0, 0.5, 0.75, 0.825) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) | vec4(-0.5, -2.25, -4.875, 9.0) ]; + input ivec2 in4 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, 0) | ivec2(1, 1) ]; + input float in5 = [ 3.5 | -20.125 | -8.25 | 0.0 | 36.8125 | -0.5 | 1.0 | 2.0 ]; + input vec2 in6 = [ vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) | vec2(-0.5, -2.25) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) ]; + output mat4 out0 = [ mat4(-0.5, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.25, 1.125, 1.75, 0.0, 0.0, 3.5, -32.0, 64.0) | mat4(-20.125, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, -0.5, -2.25, -4.875, 9.0, 0.0, -2.0, -20.125, 1.0, 1.25) | mat4(1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.75, 0.825, 0.0, 0.0, -8.25, -0.75, -0.0322580645161) | mat4(2.0, -32.0, 64.0, -51.0, 0.0, 1.0, 0.0, 0.0, 0.5, 0.75, 0.825, -32.0, 64.0, 0.0, -0.5, -2.25) | mat4(3.5, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, -32.0, 64.0, -51.0, 24.0, 1.0, 1.0, 36.8125, 1.0, 1.25) | mat4(36.8125, 0.0, -2.0, -4.0, 1.0, 0.0, 0.0, 1.0, 1.25, 1.125, 1.75, 0.0, -2.0, -0.5, 0.0, 0.5) | mat4(-8.25, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, -0.75, -0.0322580645161, 0.0526315789474, 0.25, 0.0, 0.0, 1.0, 0.0, 0.5) | mat4(0.0, 0.0, -2.0, -4.0, 0.0, 1.0, 0.0, -0.5, -2.25, -4.875, 9.0, 1.0, 1.0, 2.0, -0.5, -2.25) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0, in1, in2, in3, in4, in5, in6); + ${OUTPUT} + } + "" + end + + +end # matrix_combine diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html new file mode 100644 index 000000000000..c7def9ec1467 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.test new file mode 100644 index 000000000000..86826940a483 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_matrix_to_matrix.test @@ -0,0 +1,206 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group matrix_to_matrix "Matrix to Matrix Conversions" + + case mat4_to_mat4 + values + { + input mat4 in0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, 32.0, 0.125, -6.725, 12.5, 0.0208333333333, 0.0625, -0.5, -0.75, -8.425, 0.03125, -0.0125, 9.975, -6.542, 0.015625, 9.975) ]; + output mat4 out0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, 32.0, 0.125, -6.725, 12.5, 0.0208333333333, 0.0625, -0.5, -0.75, -8.425, 0.03125, -0.0125, 9.975, -6.542, 0.015625, 9.975) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case mat4_to_mat3 + values + { + input mat4 in0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, 32.0, 0.125, -6.725, 12.5, 0.0208333333333, 0.0625, -0.5, -0.75, -8.425, 0.03125, -0.0125, 9.975, -6.542, 0.015625, 9.975) ]; + output mat3 out0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, 32.0, 0.125, 12.5, 0.0208333333333, 0.0625, -0.75, -8.425, 0.03125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case mat4_to_mat2 + values + { + input mat4 in0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, 32.0, 0.125, -6.725, 12.5, 0.0208333333333, 0.0625, -0.5, -0.75, -8.425, 0.03125, -0.0125, 9.975, -6.542, 0.015625, 9.975) ]; + output mat2 out0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, 32.0, 12.5, 0.0208333333333) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + case mat3_to_mat4 + values + { + input mat3 in0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, 32.0, 0.125, 12.5, 0.03125, 0.0625, -0.75, 0.015625, 0.03125) ]; + output mat4 out0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, 32.0, 0.125, 0.0, 12.5, 0.03125, 0.0625, 0.0, -0.75, 0.015625, 0.03125, 0.0, 0.0, 0.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case mat3_to_mat3 + values + { + input mat3 in0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, 32.0, 0.125, 12.5, 0.03125, 0.0625, -0.75, 0.015625, 0.03125) ]; + output mat3 out0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, 32.0, 0.125, 12.5, 0.03125, 0.0625, -0.75, 0.015625, 0.03125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case mat3_to_mat2 + values + { + input mat3 in0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, 32.0, 0.125, 12.5, 0.03125, 0.0625, -0.75, 0.015625, 0.03125) ]; + output mat2 out0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, 32.0, 12.5, 0.03125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + case mat2_to_mat4 + values + { + input mat2 in0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(8.0, -24.0, 16.0, -16.0) | mat2(0.125, 0.03125, 0.0625, 0.015625) | mat2(-18.725, -0.0125, -0.5, 19.975) ]; + output mat4 out0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, -0.75, 0.0, 0.0, 12.5, 9.975, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(6.5, -0.75, 0.0, 0.0, 12.5, 9.975, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(8.0, -24.0, 0.0, 0.0, 16.0, -16.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(0.125, 0.03125, 0.0, 0.0, 0.0625, 0.015625, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(-18.725, -0.0125, 0.0, 0.0, -0.5, 19.975, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case mat2_to_mat3 + values + { + input mat2 in0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(8.0, -24.0, 16.0, -16.0) | mat2(0.125, 0.03125, 0.0625, 0.015625) | mat2(-18.725, -0.0125, -0.5, 19.975) ]; + output mat3 out0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, -0.75, 0.0, 12.5, 9.975, 0.0, 0.0, 0.0, 1.0) | mat3(6.5, -0.75, 0.0, 12.5, 9.975, 0.0, 0.0, 0.0, 1.0) | mat3(8.0, -24.0, 0.0, 16.0, -16.0, 0.0, 0.0, 0.0, 1.0) | mat3(0.125, 0.03125, 0.0, 0.0625, 0.015625, 0.0, 0.0, 0.0, 1.0) | mat3(-18.725, -0.0125, 0.0, -0.5, 19.975, 0.0, 0.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case mat2_to_mat2 + values + { + input mat2 in0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(8.0, -24.0, 16.0, -16.0) | mat2(0.125, 0.03125, 0.0625, 0.015625) | mat2(-18.725, -0.0125, -0.5, 19.975) ]; + output mat2 out0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(6.5, -0.75, 12.5, 9.975) | mat2(8.0, -24.0, 16.0, -16.0) | mat2(0.125, 0.03125, 0.0625, 0.015625) | mat2(-18.725, -0.0125, -0.5, 19.975) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + +end # matrix_to_matrix diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html new file mode 100644 index 000000000000..94dd7c4f8dbd --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.test new file mode 100644 index 000000000000..d08377901f1c --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_matrix.test @@ -0,0 +1,206 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group scalar_to_matrix "Scalar to Matrix Conversions" + + case float_to_mat4 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output mat4 out0 = [ 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) | mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0) | mat4(3.5, 0.0, 0.0, 0.0, 0.0, 3.5, 0.0, 0.0, 0.0, 0.0, 3.5, 0.0, 0.0, 0.0, 0.0, 3.5) | mat4(-0.5, 0.0, 0.0, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 0.0, -0.5) | mat4(-8.25, 0.0, 0.0, 0.0, 0.0, -8.25, 0.0, 0.0, 0.0, 0.0, -8.25, 0.0, 0.0, 0.0, 0.0, -8.25) | mat4(-20.125, 0.0, 0.0, 0.0, 0.0, -20.125, 0.0, 0.0, 0.0, 0.0, -20.125, 0.0, 0.0, 0.0, 0.0, -20.125) | mat4(36.8125, 0.0, 0.0, 0.0, 0.0, 36.8125, 0.0, 0.0, 0.0, 0.0, 36.8125, 0.0, 0.0, 0.0, 0.0, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case float_to_mat3 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output mat3 out0 = [ mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0) | mat3(3.5, 0.0, 0.0, 0.0, 3.5, 0.0, 0.0, 0.0, 3.5) | mat3(-0.5, 0.0, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, -0.5) | mat3(-8.25, 0.0, 0.0, 0.0, -8.25, 0.0, 0.0, 0.0, -8.25) | mat3(-20.125, 0.0, 0.0, 0.0, -20.125, 0.0, 0.0, 0.0, -20.125) | mat3(36.8125, 0.0, 0.0, 0.0, 36.8125, 0.0, 0.0, 0.0, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case float_to_mat2 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output mat2 out0 = [ mat2(0.0, 0.0, 0.0, 0.0) | mat2(1.0, 0.0, 0.0, 1.0) | mat2(2.0, 0.0, 0.0, 2.0) | mat2(3.5, 0.0, 0.0, 3.5) | mat2(-0.5, 0.0, 0.0, -0.5) | mat2(-8.25, 0.0, 0.0, -8.25) | mat2(-20.125, 0.0, 0.0, -20.125) | mat2(36.8125, 0.0, 0.0, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + case int_to_mat4 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output mat4 out0 = [ 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) | mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | mat4(2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 0.0, 2.0) | mat4(5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 0.0, 5.0) | mat4(8.0, 0.0, 0.0, 0.0, 0.0, 8.0, 0.0, 0.0, 0.0, 0.0, 8.0, 0.0, 0.0, 0.0, 0.0, 8.0) | mat4(11.0, 0.0, 0.0, 0.0, 0.0, 11.0, 0.0, 0.0, 0.0, 0.0, 11.0, 0.0, 0.0, 0.0, 0.0, 11.0) | mat4(-12.0, 0.0, 0.0, 0.0, 0.0, -12.0, 0.0, 0.0, 0.0, 0.0, -12.0, 0.0, 0.0, 0.0, 0.0, -12.0) | mat4(-66.0, 0.0, 0.0, 0.0, 0.0, -66.0, 0.0, 0.0, 0.0, 0.0, -66.0, 0.0, 0.0, 0.0, 0.0, -66.0) | mat4(-192.0, 0.0, 0.0, 0.0, 0.0, -192.0, 0.0, 0.0, 0.0, 0.0, -192.0, 0.0, 0.0, 0.0, 0.0, -192.0) | mat4(255.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 0.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case int_to_mat3 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output mat3 out0 = [ mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) | mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(2.0, 0.0, 0.0, 0.0, 2.0, 0.0, 0.0, 0.0, 2.0) | mat3(5.0, 0.0, 0.0, 0.0, 5.0, 0.0, 0.0, 0.0, 5.0) | mat3(8.0, 0.0, 0.0, 0.0, 8.0, 0.0, 0.0, 0.0, 8.0) | mat3(11.0, 0.0, 0.0, 0.0, 11.0, 0.0, 0.0, 0.0, 11.0) | mat3(-12.0, 0.0, 0.0, 0.0, -12.0, 0.0, 0.0, 0.0, -12.0) | mat3(-66.0, 0.0, 0.0, 0.0, -66.0, 0.0, 0.0, 0.0, -66.0) | mat3(-192.0, 0.0, 0.0, 0.0, -192.0, 0.0, 0.0, 0.0, -192.0) | mat3(255.0, 0.0, 0.0, 0.0, 255.0, 0.0, 0.0, 0.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case int_to_mat2 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output mat2 out0 = [ mat2(0.0, 0.0, 0.0, 0.0) | mat2(1.0, 0.0, 0.0, 1.0) | mat2(2.0, 0.0, 0.0, 2.0) | mat2(5.0, 0.0, 0.0, 5.0) | mat2(8.0, 0.0, 0.0, 8.0) | mat2(11.0, 0.0, 0.0, 11.0) | mat2(-12.0, 0.0, 0.0, -12.0) | mat2(-66.0, 0.0, 0.0, -66.0) | mat2(-192.0, 0.0, 0.0, -192.0) | mat2(255.0, 0.0, 0.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + case bool_to_mat4 + values + { + input bool in0 = [ true | false ]; + output mat4 out0 = [ mat4(1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0) | 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) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat4(in0); + ${OUTPUT} + } + "" + end + + case bool_to_mat3 + values + { + input bool in0 = [ true | false ]; + output mat3 out0 = [ mat3(1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0) | mat3(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat3(in0); + ${OUTPUT} + } + "" + end + + case bool_to_mat2 + values + { + input bool in0 = [ true | false ]; + output mat2 out0 = [ mat2(1.0, 0.0, 0.0, 1.0) | mat2(0.0, 0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = mat2(in0); + ${OUTPUT} + } + "" + end + + +end # scalar_to_matrix diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html new file mode 100644 index 000000000000..4909afd403f6 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.test new file mode 100644 index 000000000000..4fe66869b59a --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_scalar.test @@ -0,0 +1,206 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group scalar_to_scalar "Scalar to Scalar Conversions" + + case float_to_float + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output float out0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case float_to_int + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output int out0 = [ 0 | 1 | 2 | 3 | 0 | -8 | -20 | 36 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case float_to_bool + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output bool out0 = [ false | true | true | true | true | true | true | true ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case int_to_float + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output float out0 = [ 0.0 | 1.0 | 2.0 | 5.0 | 8.0 | 11.0 | -12.0 | -66.0 | -192.0 | 255.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case int_to_int + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output int out0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case int_to_bool + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output bool out0 = [ false | true | true | true | true | true | true | true | true | true ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case bool_to_float + values + { + input bool in0 = [ true | false ]; + output float out0 = [ 1.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case bool_to_int + values + { + input bool in0 = [ true | false ]; + output int out0 = [ 1 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case bool_to_bool + values + { + input bool in0 = [ true | false ]; + output bool out0 = [ true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + +end # scalar_to_scalar diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.html new file mode 100644 index 000000000000..0cc94ce54c50 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.test new file mode 100644 index 000000000000..6bb14d8a6350 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_scalar_to_vector.test @@ -0,0 +1,602 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group scalar_to_vector "Scalar to Vector Conversions" + + case float_to_vec2 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(2.0, 2.0) | vec2(3.5, 3.5) | vec2(-0.5, -0.5) | vec2(-8.25, -8.25) | vec2(-20.125, -20.125) | vec2(36.8125, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case float_to_vec3 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(2.0, 2.0, 2.0) | vec3(3.5, 3.5, 3.5) | vec3(-0.5, -0.5, -0.5) | vec3(-8.25, -8.25, -8.25) | vec3(-20.125, -20.125, -20.125) | vec3(36.8125, 36.8125, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case float_to_vec4 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(2.0, 2.0, 2.0, 2.0) | vec4(3.5, 3.5, 3.5, 3.5) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-8.25, -8.25, -8.25, -8.25) | vec4(-20.125, -20.125, -20.125, -20.125) | vec4(36.8125, 36.8125, 36.8125, 36.8125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case float_to_ivec2 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(2, 2) | ivec2(3, 3) | ivec2(0, 0) | ivec2(-8, -8) | ivec2(-20, -20) | ivec2(36, 36) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case float_to_ivec3 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(2, 2, 2) | ivec3(3, 3, 3) | ivec3(0, 0, 0) | ivec3(-8, -8, -8) | ivec3(-20, -20, -20) | ivec3(36, 36, 36) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case float_to_ivec4 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(2, 2, 2, 2) | ivec4(3, 3, 3, 3) | ivec4(0, 0, 0, 0) | ivec4(-8, -8, -8, -8) | ivec4(-20, -20, -20, -20) | ivec4(36, 36, 36, 36) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case float_to_bvec2 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case float_to_bvec3 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case float_to_bvec4 + values + { + input float in0 = [ 0.0 | 1.0 | 2.0 | 3.5 | -0.5 | -8.25 | -20.125 | 36.8125 ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case int_to_vec2 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(2.0, 2.0) | vec2(5.0, 5.0) | vec2(8.0, 8.0) | vec2(11.0, 11.0) | vec2(-12.0, -12.0) | vec2(-66.0, -66.0) | vec2(-192.0, -192.0) | vec2(255.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case int_to_vec3 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(2.0, 2.0, 2.0) | vec3(5.0, 5.0, 5.0) | vec3(8.0, 8.0, 8.0) | vec3(11.0, 11.0, 11.0) | vec3(-12.0, -12.0, -12.0) | vec3(-66.0, -66.0, -66.0) | vec3(-192.0, -192.0, -192.0) | vec3(255.0, 255.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case int_to_vec4 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(2.0, 2.0, 2.0, 2.0) | vec4(5.0, 5.0, 5.0, 5.0) | vec4(8.0, 8.0, 8.0, 8.0) | vec4(11.0, 11.0, 11.0, 11.0) | vec4(-12.0, -12.0, -12.0, -12.0) | vec4(-66.0, -66.0, -66.0, -66.0) | vec4(-192.0, -192.0, -192.0, -192.0) | vec4(255.0, 255.0, 255.0, 255.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case int_to_ivec2 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(2, 2) | ivec2(5, 5) | ivec2(8, 8) | ivec2(11, 11) | ivec2(-12, -12) | ivec2(-66, -66) | ivec2(-192, -192) | ivec2(255, 255) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case int_to_ivec3 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(2, 2, 2) | ivec3(5, 5, 5) | ivec3(8, 8, 8) | ivec3(11, 11, 11) | ivec3(-12, -12, -12) | ivec3(-66, -66, -66) | ivec3(-192, -192, -192) | ivec3(255, 255, 255) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case int_to_ivec4 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(2, 2, 2, 2) | ivec4(5, 5, 5, 5) | ivec4(8, 8, 8, 8) | ivec4(11, 11, 11, 11) | ivec4(-12, -12, -12, -12) | ivec4(-66, -66, -66, -66) | ivec4(-192, -192, -192, -192) | ivec4(255, 255, 255, 255) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case int_to_bvec2 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case int_to_bvec3 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case int_to_bvec4 + values + { + input int in0 = [ 0 | 1 | 2 | 5 | 8 | 11 | -12 | -66 | -192 | 255 ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case bool_to_vec2 + values + { + input bool in0 = [ true | false ]; + output vec2 out0 = [ vec2(1.0, 1.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case bool_to_vec3 + values + { + input bool in0 = [ true | false ]; + output vec3 out0 = [ vec3(1.0, 1.0, 1.0) | vec3(0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case bool_to_vec4 + values + { + input bool in0 = [ true | false ]; + output vec4 out0 = [ vec4(1.0, 1.0, 1.0, 1.0) | vec4(0.0, 0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case bool_to_ivec2 + values + { + input bool in0 = [ true | false ]; + output ivec2 out0 = [ ivec2(1, 1) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case bool_to_ivec3 + values + { + input bool in0 = [ true | false ]; + output ivec3 out0 = [ ivec3(1, 1, 1) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case bool_to_ivec4 + values + { + input bool in0 = [ true | false ]; + output ivec4 out0 = [ ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case bool_to_bvec2 + values + { + input bool in0 = [ true | false ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case bool_to_bvec3 + values + { + input bool in0 = [ true | false ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case bool_to_bvec4 + values + { + input bool in0 = [ true | false ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + +end # scalar_to_vector diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.html new file mode 100644 index 000000000000..81ec48f331b8 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.test new file mode 100644 index 000000000000..222d3e6bfee7 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_combine.test @@ -0,0 +1,1844 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group vector_combine "Vector Combine Constructors" + + case vec2_vec2_to_vec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.75, -0.0322580645161) ]; + input vec2 in1 = [ vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(-0.5, -2.25, -32.0, 64.0) | vec4(-32.0, 64.0, 1.0, 1.25) | vec4(1.0, 1.25, 0.0, 0.5) | vec4(0.0, 0.5, -0.5, -2.25) | vec4(-0.75, -0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_vec2_to_ivec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.75, -0.0322580645161) ]; + input vec2 in1 = [ vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) ]; + output ivec4 out0 = [ ivec4(0, -2, -32, 64) | ivec4(-32, 64, 1, 1) | ivec4(1, 1, 0, 0) | ivec4(0, 0, 0, -2) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_vec2_to_bvec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.75, -0.0322580645161) ]; + input vec2 in1 = [ vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(0.0, 0.5) | vec2(-0.5, -2.25) | vec2(-0.75, -0.0322580645161) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, false, true) | bvec4(false, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_bvec2_to_vec4 + values + { + input bvec2 in0 = [ bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input bvec2 in1 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 1.0, 0.0) | vec4(1.0, 0.0, 0.0, 0.0) | vec4(0.0, 1.0, 0.0, 1.0) | vec4(0.0, 0.0, 1.0, 1.0) | vec4(1.0, 1.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_bvec2_to_ivec4 + values + { + input bvec2 in0 = [ bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input bvec2 in1 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output ivec4 out0 = [ ivec4(0, 0, 1, 0) | ivec4(1, 0, 0, 0) | ivec4(0, 1, 0, 1) | ivec4(0, 0, 1, 1) | ivec4(1, 1, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_bvec2_to_bvec4 + values + { + input bvec2 in0 = [ bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input bvec2 in1 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(true, false, false, false) | bvec4(false, true, false, true) | bvec4(false, false, true, true) | bvec4(true, true, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case float_float_float_float_to_vec4 + values + { + input float in0 = [ 1.0 | 0.0 | -0.5 | -8.25 | 3.5 | -20.125 | 36.8125 | 2.0 ]; + input float in1 = [ 0.0 | 36.8125 | -8.25 | 2.0 | 3.5 | 1.0 | -20.125 | -0.5 ]; + input float in2 = [ 3.5 | 36.8125 | -8.25 | 1.0 | 2.0 | 0.0 | -20.125 | -0.5 ]; + input float in3 = [ 3.5 | 36.8125 | 1.0 | -8.25 | 2.0 | 0.0 | -0.5 | -20.125 ]; + output vec4 out0 = [ vec4(1.0, 0.0, 3.5, 3.5) | vec4(0.0, 36.8125, 36.8125, 36.8125) | vec4(-0.5, -8.25, -8.25, 1.0) | vec4(-8.25, 2.0, 1.0, -8.25) | vec4(3.5, 3.5, 2.0, 2.0) | vec4(-20.125, 1.0, 0.0, 0.0) | vec4(36.8125, -20.125, -20.125, -0.5) | vec4(2.0, -0.5, -0.5, -20.125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case float_float_float_float_to_ivec4 + values + { + input float in0 = [ 1.0 | 0.0 | -0.5 | -8.25 | 3.5 | -20.125 | 36.8125 | 2.0 ]; + input float in1 = [ 0.0 | 36.8125 | -8.25 | 2.0 | 3.5 | 1.0 | -20.125 | -0.5 ]; + input float in2 = [ 3.5 | 36.8125 | -8.25 | 1.0 | 2.0 | 0.0 | -20.125 | -0.5 ]; + input float in3 = [ 3.5 | 36.8125 | 1.0 | -8.25 | 2.0 | 0.0 | -0.5 | -20.125 ]; + output ivec4 out0 = [ ivec4(1, 0, 3, 3) | ivec4(0, 36, 36, 36) | ivec4(0, -8, -8, 1) | ivec4(-8, 2, 1, -8) | ivec4(3, 3, 2, 2) | ivec4(-20, 1, 0, 0) | ivec4(36, -20, -20, 0) | ivec4(2, 0, 0, -20) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case float_float_float_float_to_bvec4 + values + { + input float in0 = [ 1.0 | 0.0 | -0.5 | -8.25 | 3.5 | -20.125 | 36.8125 | 2.0 ]; + input float in1 = [ 0.0 | 36.8125 | -8.25 | 2.0 | 3.5 | 1.0 | -20.125 | -0.5 ]; + input float in2 = [ 3.5 | 36.8125 | -8.25 | 1.0 | 2.0 | 0.0 | -20.125 | -0.5 ]; + input float in3 = [ 3.5 | 36.8125 | 1.0 | -8.25 | 2.0 | 0.0 | -0.5 | -20.125 ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case int_int_int_int_to_vec4 + values + { + input int in0 = [ -12 | -66 | 2 | 5 | 8 | -192 | 255 | 1 | 0 | 11 ]; + input int in1 = [ 2 | 5 | -66 | 11 | -192 | 8 | -12 | 1 | 255 | 0 ]; + input int in2 = [ 11 | 255 | 5 | 8 | 2 | -192 | -12 | -66 | 1 | 0 ]; + input int in3 = [ -192 | -66 | 8 | -12 | 1 | 2 | 0 | 255 | 5 | 11 ]; + output vec4 out0 = [ vec4(-12.0, 2.0, 11.0, -192.0) | vec4(-66.0, 5.0, 255.0, -66.0) | vec4(2.0, -66.0, 5.0, 8.0) | vec4(5.0, 11.0, 8.0, -12.0) | vec4(8.0, -192.0, 2.0, 1.0) | vec4(-192.0, 8.0, -192.0, 2.0) | vec4(255.0, -12.0, -12.0, 0.0) | vec4(1.0, 1.0, -66.0, 255.0) | vec4(0.0, 255.0, 1.0, 5.0) | vec4(11.0, 0.0, 0.0, 11.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case int_int_int_int_to_ivec4 + values + { + input int in0 = [ -12 | -66 | 2 | 5 | 8 | -192 | 255 | 1 | 0 | 11 ]; + input int in1 = [ 2 | 5 | -66 | 11 | -192 | 8 | -12 | 1 | 255 | 0 ]; + input int in2 = [ 11 | 255 | 5 | 8 | 2 | -192 | -12 | -66 | 1 | 0 ]; + input int in3 = [ -192 | -66 | 8 | -12 | 1 | 2 | 0 | 255 | 5 | 11 ]; + output ivec4 out0 = [ ivec4(-12, 2, 11, -192) | ivec4(-66, 5, 255, -66) | ivec4(2, -66, 5, 8) | ivec4(5, 11, 8, -12) | ivec4(8, -192, 2, 1) | ivec4(-192, 8, -192, 2) | ivec4(255, -12, -12, 0) | ivec4(1, 1, -66, 255) | ivec4(0, 255, 1, 5) | ivec4(11, 0, 0, 11) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case int_int_int_int_to_bvec4 + values + { + input int in0 = [ -12 | -66 | 2 | 5 | 8 | -192 | 255 | 1 | 0 | 11 ]; + input int in1 = [ 2 | 5 | -66 | 11 | -192 | 8 | -12 | 1 | 255 | 0 ]; + input int in2 = [ 11 | 255 | 5 | 8 | 2 | -192 | -12 | -66 | 1 | 0 ]; + input int in3 = [ -192 | -66 | 8 | -12 | 1 | 2 | 0 | 255 | 5 | 11 ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, false) | bvec4(true, true, true, true) | bvec4(false, true, true, true) | bvec4(true, false, false, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_bool_to_vec4 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ false | true ]; + input bool in2 = [ true | false ]; + input bool in3 = [ false | true ]; + output vec4 out0 = [ vec4(1.0, 0.0, 1.0, 0.0) | vec4(0.0, 1.0, 0.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_bool_to_ivec4 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ false | true ]; + input bool in2 = [ true | false ]; + input bool in3 = [ false | true ]; + output ivec4 out0 = [ ivec4(1, 0, 1, 0) | ivec4(0, 1, 0, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_bool_to_bvec4 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ false | true ]; + input bool in2 = [ true | false ]; + input bool in3 = [ false | true ]; + output bvec4 out0 = [ bvec4(true, false, true, false) | bvec4(false, true, false, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_float_int_bool_to_vec4 + values + { + input bool in0 = [ true | true | true | false | false | false | true | false | true | false ]; + input float in1 = [ 1.0 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 | -0.5 | 3.5 | -20.125 | 0.0 ]; + input int in2 = [ -192 | -12 | 2 | -66 | 255 | 8 | 0 | 5 | 11 | 1 ]; + input bool in3 = [ true | true | false | false | true | false | false | false | true | true ]; + output vec4 out0 = [ vec4(1.0, 1.0, -192.0, 1.0) | vec4(1.0, 2.0, -12.0, 1.0) | vec4(1.0, 1.0, 2.0, 0.0) | vec4(0.0, 0.0, -66.0, 0.0) | vec4(0.0, 36.8125, 255.0, 1.0) | vec4(0.0, -8.25, 8.0, 0.0) | vec4(1.0, -0.5, 0.0, 0.0) | vec4(0.0, 3.5, 5.0, 0.0) | vec4(1.0, -20.125, 11.0, 1.0) | vec4(0.0, 0.0, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_float_int_bool_to_ivec4 + values + { + input bool in0 = [ true | true | true | false | false | false | true | false | true | false ]; + input float in1 = [ 1.0 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 | -0.5 | 3.5 | -20.125 | 0.0 ]; + input int in2 = [ -192 | -12 | 2 | -66 | 255 | 8 | 0 | 5 | 11 | 1 ]; + input bool in3 = [ true | true | false | false | true | false | false | false | true | true ]; + output ivec4 out0 = [ ivec4(1, 1, -192, 1) | ivec4(1, 2, -12, 1) | ivec4(1, 1, 2, 0) | ivec4(0, 0, -66, 0) | ivec4(0, 36, 255, 1) | ivec4(0, -8, 8, 0) | ivec4(1, 0, 0, 0) | ivec4(0, 3, 5, 0) | ivec4(1, -20, 11, 1) | ivec4(0, 0, 1, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case bool_float_int_bool_to_bvec4 + values + { + input bool in0 = [ true | true | true | false | false | false | true | false | true | false ]; + input float in1 = [ 1.0 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 | -0.5 | 3.5 | -20.125 | 0.0 ]; + input int in2 = [ -192 | -12 | 2 | -66 | 255 | 8 | 0 | 5 | 11 | 1 ]; + input bool in3 = [ true | true | false | false | true | false | false | false | true | true ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, false) | bvec4(false, false, true, false) | bvec4(false, true, true, true) | bvec4(false, true, true, false) | bvec4(true, true, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2, in3); + ${OUTPUT} + } + "" + end + + case vec2_ivec2_to_vec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) | ivec2(1, 1) ]; + output vec4 out0 = [ vec4(-0.5, -2.25, 0.0, 0.0) | vec4(0.0, 0.5, 0.0, -2.0) | vec4(-32.0, 64.0, -32.0, 64.0) | vec4(1.0, 1.25, 0.0, 0.0) | vec4(-0.75, -0.0322580645161, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_ivec2_to_ivec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) | ivec2(1, 1) ]; + output ivec4 out0 = [ ivec4(0, -2, 0, 0) | ivec4(0, 0, 0, -2) | ivec4(-32, 64, -32, 64) | ivec4(1, 1, 0, 0) | ivec4(0, 0, 1, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_ivec2_to_bvec4 + values + { + input vec2 in0 = [ vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) | ivec2(1, 1) ]; + output bvec4 out0 = [ bvec4(true, true, false, false) | bvec4(false, true, false, true) | bvec4(true, true, true, true) | bvec4(true, true, false, false) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bvec2_to_vec4 + values + { + input vec2 in0 = [ vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) | vec2(0.0, 0.5) ]; + input bvec2 in1 = [ bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, true) | bvec2(false, false) ]; + output vec4 out0 = [ vec4(-32.0, 64.0, 0.0, 0.0) | vec4(-0.5, -2.25, 1.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.75, -0.0322580645161, 0.0, 1.0) | vec4(0.0, 0.5, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bvec2_to_ivec4 + values + { + input vec2 in0 = [ vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) | vec2(0.0, 0.5) ]; + input bvec2 in1 = [ bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, true) | bvec2(false, false) ]; + output ivec4 out0 = [ ivec4(-32, 64, 0, 0) | ivec4(0, -2, 1, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 1) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bvec2_to_bvec4 + values + { + input vec2 in0 = [ vec2(-32.0, 64.0) | vec2(-0.5, -2.25) | vec2(1.0, 1.25) | vec2(-0.75, -0.0322580645161) | vec2(0.0, 0.5) ]; + input bvec2 in1 = [ bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, true, false, false) | bvec4(true, true, true, false) | bvec4(true, true, true, true) | bvec4(true, true, false, true) | bvec4(false, true, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec3_float_to_vec4 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, false, false) | bvec3(false, true, false) | bvec3(false, true, false) | bvec3(true, true, true) ]; + input float in1 = [ -8.25 | -20.125 | 2.0 | 0.0 | -0.5 | 3.5 | 36.8125 | 1.0 ]; + output vec4 out0 = [ vec4(1.0, 0.0, 0.0, -8.25) | vec4(0.0, 0.0, 0.0, -20.125) | vec4(0.0, 0.0, 0.0, 2.0) | vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 0.0, 0.0, -0.5) | vec4(0.0, 1.0, 0.0, 3.5) | vec4(0.0, 1.0, 0.0, 36.8125) | vec4(1.0, 1.0, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec3_float_to_ivec4 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, false, false) | bvec3(false, true, false) | bvec3(false, true, false) | bvec3(true, true, true) ]; + input float in1 = [ -8.25 | -20.125 | 2.0 | 0.0 | -0.5 | 3.5 | 36.8125 | 1.0 ]; + output ivec4 out0 = [ ivec4(1, 0, 0, -8) | ivec4(0, 0, 0, -20) | ivec4(0, 0, 0, 2) | ivec4(0, 0, 0, 0) | ivec4(1, 0, 0, 0) | ivec4(0, 1, 0, 3) | ivec4(0, 1, 0, 36) | ivec4(1, 1, 1, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec3_float_to_bvec4 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, false, false) | bvec3(false, true, false) | bvec3(false, true, false) | bvec3(true, true, true) ]; + input float in1 = [ -8.25 | -20.125 | 2.0 | 0.0 | -0.5 | 3.5 | 36.8125 | 1.0 ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, false, false, true) | bvec4(false, false, false, false) | bvec4(true, false, false, true) | bvec4(false, true, false, true) | bvec4(false, true, false, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec3_float_to_vec4 + values + { + input vec3 in0 = [ vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(0.0, 0.5, 0.75) | vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(1.0, 1.25, 1.125) ]; + input float in1 = [ 0.0 | 2.0 | 36.8125 | 3.5 | 1.0 | -0.5 | -8.25 | -20.125 ]; + output vec4 out0 = [ vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.0) | vec4(0.0, 0.5, 0.75, 2.0) | vec4(-0.5, -2.25, -4.875, 36.8125) | vec4(0.0, 0.5, 0.75, 3.5) | vec4(1.0, 1.25, 1.125, 1.0) | vec4(-0.5, -2.25, -4.875, -0.5) | vec4(-32.0, 64.0, -51.0, -8.25) | vec4(1.0, 1.25, 1.125, -20.125) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec3_float_to_ivec4 + values + { + input vec3 in0 = [ vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(0.0, 0.5, 0.75) | vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(1.0, 1.25, 1.125) ]; + input float in1 = [ 0.0 | 2.0 | 36.8125 | 3.5 | 1.0 | -0.5 | -8.25 | -20.125 ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(0, 0, 0, 2) | ivec4(0, -2, -4, 36) | ivec4(0, 0, 0, 3) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 0) | ivec4(-32, 64, -51, -8) | ivec4(1, 1, 1, -20) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1); + ${OUTPUT} + } + "" + end + + case vec3_float_to_bvec4 + values + { + input vec3 in0 = [ vec3(-0.75, -0.0322580645161, 0.0526315789474) | vec3(0.0, 0.5, 0.75) | vec3(-0.5, -2.25, -4.875) | vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(1.0, 1.25, 1.125) ]; + input float in1 = [ 0.0 | 2.0 | 36.8125 | 3.5 | 1.0 | -0.5 | -8.25 | -20.125 ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(false, true, true, true) | bvec4(true, true, true, true) | bvec4(false, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1); + ${OUTPUT} + } + "" + end + + case int_ivec2_int_to_vec4 + values + { + input int in0 = [ -66 | 8 | -192 | 255 | 5 | -12 | 0 | 2 | 1 | 11 ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(0, 0) ]; + input int in2 = [ 8 | 2 | 11 | -192 | 255 | -12 | 0 | -66 | 1 | 5 ]; + output vec4 out0 = [ vec4(-66.0, 0.0, 0.0, 8.0) | vec4(8.0, 0.0, 0.0, 2.0) | vec4(-192.0, -32.0, 64.0, 11.0) | vec4(255.0, -32.0, 64.0, -192.0) | vec4(5.0, 1.0, 1.0, 255.0) | vec4(-12.0, 0.0, 0.0, -12.0) | vec4(0.0, 1.0, 1.0, 0.0) | vec4(2.0, 0.0, -2.0, -66.0) | vec4(1.0, 0.0, -2.0, 1.0) | vec4(11.0, 0.0, 0.0, 5.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case int_ivec2_int_to_ivec4 + values + { + input int in0 = [ -66 | 8 | -192 | 255 | 5 | -12 | 0 | 2 | 1 | 11 ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(0, 0) ]; + input int in2 = [ 8 | 2 | 11 | -192 | 255 | -12 | 0 | -66 | 1 | 5 ]; + output ivec4 out0 = [ ivec4(-66, 0, 0, 8) | ivec4(8, 0, 0, 2) | ivec4(-192, -32, 64, 11) | ivec4(255, -32, 64, -192) | ivec4(5, 1, 1, 255) | ivec4(-12, 0, 0, -12) | ivec4(0, 1, 1, 0) | ivec4(2, 0, -2, -66) | ivec4(1, 0, -2, 1) | ivec4(11, 0, 0, 5) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case int_ivec2_int_to_bvec4 + values + { + input int in0 = [ -66 | 8 | -192 | 255 | 5 | -12 | 0 | 2 | 1 | 11 ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(0, 0) ]; + input int in2 = [ 8 | 2 | 11 | -192 | 255 | -12 | 0 | -66 | 1 | 5 ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, false, false, true) | bvec4(false, true, true, false) | bvec4(true, false, true, true) | bvec4(true, false, true, true) | bvec4(true, false, false, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_ivec2_to_vec4 + values + { + input bool in0 = [ true | true | true | true | false | false | false | false ]; + input float in1 = [ 2.0 | 0.0 | 3.5 | -8.25 | 36.8125 | -20.125 | 1.0 | -0.5 ]; + input ivec2 in2 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(1, 1) | ivec2(0, 0) ]; + output vec4 out0 = [ vec4(1.0, 2.0, 0.0, 0.0) | vec4(1.0, 0.0, 0.0, 0.0) | vec4(1.0, 3.5, -32.0, 64.0) | vec4(1.0, -8.25, 1.0, 1.0) | vec4(0.0, 36.8125, 0.0, -2.0) | vec4(0.0, -20.125, 0.0, -2.0) | vec4(0.0, 1.0, 1.0, 1.0) | vec4(0.0, -0.5, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_ivec2_to_ivec4 + values + { + input bool in0 = [ true | true | true | true | false | false | false | false ]; + input float in1 = [ 2.0 | 0.0 | 3.5 | -8.25 | 36.8125 | -20.125 | 1.0 | -0.5 ]; + input ivec2 in2 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(1, 1) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(1, 2, 0, 0) | ivec4(1, 0, 0, 0) | ivec4(1, 3, -32, 64) | ivec4(1, -8, 1, 1) | ivec4(0, 36, 0, -2) | ivec4(0, -20, 0, -2) | ivec4(0, 1, 1, 1) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_ivec2_to_bvec4 + values + { + input bool in0 = [ true | true | true | true | false | false | false | false ]; + input float in1 = [ 2.0 | 0.0 | 3.5 | -8.25 | 36.8125 | -20.125 | 1.0 | -0.5 ]; + input ivec2 in2 = [ ivec2(0, 0) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) | ivec2(0, -2) | ivec2(0, -2) | ivec2(1, 1) | ivec2(0, 0) ]; + output bvec4 out0 = [ bvec4(true, true, false, false) | bvec4(true, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, true, false, true) | bvec4(false, true, false, true) | bvec4(false, true, true, true) | bvec4(false, true, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case float_float_float_to_vec3 + values + { + input float in0 = [ 3.5 | 2.0 | -20.125 | -8.25 | 36.8125 | 1.0 | 0.0 | -0.5 ]; + input float in1 = [ -0.5 | 1.0 | 2.0 | -20.125 | 0.0 | -8.25 | 36.8125 | 3.5 ]; + input float in2 = [ 0.0 | 1.0 | 3.5 | -8.25 | -0.5 | 36.8125 | -20.125 | 2.0 ]; + output vec3 out0 = [ vec3(3.5, -0.5, 0.0) | vec3(2.0, 1.0, 1.0) | vec3(-20.125, 2.0, 3.5) | vec3(-8.25, -20.125, -8.25) | vec3(36.8125, 0.0, -0.5) | vec3(1.0, -8.25, 36.8125) | vec3(0.0, 36.8125, -20.125) | vec3(-0.5, 3.5, 2.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case float_float_float_to_ivec3 + values + { + input float in0 = [ 3.5 | 2.0 | -20.125 | -8.25 | 36.8125 | 1.0 | 0.0 | -0.5 ]; + input float in1 = [ -0.5 | 1.0 | 2.0 | -20.125 | 0.0 | -8.25 | 36.8125 | 3.5 ]; + input float in2 = [ 0.0 | 1.0 | 3.5 | -8.25 | -0.5 | 36.8125 | -20.125 | 2.0 ]; + output ivec3 out0 = [ ivec3(3, 0, 0) | ivec3(2, 1, 1) | ivec3(-20, 2, 3) | ivec3(-8, -20, -8) | ivec3(36, 0, 0) | ivec3(1, -8, 36) | ivec3(0, 36, -20) | ivec3(0, 3, 2) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case float_float_float_to_bvec3 + values + { + input float in0 = [ 3.5 | 2.0 | -20.125 | -8.25 | 36.8125 | 1.0 | 0.0 | -0.5 ]; + input float in1 = [ -0.5 | 1.0 | 2.0 | -20.125 | 0.0 | -8.25 | 36.8125 | 3.5 ]; + input float in2 = [ 0.0 | 1.0 | 3.5 | -8.25 | -0.5 | 36.8125 | -20.125 | 2.0 ]; + output bvec3 out0 = [ bvec3(true, true, false) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case int_int_int_to_vec3 + values + { + input int in0 = [ 0 | 2 | 1 | 5 | 255 | 8 | -66 | 11 | -12 | -192 ]; + input int in1 = [ 2 | 8 | 11 | -12 | -192 | 1 | -66 | 5 | 255 | 0 ]; + input int in2 = [ -192 | -12 | -66 | 8 | 1 | 2 | 5 | 11 | 255 | 0 ]; + output vec3 out0 = [ vec3(0.0, 2.0, -192.0) | vec3(2.0, 8.0, -12.0) | vec3(1.0, 11.0, -66.0) | vec3(5.0, -12.0, 8.0) | vec3(255.0, -192.0, 1.0) | vec3(8.0, 1.0, 2.0) | vec3(-66.0, -66.0, 5.0) | vec3(11.0, 5.0, 11.0) | vec3(-12.0, 255.0, 255.0) | vec3(-192.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case int_int_int_to_ivec3 + values + { + input int in0 = [ 0 | 2 | 1 | 5 | 255 | 8 | -66 | 11 | -12 | -192 ]; + input int in1 = [ 2 | 8 | 11 | -12 | -192 | 1 | -66 | 5 | 255 | 0 ]; + input int in2 = [ -192 | -12 | -66 | 8 | 1 | 2 | 5 | 11 | 255 | 0 ]; + output ivec3 out0 = [ ivec3(0, 2, -192) | ivec3(2, 8, -12) | ivec3(1, 11, -66) | ivec3(5, -12, 8) | ivec3(255, -192, 1) | ivec3(8, 1, 2) | ivec3(-66, -66, 5) | ivec3(11, 5, 11) | ivec3(-12, 255, 255) | ivec3(-192, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case int_int_int_to_bvec3 + values + { + input int in0 = [ 0 | 2 | 1 | 5 | 255 | 8 | -66 | 11 | -12 | -192 ]; + input int in1 = [ 2 | 8 | 11 | -12 | -192 | 1 | -66 | 5 | 255 | 0 ]; + input int in2 = [ -192 | -12 | -66 | 8 | 1 | 2 | 5 | 11 | 255 | 0 ]; + output bvec3 out0 = [ bvec3(false, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_to_vec3 + values + { + input bool in0 = [ false | true ]; + input bool in1 = [ false | true ]; + input bool in2 = [ false | true ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_to_ivec3 + values + { + input bool in0 = [ false | true ]; + input bool in1 = [ false | true ]; + input bool in2 = [ false | true ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_bool_bool_to_bvec3 + values + { + input bool in0 = [ false | true ]; + input bool in1 = [ false | true ]; + input bool in2 = [ false | true ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_int_to_vec3 + values + { + input bool in0 = [ false | true | false | true | false | true | false | true | false | true ]; + input float in1 = [ 0.0 | 2.0 | 1.0 | -0.5 | -8.25 | 3.5 | -20.125 | 1.0 | 0.0 | 36.8125 ]; + input int in2 = [ -12 | -192 | 2 | 5 | -66 | 255 | 11 | 0 | 8 | 1 ]; + output vec3 out0 = [ vec3(0.0, 0.0, -12.0) | vec3(1.0, 2.0, -192.0) | vec3(0.0, 1.0, 2.0) | vec3(1.0, -0.5, 5.0) | vec3(0.0, -8.25, -66.0) | vec3(1.0, 3.5, 255.0) | vec3(0.0, -20.125, 11.0) | vec3(1.0, 1.0, 0.0) | vec3(0.0, 0.0, 8.0) | vec3(1.0, 36.8125, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_int_to_ivec3 + values + { + input bool in0 = [ false | true | false | true | false | true | false | true | false | true ]; + input float in1 = [ 0.0 | 2.0 | 1.0 | -0.5 | -8.25 | 3.5 | -20.125 | 1.0 | 0.0 | 36.8125 ]; + input int in2 = [ -12 | -192 | 2 | 5 | -66 | 255 | 11 | 0 | 8 | 1 ]; + output ivec3 out0 = [ ivec3(0, 0, -12) | ivec3(1, 2, -192) | ivec3(0, 1, 2) | ivec3(1, 0, 5) | ivec3(0, -8, -66) | ivec3(1, 3, 255) | ivec3(0, -20, 11) | ivec3(1, 1, 0) | ivec3(0, 0, 8) | ivec3(1, 36, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case bool_float_int_to_bvec3 + values + { + input bool in0 = [ false | true | false | true | false | true | false | true | false | true ]; + input float in1 = [ 0.0 | 2.0 | 1.0 | -0.5 | -8.25 | 3.5 | -20.125 | 1.0 | 0.0 | 36.8125 ]; + input int in2 = [ -12 | -192 | 2 | 5 | -66 | 255 | 11 | 0 | 8 | 1 ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, false) | bvec3(false, false, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1, in2); + ${OUTPUT} + } + "" + end + + case vec2_bool_to_vec3 + values + { + input vec2 in0 = [ vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) ]; + input bool in1 = [ false | true | false | true | true ]; + output vec3 out0 = [ vec3(-0.75, -0.0322580645161, 0.0) | vec3(1.0, 1.25, 1.0) | vec3(-0.5, -2.25, 0.0) | vec3(0.0, 0.5, 1.0) | vec3(-32.0, 64.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bool_to_ivec3 + values + { + input vec2 in0 = [ vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) ]; + input bool in1 = [ false | true | false | true | true ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, 0) | ivec3(0, 0, 1) | ivec3(-32, 64, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1); + ${OUTPUT} + } + "" + end + + case vec2_bool_to_bvec3 + values + { + input vec2 in0 = [ vec2(-0.75, -0.0322580645161) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(0.0, 0.5) | vec2(-32.0, 64.0) ]; + input bool in1 = [ false | true | false | true | true ]; + output bvec3 out0 = [ bvec3(true, true, false) | bvec3(true, true, true) | bvec3(true, true, false) | bvec3(false, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_float_to_vec3 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input float in1 = [ 2.0 | 36.8125 | 0.0 | -20.125 | 1.0 | -0.5 | -8.25 | 3.5 ]; + output vec3 out0 = [ vec3(1.0, 0.0, 2.0) | vec3(0.0, 0.0, 36.8125) | vec3(1.0, 0.0, 0.0) | vec3(0.0, 1.0, -20.125) | vec3(0.0, 0.0, 1.0) | vec3(0.0, 1.0, -0.5) | vec3(0.0, 0.0, -8.25) | vec3(1.0, 1.0, 3.5) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_float_to_ivec3 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input float in1 = [ 2.0 | 36.8125 | 0.0 | -20.125 | 1.0 | -0.5 | -8.25 | 3.5 ]; + output ivec3 out0 = [ ivec3(1, 0, 2) | ivec3(0, 0, 36) | ivec3(1, 0, 0) | ivec3(0, 1, -20) | ivec3(0, 0, 1) | ivec3(0, 1, 0) | ivec3(0, 0, -8) | ivec3(1, 1, 3) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_float_to_bvec3 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(true, false) | bvec2(false, true) | bvec2(false, false) | bvec2(false, true) | bvec2(false, false) | bvec2(true, true) ]; + input float in1 = [ 2.0 | 36.8125 | 0.0 | -20.125 | 1.0 | -0.5 | -8.25 | 3.5 ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, true) | bvec3(true, false, false) | bvec3(false, true, true) | bvec3(false, false, true) | bvec3(false, true, true) | bvec3(false, false, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_int_to_vec3 + values + { + input bvec2 in0 = [ bvec2(false, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(true, false) | bvec2(true, false) | bvec2(false, false) ]; + input int in1 = [ 0 | 255 | 1 | 2 | 8 | 11 | -192 | 5 | -12 | -66 ]; + output vec3 out0 = [ vec3(0.0, 1.0, 0.0) | vec3(0.0, 1.0, 255.0) | vec3(1.0, 1.0, 1.0) | vec3(0.0, 0.0, 2.0) | vec3(0.0, 0.0, 8.0) | vec3(0.0, 0.0, 11.0) | vec3(1.0, 1.0, -192.0) | vec3(1.0, 0.0, 5.0) | vec3(1.0, 0.0, -12.0) | vec3(0.0, 0.0, -66.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_int_to_ivec3 + values + { + input bvec2 in0 = [ bvec2(false, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(true, false) | bvec2(true, false) | bvec2(false, false) ]; + input int in1 = [ 0 | 255 | 1 | 2 | 8 | 11 | -192 | 5 | -12 | -66 ]; + output ivec3 out0 = [ ivec3(0, 1, 0) | ivec3(0, 1, 255) | ivec3(1, 1, 1) | ivec3(0, 0, 2) | ivec3(0, 0, 8) | ivec3(0, 0, 11) | ivec3(1, 1, -192) | ivec3(1, 0, 5) | ivec3(1, 0, -12) | ivec3(0, 0, -66) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bvec2_int_to_bvec3 + values + { + input bvec2 in0 = [ bvec2(false, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(true, false) | bvec2(true, false) | bvec2(false, false) ]; + input int in1 = [ 0 | 255 | 1 | 2 | 8 | 11 | -192 | 5 | -12 | -66 ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, true, true) | bvec3(true, true, true) | bvec3(false, false, true) | bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(true, false, true) | bvec3(true, false, true) | bvec3(false, false, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_ivec2_to_vec3 + values + { + input bool in0 = [ false | true | false | true | true ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 0.0, -2.0) | vec3(0.0, 0.0, 0.0) | vec3(1.0, -32.0, 64.0) | vec3(1.0, 1.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_ivec2_to_ivec3 + values + { + input bool in0 = [ false | true | false | true | true ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 0, -2) | ivec3(0, 0, 0) | ivec3(1, -32, 64) | ivec3(1, 1, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_ivec2_to_bvec3 + values + { + input bool in0 = [ false | true | false | true | true ]; + input ivec2 in1 = [ ivec2(0, 0) | ivec2(0, -2) | ivec2(0, 0) | ivec2(-32, 64) | ivec2(1, 1) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, false, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0, in1); + ${OUTPUT} + } + "" + end + + case float_float_to_vec2 + values + { + input float in0 = [ 2.0 | 3.5 | -8.25 | -0.5 | 0.0 | -20.125 | 36.8125 | 1.0 ]; + input float in1 = [ 3.5 | -20.125 | -0.5 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 ]; + output vec2 out0 = [ vec2(2.0, 3.5) | vec2(3.5, -20.125) | vec2(-8.25, -0.5) | vec2(-0.5, 2.0) | vec2(0.0, 1.0) | vec2(-20.125, 0.0) | vec2(36.8125, 36.8125) | vec2(1.0, -8.25) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_float_to_ivec2 + values + { + input float in0 = [ 2.0 | 3.5 | -8.25 | -0.5 | 0.0 | -20.125 | 36.8125 | 1.0 ]; + input float in1 = [ 3.5 | -20.125 | -0.5 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 ]; + output ivec2 out0 = [ ivec2(2, 3) | ivec2(3, -20) | ivec2(-8, 0) | ivec2(0, 2) | ivec2(0, 1) | ivec2(-20, 0) | ivec2(36, 36) | ivec2(1, -8) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_float_to_bvec2 + values + { + input float in0 = [ 2.0 | 3.5 | -8.25 | -0.5 | 0.0 | -20.125 | 36.8125 | 1.0 ]; + input float in1 = [ 3.5 | -20.125 | -0.5 | 2.0 | 1.0 | 0.0 | 36.8125 | -8.25 ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(false, true) | bvec2(true, false) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_int_to_vec2 + values + { + input int in0 = [ 8 | 255 | -192 | 2 | 0 | 1 | -12 | 11 | -66 | 5 ]; + input int in1 = [ -66 | 2 | 255 | 8 | -12 | 5 | -192 | 0 | 1 | 11 ]; + output vec2 out0 = [ vec2(8.0, -66.0) | vec2(255.0, 2.0) | vec2(-192.0, 255.0) | vec2(2.0, 8.0) | vec2(0.0, -12.0) | vec2(1.0, 5.0) | vec2(-12.0, -192.0) | vec2(11.0, 0.0) | vec2(-66.0, 1.0) | vec2(5.0, 11.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_int_to_ivec2 + values + { + input int in0 = [ 8 | 255 | -192 | 2 | 0 | 1 | -12 | 11 | -66 | 5 ]; + input int in1 = [ -66 | 2 | 255 | 8 | -12 | 5 | -192 | 0 | 1 | 11 ]; + output ivec2 out0 = [ ivec2(8, -66) | ivec2(255, 2) | ivec2(-192, 255) | ivec2(2, 8) | ivec2(0, -12) | ivec2(1, 5) | ivec2(-12, -192) | ivec2(11, 0) | ivec2(-66, 1) | ivec2(5, 11) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_int_to_bvec2 + values + { + input int in0 = [ 8 | 255 | -192 | 2 | 0 | 1 | -12 | 11 | -66 | 5 ]; + input int in1 = [ -66 | 2 | 255 | 8 | -12 | 5 | -192 | 0 | 1 | 11 ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, false) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_bool_to_vec2 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ true | false ]; + output vec2 out0 = [ vec2(1.0, 1.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_bool_to_ivec2 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ true | false ]; + output ivec2 out0 = [ ivec2(1, 1) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case bool_bool_to_bvec2 + values + { + input bool in0 = [ true | false ]; + input bool in1 = [ true | false ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_int_to_vec2 + values + { + input float in0 = [ 1.0 | -0.5 | -20.125 | 0.0 | 3.5 | -8.25 | 36.8125 | 2.0 | 1.0 | 0.0 ]; + input int in1 = [ -192 | -66 | 255 | 1 | 2 | 0 | -12 | 5 | 11 | 8 ]; + output vec2 out0 = [ vec2(1.0, -192.0) | vec2(-0.5, -66.0) | vec2(-20.125, 255.0) | vec2(0.0, 1.0) | vec2(3.5, 2.0) | vec2(-8.25, 0.0) | vec2(36.8125, -12.0) | vec2(2.0, 5.0) | vec2(1.0, 11.0) | vec2(0.0, 8.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_int_to_ivec2 + values + { + input float in0 = [ 1.0 | -0.5 | -20.125 | 0.0 | 3.5 | -8.25 | 36.8125 | 2.0 | 1.0 | 0.0 ]; + input int in1 = [ -192 | -66 | 255 | 1 | 2 | 0 | -12 | 5 | 11 | 8 ]; + output ivec2 out0 = [ ivec2(1, -192) | ivec2(0, -66) | ivec2(-20, 255) | ivec2(0, 1) | ivec2(3, 2) | ivec2(-8, 0) | ivec2(36, -12) | ivec2(2, 5) | ivec2(1, 11) | ivec2(0, 8) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_int_to_bvec2 + values + { + input float in0 = [ 1.0 | -0.5 | -20.125 | 0.0 | 3.5 | -8.25 | 36.8125 | 2.0 | 1.0 | 0.0 ]; + input int in1 = [ -192 | -66 | 255 | 1 | 2 | 0 | -12 | 5 | 11 | 8 ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(true, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(false, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_bool_to_vec2 + values + { + input float in0 = [ 2.0 | -20.125 | 0.0 | 1.0 | -8.25 | -0.5 | 36.8125 | 3.5 ]; + input bool in1 = [ true | false | false | false | true | true | false | true ]; + output vec2 out0 = [ vec2(2.0, 1.0) | vec2(-20.125, 0.0) | vec2(0.0, 0.0) | vec2(1.0, 0.0) | vec2(-8.25, 1.0) | vec2(-0.5, 1.0) | vec2(36.8125, 0.0) | vec2(3.5, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_bool_to_ivec2 + values + { + input float in0 = [ 2.0 | -20.125 | 0.0 | 1.0 | -8.25 | -0.5 | 36.8125 | 3.5 ]; + input bool in1 = [ true | false | false | false | true | true | false | true ]; + output ivec2 out0 = [ ivec2(2, 1) | ivec2(-20, 0) | ivec2(0, 0) | ivec2(1, 0) | ivec2(-8, 1) | ivec2(0, 1) | ivec2(36, 0) | ivec2(3, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case float_bool_to_bvec2 + values + { + input float in0 = [ 2.0 | -20.125 | 0.0 | 1.0 | -8.25 | -0.5 | 36.8125 | 3.5 ]; + input bool in1 = [ true | false | false | false | true | true | false | true ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(true, true) | bvec2(true, false) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_bool_to_vec2 + values + { + input int in0 = [ 8 | 255 | 11 | -66 | 0 | -192 | -12 | 1 | 5 | 2 ]; + input bool in1 = [ true | false | true | false | true | false | false | true | false | true ]; + output vec2 out0 = [ vec2(8.0, 1.0) | vec2(255.0, 0.0) | vec2(11.0, 1.0) | vec2(-66.0, 0.0) | vec2(0.0, 1.0) | vec2(-192.0, 0.0) | vec2(-12.0, 0.0) | vec2(1.0, 1.0) | vec2(5.0, 0.0) | vec2(2.0, 1.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_bool_to_ivec2 + values + { + input int in0 = [ 8 | 255 | 11 | -66 | 0 | -192 | -12 | 1 | 5 | 2 ]; + input bool in1 = [ true | false | true | false | true | false | false | true | false | true ]; + output ivec2 out0 = [ ivec2(8, 1) | ivec2(255, 0) | ivec2(11, 1) | ivec2(-66, 0) | ivec2(0, 1) | ivec2(-192, 0) | ivec2(-12, 0) | ivec2(1, 1) | ivec2(5, 0) | ivec2(2, 1) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0, in1); + ${OUTPUT} + } + "" + end + + case int_bool_to_bvec2 + values + { + input int in0 = [ 8 | 255 | 11 | -66 | 0 | -192 | -12 | 1 | 5 | 2 ]; + input bool in1 = [ true | false | true | false | true | false | false | true | false | true ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(true, true) | bvec2(true, false) | bvec2(false, true) | bvec2(true, false) | bvec2(true, false) | bvec2(true, true) | bvec2(true, false) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0, in1); + ${OUTPUT} + } + "" + end + + +end # vector_combine diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.html new file mode 100644 index 000000000000..95b31cf26b43 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.test new file mode 100644 index 000000000000..3728ea70238b --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_illegal.test @@ -0,0 +1,548 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group vector_illegal "Illegal Vector Conversions" + + case vec2_to_vec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + vec3 out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_ivec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + ivec3 out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_bvec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + bvec3 out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec2 in0 = vec2(0.0, 0.5); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_vec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + vec3 out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_ivec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + ivec3 out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_bvec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + bvec3 out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec2 in0 = ivec2(0, 0); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_vec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + vec3 out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_ivec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + ivec3 out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_bvec3 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + bvec3 out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec2 in0 = bvec2(true, false); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec3 in0 = vec3(0.0, 0.5, 0.75); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec3 in0 = vec3(0.0, 0.5, 0.75); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + vec3 in0 = vec3(0.0, 0.5, 0.75); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec3 in0 = ivec3(0, 0, 0); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec3 in0 = ivec3(0, 0, 0); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + ivec3 in0 = ivec3(0, 0, 0); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_vec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec3 in0 = bvec3(true, false, false); + vec4 out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_ivec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec3 in0 = bvec3(true, false, false); + ivec4 out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_bvec4 + expect compile_fail + values {} + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + bvec3 in0 = bvec3(true, false, false); + bvec4 out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + +end # vector_illegal diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.html new file mode 100644 index 000000000000..0ce230eb2022 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.test new file mode 100644 index 000000000000..8d9bb65c53d5 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_scalar.test @@ -0,0 +1,602 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group vector_to_scalar "Vector to Scalar Conversions" + + case vec2_to_float + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_int + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_bool + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output bool out0 = [ false | true | true | true | true ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_float + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_int + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_bool + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output bool out0 = [ false | true | true | true | true ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_float + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_int + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_bool + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output bool out0 = [ false | true | true | true | true ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_float + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_int + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_bool + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output bool out0 = [ false | true | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_float + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_int + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_bool + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output bool out0 = [ false | true | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_float + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output float out0 = [ 0.0 | 1.0 | 0.0 | -32.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_int + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_bool + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output bool out0 = [ false | true | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_float + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_int + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output int out0 = [ 1 | 0 | 0 | 1 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_bool + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_float + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_int + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output int out0 = [ 1 | 0 | 0 | 1 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_bool + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_float + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output float out0 = [ 1.0 | 0.0 | 0.0 | 1.0 | 0.0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = float(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_int + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output int out0 = [ 1 | 0 | 0 | 1 | 0 ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = int(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_bool + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bool(in0); + ${OUTPUT} + } + "" + end + + +end # vector_to_scalar diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.html new file mode 100644 index 000000000000..d2d1ce47e59c --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.test new file mode 100644 index 000000000000..3ff9db6f8da4 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/conversions_vector_to_vector.test @@ -0,0 +1,1196 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +group vector_to_vector "Vector to Vector Conversions" + + case vec4_to_vec4 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_vec3 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_vec2 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_ivec4 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_ivec3 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_ivec2 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_bvec4 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output bvec4 out0 = [ bvec4(false, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(true, true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_bvec3 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output bvec3 out0 = [ bvec3(false, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case vec4_to_bvec2 + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_vec4 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(0.0, -2.0, -4.0, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(0.0, 0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_vec3 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(0.0, -2.0, -4.0) | vec3(-32.0, 64.0, -51.0) | vec3(0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_vec2 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(0.0, -2.0) | vec2(-32.0, 64.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_ivec4 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_ivec3 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_ivec2 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_bvec4 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_bvec3 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case ivec4_to_bvec2 + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_vec4 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output vec4 out0 = [ vec4(1.0, 0.0, 0.0, 1.0) | vec4(0.0, 0.0, 0.0, 1.0) | vec4(0.0, 1.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(0.0, 0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec4(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_vec3 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output vec3 out0 = [ vec3(1.0, 0.0, 0.0) | vec3(0.0, 0.0, 0.0) | vec3(0.0, 1.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_vec2 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output vec2 out0 = [ vec2(1.0, 0.0) | vec2(0.0, 0.0) | vec2(0.0, 1.0) | vec2(1.0, 1.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_ivec4 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output ivec4 out0 = [ ivec4(1, 0, 0, 1) | ivec4(0, 0, 0, 1) | ivec4(0, 1, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec4(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_ivec3 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output ivec3 out0 = [ ivec3(1, 0, 0) | ivec3(0, 0, 0) | ivec3(0, 1, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_ivec2 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output ivec2 out0 = [ ivec2(1, 0) | ivec2(0, 0) | ivec2(0, 1) | ivec2(1, 1) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_bvec4 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec4(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_bvec3 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case bvec4_to_bvec2 + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_vec3 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_vec2 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_ivec3 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_ivec2 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_bvec3 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output bvec3 out0 = [ bvec3(false, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) | bvec3(true, true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case vec3_to_bvec2 + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_vec3 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(0.0, -2.0, -4.0) | vec3(-32.0, 64.0, -51.0) | vec3(0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_vec2 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(0.0, -2.0) | vec2(-32.0, 64.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_ivec3 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_ivec2 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_bvec3 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, true, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case ivec3_to_bvec2 + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_vec3 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output vec3 out0 = [ vec3(1.0, 0.0, 0.0) | vec3(0.0, 0.0, 0.0) | vec3(0.0, 1.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(0.0, 0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec3(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_vec2 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output vec2 out0 = [ vec2(1.0, 0.0) | vec2(0.0, 0.0) | vec2(0.0, 1.0) | vec2(1.0, 1.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_ivec3 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output ivec3 out0 = [ ivec3(1, 0, 0) | ivec3(0, 0, 0) | ivec3(0, 1, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec3(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_ivec2 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output ivec2 out0 = [ ivec2(1, 0) | ivec2(0, 0) | ivec2(0, 1) | ivec2(1, 1) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_bvec3 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec3(in0); + ${OUTPUT} + } + "" + end + + case bvec3_to_bvec2 + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_vec2 + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_ivec2 + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case vec2_to_bvec2 + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) | bvec2(true, true) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_vec2 + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(0.0, -2.0) | vec2(-32.0, 64.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_ivec2 + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case ivec2_to_bvec2 + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(true, true) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_vec2 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output vec2 out0 = [ vec2(1.0, 0.0) | vec2(0.0, 0.0) | vec2(0.0, 1.0) | vec2(1.0, 1.0) | vec2(0.0, 0.0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = vec2(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_ivec2 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output ivec2 out0 = [ ivec2(1, 0) | ivec2(0, 0) | ivec2(0, 1) | ivec2(1, 1) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = ivec2(in0); + ${OUTPUT} + } + "" + end + + case bvec2_to_bvec2 + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + precision mediump int; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = bvec2(in0); + ${OUTPUT} + } + "" + end + + +end # vector_to_vector diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-conversions.js b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-conversions.js new file mode 100644 index 000000000000..2322f0bf2356 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-conversions.js @@ -0,0 +1,33 @@ +/* + +run with + node split-conversions.js + +notes: + +conversions.test is generated from the C++ based dEQP tests +https://github.com/KhronosGroup/VK-GL-CTS/blob/main/modules/gles2/scripts/gen-conversions.py + +You need to manually add these tests to the 00_test_list.txt + +*/ + +const fs = require('fs'); + +process.chdir(__dirname); + +const testWarning = `\ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-conversions.js + +`; + +const conversionsHTML = fs.readFileSync('conversions.template', {encoding: 'utf8'}); +const conversions = fs.readFileSync('conversions.test', {encoding: 'utf8'}); +const groupMatches = conversions.matchAll(/group ([a-zA-Z0-9_]+) [\s\S]+?end #.*?\n/g); +for (const [str, groupName] of groupMatches) { + const baseName = `conversions_${groupName}`; + fs.writeFileSync(`${baseName}.test`, `${testWarning}${str}`); + fs.writeFileSync(`${baseName}.html`, `\n${conversionsHTML.replace("'conversions'", `'${baseName}'`)}`); +} diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-swizzles.js b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-swizzles.js new file mode 100644 index 000000000000..4a67bfc7a428 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/split-swizzles.js @@ -0,0 +1,47 @@ +/* + +run with + node split-swizzles.js + +notes: + +swizzles.test is generated from the C++ based dEQP tests +https://github.com/KhronosGroup/VK-GL-CTS/blob/main/modules/gles2/scripts/gen-swizzles.py + +You need to manually add these tests to the 00_test_list.txt + +*/ + +const fs = require('fs'); + +process.chdir(__dirname); + +const testWarning = `\ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +`; + +const swizzlesHTML = fs.readFileSync('swizzles.template', {encoding: 'utf8'}); +const swizzles = fs.readFileSync('swizzles.test', {encoding: 'utf8'}); +const caseMatches = swizzles.matchAll(/\scase (\w+)_(\w+)_(\w+)\n[\s\S]+?end\n/g); + +// quick sanity check +const numCases = swizzles.matchAll('\bcase\b').length; +if (caseMatches.length !== numCases) { + throw Error(`numCases(${numCases}) does not match caseMatches.length(${caseMatches.length})`); +} + +const byType = {} +for (const [str, precision, type, swizzle] of caseMatches) { + byType[type] = byType[type] || []; + byType[type].push(str); +} + +for (const [type, cases] of Object.entries(byType)) { + const baseName = `swizzles_${type}`; + const str = `group ${type}_swizzles "${type} swizzles"\n\n${cases.join('\n\n')}\n\nend # ${type}_swizzles`; + fs.writeFileSync(`${baseName}.test`, `${testWarning}${str}`); + fs.writeFileSync(`${baseName}.html`, `\n${swizzlesHTML.replace("'swizzles'", `'${baseName}'`)}`); +} diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.template similarity index 100% rename from LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.html rename to LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles.template diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.html new file mode 100644 index 000000000000..7a98a4562ca3 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.test new file mode 100644 index 000000000000..1f74f6228a1a --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec2.test @@ -0,0 +1,469 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec2_swizzles "bvec2 swizzles" + + case mediump_bvec2_x + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xx + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xy + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yx + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yxy + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xyxx + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yyyy + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_s + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_ss + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_st + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_ts + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_tst + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_stss + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_tttt + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_r + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rr + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rg + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_gr + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_grg + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rgrr + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_gggg + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # bvec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.html new file mode 100644 index 000000000000..ae73ac5f54dc --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.test new file mode 100644 index 000000000000..7e14baabee72 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec3.test @@ -0,0 +1,865 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec3_swizzles "bvec3 swizzles" + + case mediump_bvec3_x + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_z + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xz + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zz + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xyz + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zyx + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xxx + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzz + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzy + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_yxy + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xzx + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xyyx + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzzz + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_s + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_p + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sp + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pp + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_stp + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pts + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sss + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_ppp + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_ppt + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_tst + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sps + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_stts + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pppp + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_r + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_b + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rb + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bb + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rgb + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bgr + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rrr + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbb + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbg + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_grg + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rbr + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rggr + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbbb + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # bvec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.html new file mode 100644 index 000000000000..9a9c6e655216 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.test new file mode 100644 index 000000000000..b5cfcabb0db1 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_bvec4.test @@ -0,0 +1,1063 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec4_swizzles "bvec4 swizzles" + + case mediump_bvec4_x + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_w + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wx + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wz + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_www + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_yyw + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzy + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xyzw + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzyx + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xxxx + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_yyyy + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wwww + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzzw + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wwwy + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xyxx + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_zzwz + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_s + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_q + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qs + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qp + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqq + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ttq + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qpt + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_stpq + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qpts + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ssss + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_tttt + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqqq + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qppq + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqqt + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_stss + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ppqp + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_r + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_a + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ar + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ab + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaa + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_gga + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abg + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rgba + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abgr + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rrrr + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_gggg + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaaa + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abba + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaag + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rgrr + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_bbab + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # bvec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.html new file mode 100644 index 000000000000..f48565709fd3 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.test new file mode 100644 index 000000000000..6b4ca23c4ba3 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec2.test @@ -0,0 +1,469 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec2_swizzles "ivec2 swizzles" + + case mediump_ivec2_x + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xx + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xy + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yx + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yxy + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xyxx + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yyyy + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_s + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_ss + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_st + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_ts + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_tst + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_stss + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_tttt + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_r + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rr + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rg + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_gr + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_grg + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rgrr + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_gggg + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # ivec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.html new file mode 100644 index 000000000000..a23797c0a2e2 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.test new file mode 100644 index 000000000000..11a06227fb78 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec3.test @@ -0,0 +1,865 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec3_swizzles "ivec3 swizzles" + + case mediump_ivec3_x + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_z + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xz + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zz + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xyz + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zyx + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xxx + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzz + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzy + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_yxy + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xzx + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xyyx + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzzz + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_s + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_p + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sp + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pp + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_stp + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pts + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sss + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_ppp + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_ppt + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_tst + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sps + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_stts + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pppp + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_r + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_b + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rb + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bb + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rgb + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bgr + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rrr + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbb + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbg + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_grg + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rbr + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rggr + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbbb + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # ivec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.html new file mode 100644 index 000000000000..2b155d1f7ab9 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.test new file mode 100644 index 000000000000..f9fe12244972 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_ivec4.test @@ -0,0 +1,1063 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec4_swizzles "ivec4 swizzles" + + case mediump_ivec4_x + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_w + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wx + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wz + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_www + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_yyw + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzy + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xyzw + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzyx + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xxxx + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_yyyy + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wwww + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzzw + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wwwy + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xyxx + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_zzwz + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_s + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_q + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qs + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qp + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqq + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ttq + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qpt + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_stpq + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qpts + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ssss + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_tttt + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqqq + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qppq + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqqt + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_stss + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ppqp + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_r + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_a + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ar + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ab + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaa + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_gga + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abg + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rgba + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abgr + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rrrr + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_gggg + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaaa + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abba + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaag + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rgrr + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_bbab + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # ivec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.html new file mode 100644 index 000000000000..bd16703c523f --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.test new file mode 100644 index 000000000000..6a0eb1ddb787 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec2.test @@ -0,0 +1,469 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec2_swizzles "vec2 swizzles" + + case mediump_vec2_x + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xx + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xy + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yx + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yxy + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xyxx + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yyyy + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_s + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_ss + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_st + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_ts + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_tst + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_stss + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_tttt + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_r + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rr + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rg + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_gr + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_grg + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rgrr + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_gggg + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # vec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.html new file mode 100644 index 000000000000..4caa0fc2a0a7 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.test new file mode 100644 index 000000000000..f099dcfd2d99 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec3.test @@ -0,0 +1,865 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec3_swizzles "vec3 swizzles" + + case mediump_vec3_x + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_z + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xz + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zz + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xyz + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zyx + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xxx + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzz + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzy + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_yxy + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xzx + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xyyx + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzzz + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_s + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_p + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sp + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pp + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_stp + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pts + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sss + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_ppp + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_ppt + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_tst + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sps + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_stts + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pppp + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_r + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_b + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rb + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bb + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rgb + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bgr + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rrr + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbb + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbg + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_grg + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rbr + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rggr + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbbb + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # vec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.html new file mode 100644 index 000000000000..be64d18af132 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.test new file mode 100644 index 000000000000..3fba360a42e7 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles2/shaders/swizzles_vec4.test @@ -0,0 +1,1063 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec4_swizzles "vec4 swizzles" + + case mediump_vec4_x + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_w + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wx + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wz + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_www + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_yyw + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzy + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xyzw + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzyx + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xxxx + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_yyyy + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wwww + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzzw + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wwwy + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xyxx + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_zzwz + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_s + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_q + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qs + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qp + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqq + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ttq + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qpt + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_stpq + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qpts + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ssss + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_tttt + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqqq + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qppq + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqqt + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_stss + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ppqp + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_r + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_a + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ar + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ab + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaa + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_gga + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abg + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rgba + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abgr + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rrrr + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_gggg + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaaa + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abba + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaag + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rgrr + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_bbab + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # vec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/split-swizzles.js b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/split-swizzles.js new file mode 100644 index 000000000000..7205d82afd58 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/split-swizzles.js @@ -0,0 +1,47 @@ +/* + +run with + node split-swizzles.js + +notes: + +swizzles.test is generated from the C++ based dEQP tests +https://github.com/KhronosGroup/VK-GL-CTS/blob/main/modules/gles3/scripts/gen-swizzles.py + +You need to manually add these tests to the 00_test_list.txt + +*/ + +const fs = require('fs'); + +process.chdir(__dirname); + +const testWarning = `\ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +`; + +const swizzlesHTML = fs.readFileSync('swizzles.template', {encoding: 'utf8'}); +const swizzles = fs.readFileSync('swizzles.test', {encoding: 'utf8'}); +const caseMatches = swizzles.matchAll(/\scase (\w+)_(\w+)_(\w+)\n[\s\S]+?end\n/g); + +// quick sanity check +const numCases = swizzles.matchAll('\bcase\b').length; +if (caseMatches.length !== numCases) { + throw Error(`numCases(${numCases}) does not match caseMatches.length(${caseMatches.length})`); +} + +const byType = {} +for (const [str, precision, type, swizzle] of caseMatches) { + byType[type] = byType[type] || []; + byType[type].push(str); +} + +for (const [type, cases] of Object.entries(byType)) { + const baseName = `swizzles_${type}`; + const str = `group ${type}_swizzles "${type} swizzles"\n\n${cases.join('\n\n')}\n\nend # ${type}_swizzles`; + fs.writeFileSync(`${baseName}.test`, `${testWarning}${str}`); + fs.writeFileSync(`${baseName}.html`, `\n${swizzlesHTML.replace("'swizzles'", `'${baseName}'`)}`); +} diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.template similarity index 100% rename from LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.html rename to LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles.template diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.html new file mode 100644 index 000000000000..b83b4d4644b1 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.test new file mode 100644 index 000000000000..f1d20ef1aed4 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec2.test @@ -0,0 +1,511 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec2_swizzles "bvec2 swizzles" + + case mediump_bvec2_x + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xx + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xy + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yx + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yxy + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_xyxx + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_yyyy + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_s + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_ss + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_st + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_ts + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_tst + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_stss + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_tttt + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_r + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rr + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rg + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_gr + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec2 out0 = [ bvec2(false, true) | bvec2(false, false) | bvec2(true, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_grg + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_rgrr + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec2_gggg + version 300 es + values + { + input bvec2 in0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, true) | bvec2(true, true) | bvec2(false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # bvec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.html new file mode 100644 index 000000000000..20ab741356a5 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.test new file mode 100644 index 000000000000..31a2ab07f4bc --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec3.test @@ -0,0 +1,943 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec3_swizzles "bvec3 swizzles" + + case mediump_bvec3_x + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_z + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xz + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zz + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xyz + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zyx + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xxx + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzz + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzy + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_yxy + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xzx + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_xyyx + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_zzzz + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_s + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_p + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sp + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pp + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_stp + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pts + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sss + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_ppp + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_ppt + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_tst + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_sps + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_stts + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_pppp + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_r + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_b + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bool out0 = [ false | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rb + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bb + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec2 out0 = [ bvec2(false, false) | bvec2(false, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rgb + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bgr + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rrr + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbb + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbg + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, false) | bvec3(false, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_grg + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(false, true, false) | bvec3(false, false, false) | bvec3(true, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rbr + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, true) | bvec3(false, false, false) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_rggr + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(false, true, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec3_bbbb + version 300 es + values + { + input bvec3 in0 = [ bvec3(true, false, false) | bvec3(false, false, false) | bvec3(false, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # bvec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.html new file mode 100644 index 000000000000..39a59c341702 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.test new file mode 100644 index 000000000000..55b85c8b0565 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_bvec4.test @@ -0,0 +1,1159 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group bvec4_swizzles "bvec4 swizzles" + + case mediump_bvec4_x + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_w + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wx + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wz + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_www + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_yyw + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzy + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xyzw + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzyx + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xxxx + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_yyyy + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wwww + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wzzw + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_wwwy + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_xyxx + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_zzwz + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_s + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_q + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qs + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qp + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqq + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ttq + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qpt + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_stpq + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qpts + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ssss + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_tttt + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqqq + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qppq + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_qqqt + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_stss + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ppqp + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_r + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | false | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_a + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bool out0 = [ true | true | false | true | false ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ar + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, true) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_ab + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec2 out0 = [ bvec2(true, false) | bvec2(true, false) | bvec2(false, false) | bvec2(true, true) | bvec2(false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaa + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, true, true) | bvec3(true, true, true) | bvec3(false, false, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_gga + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(false, false, true) | bvec3(false, false, true) | bvec3(true, true, false) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abg + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec3 out0 = [ bvec3(true, false, false) | bvec3(true, false, false) | bvec3(false, false, true) | bvec3(true, true, true) | bvec3(false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rgba + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abgr + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, false) | bvec4(false, false, true, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rrrr + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_gggg + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, false, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaaa + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_abba + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, false, true) | bvec4(true, false, false, true) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_aaag + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, true, true, false) | bvec4(true, true, true, false) | bvec4(false, false, false, true) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_rgrr + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(true, false, true, true) | bvec4(false, false, false, false) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_bvec4_bbab + version 300 es + values + { + input bvec4 in0 = [ bvec4(true, false, false, true) | bvec4(false, false, false, true) | bvec4(false, true, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + output bvec4 out0 = [ bvec4(false, false, true, false) | bvec4(false, false, true, false) | bvec4(false, false, false, false) | bvec4(true, true, true, true) | bvec4(false, false, false, false) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # bvec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.html new file mode 100644 index 000000000000..76f159b00891 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.test new file mode 100644 index 000000000000..b26d29b41b43 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec2.test @@ -0,0 +1,511 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec2_swizzles "ivec2 swizzles" + + case mediump_ivec2_x + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xx + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xy + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yx + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yxy + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_xyxx + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_yyyy + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_s + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_ss + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_st + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_ts + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_tst + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_stss + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_tttt + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_r + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rr + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, 0) | ivec2(-32, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rg + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_gr + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-2, 0) | ivec2(64, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_grg + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_rgrr + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec2_gggg + version 300 es + values + { + input ivec2 in0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -2) | ivec2(-32, 64) | ivec2(0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # ivec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.html new file mode 100644 index 000000000000..ce29c8b8a32c --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.test new file mode 100644 index 000000000000..277cbff7f539 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec3.test @@ -0,0 +1,943 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec3_swizzles "ivec3 swizzles" + + case mediump_ivec3_x + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_z + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xz + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zz + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xyz + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zyx + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xxx + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzz + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzy + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_yxy + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xzx + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_xyyx + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_zzzz + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_s + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_p + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sp + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pp + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_stp + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pts + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sss + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_ppp + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_ppt + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_tst + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_sps + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_stts + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_pppp + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_r + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_b + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output int out0 = [ 0 | 1 | -4 | -51 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rb + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(0, -4) | ivec2(-32, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bb + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(-4, -4) | ivec2(-51, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rgb + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bgr + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -2, 0) | ivec3(-51, 64, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rrr + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, 0, 0) | ivec3(-32, -32, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbb + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -4) | ivec3(-51, -51, -51) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbg + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-4, -4, -2) | ivec3(-51, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_grg + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, 0, -2) | ivec3(64, -32, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rbr + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -4, 0) | ivec3(-32, -51, -32) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_rggr + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -2, 0) | ivec4(-32, 64, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec3_bbbb + version 300 es + values + { + input ivec3 in0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(0, -2, -4) | ivec3(-32, 64, -51) | ivec3(0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, -4, -4) | ivec4(-51, -51, -51, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # ivec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.html new file mode 100644 index 000000000000..3323b9fbb31c --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.test new file mode 100644 index 000000000000..22d17df0ae64 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_ivec4.test @@ -0,0 +1,1159 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group ivec4_swizzles "ivec4 swizzles" + + case mediump_ivec4_x + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_w + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wx + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wz + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_www + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_yyw + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzy + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xyzw + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzyx + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xxxx + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_yyyy + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wwww + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wzzw + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_wwwy + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_xyxx + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_zzwz + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_s + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_q + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qs + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qp + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqq + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ttq + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qpt + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_stpq + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qpts + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ssss + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_tttt + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqqq + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qppq + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_qqqt + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_stss + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ppqp + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_r + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 0 | -32 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_a + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output int out0 = [ 0 | 1 | 9 | 24 | 0 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ar + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, 0) | ivec2(24, -32) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_ab + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec2 out0 = [ ivec2(0, 0) | ivec2(1, 1) | ivec2(9, -4) | ivec2(24, -51) | ivec2(0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaa + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, 9, 9) | ivec3(24, 24, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_gga + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(-2, -2, 9) | ivec3(64, 64, 24) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abg + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec3 out0 = [ ivec3(0, 0, 0) | ivec3(1, 1, 1) | ivec3(9, -4, -2) | ivec3(24, -51, 64) | ivec3(0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rgba + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abgr + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -2, 0) | ivec4(24, -51, 64, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rrrr + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, 0, 0, 0) | ivec4(-32, -32, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_gggg + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-2, -2, -2, -2) | ivec4(64, 64, 64, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaaa + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, 9) | ivec4(24, 24, 24, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_abba + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, -4, -4, 9) | ivec4(24, -51, -51, 24) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_aaag + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(9, 9, 9, -2) | ivec4(24, 24, 24, 64) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_rgrr + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, 0, 0) | ivec4(-32, 64, -32, -32) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_ivec4_bbab + version 300 es + values + { + input ivec4 in0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(0, -2, -4, 9) | ivec4(-32, 64, -51, 24) | ivec4(0, 0, 0, 0) ]; + output ivec4 out0 = [ ivec4(0, 0, 0, 0) | ivec4(1, 1, 1, 1) | ivec4(-4, -4, 9, -4) | ivec4(-51, -51, 24, -51) | ivec4(0, 0, 0, 0) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # ivec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.html new file mode 100644 index 000000000000..c70c9e24d1bb --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.test new file mode 100644 index 000000000000..dba3acaf6bba --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec2.test @@ -0,0 +1,511 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec2_swizzles "vec2 swizzles" + + case mediump_vec2_x + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xx + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xy + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yx + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yxy + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_xyxx + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_yyyy + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_s + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_ss + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ss; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_st + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.st; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_ts + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ts; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_tst + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_stss + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_tttt + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_r + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rr + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.0) | vec2(1.0, 1.0) | vec2(-0.5, -0.5) | vec2(-32.0, -32.0) | vec2(-0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rg + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rg; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_gr + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec2 out0 = [ vec2(0.5, 0.0) | vec2(1.25, 1.0) | vec2(-2.25, -0.5) | vec2(64.0, -32.0) | vec2(-0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_grg + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_rgrr + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec2_gggg + version 300 es + values + { + input vec2 in0 = [ vec2(0.0, 0.5) | vec2(1.0, 1.25) | vec2(-0.5, -2.25) | vec2(-32.0, 64.0) | vec2(-0.75, -0.0322580645161) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + +end # vec2_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.html new file mode 100644 index 000000000000..475d91f002f2 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.test new file mode 100644 index 000000000000..d7333472151b --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec3.test @@ -0,0 +1,943 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec3_swizzles "vec3 swizzles" + + case mediump_vec3_x + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_z + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.z; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xz + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zz + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xyz + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zyx + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xxx + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzz + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzy + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzy; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_yxy + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yxy; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xzx + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xzx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_xyyx + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_zzzz + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzzz; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_s + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_p + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.p; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sp + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pp + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_stp + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pts + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pts; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sss + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sss; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_ppp + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_ppt + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppt; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_tst + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tst; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_sps + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.sps; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_stts + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stts; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_pppp + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.pppp; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_r + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_b + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output float out0 = [ 0.75 | 1.125 | -4.875 | -51.0 | 0.0526315789474 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.b; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rb + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.0, 0.75) | vec2(1.0, 1.125) | vec2(-0.5, -4.875) | vec2(-32.0, -51.0) | vec2(-0.75, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bb + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec2 out0 = [ vec2(0.75, 0.75) | vec2(1.125, 1.125) | vec2(-4.875, -4.875) | vec2(-51.0, -51.0) | vec2(0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rgb + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bgr + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.5, 0.0) | vec3(1.125, 1.25, 1.0) | vec3(-4.875, -2.25, -0.5) | vec3(-51.0, 64.0, -32.0) | vec3(0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bgr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rrr + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.0, 0.0) | vec3(1.0, 1.0, 1.0) | vec3(-0.5, -0.5, -0.5) | vec3(-32.0, -32.0, -32.0) | vec3(-0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbb + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.75) | vec3(1.125, 1.125, 1.125) | vec3(-4.875, -4.875, -4.875) | vec3(-51.0, -51.0, -51.0) | vec3(0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbb; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbg + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.75, 0.75, 0.5) | vec3(1.125, 1.125, 1.25) | vec3(-4.875, -4.875, -2.25) | vec3(-51.0, -51.0, 64.0) | vec3(0.0526315789474, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbg; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_grg + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.5, 0.0, 0.5) | vec3(1.25, 1.0, 1.25) | vec3(-2.25, -0.5, -2.25) | vec3(64.0, -32.0, 64.0) | vec3(-0.0322580645161, -0.75, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.grg; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rbr + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec3 out0 = [ vec3(0.0, 0.75, 0.0) | vec3(1.0, 1.125, 1.0) | vec3(-0.5, -4.875, -0.5) | vec3(-32.0, -51.0, -32.0) | vec3(-0.75, 0.0526315789474, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rbr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_rggr + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.5, 0.0) | vec4(1.0, 1.25, 1.25, 1.0) | vec4(-0.5, -2.25, -2.25, -0.5) | vec4(-32.0, 64.0, 64.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rggr; + ${OUTPUT} + } + "" + end + + + case mediump_vec3_bbbb + version 300 es + values + { + input vec3 in0 = [ vec3(0.0, 0.5, 0.75) | vec3(1.0, 1.25, 1.125) | vec3(-0.5, -2.25, -4.875) | vec3(-32.0, 64.0, -51.0) | vec3(-0.75, -0.0322580645161, 0.0526315789474) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.75, 0.75) | vec4(1.125, 1.125, 1.125, 1.125) | vec4(-4.875, -4.875, -4.875, -4.875) | vec4(-51.0, -51.0, -51.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.0526315789474, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbbb; + ${OUTPUT} + } + "" + end + + +end # vec3_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.html b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.html new file mode 100644 index 000000000000..1121c06fec30 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.html @@ -0,0 +1,42 @@ + + + + +WebGL Shader Conformance Tests + + + + + + + + + +
+
+ + + + diff --git a/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.test b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.test new file mode 100644 index 000000000000..df22f5b49325 --- /dev/null +++ b/LayoutTests/webgl/resources/webgl_test_files/deqp/data/gles3/shaders/swizzles_vec4.test @@ -0,0 +1,1159 @@ +# WARNING: This file is auto-generated. Do NOT modify it manually, but rather +# modify the generating script file. Otherwise changes will be lost! +# See split-swizzles.js + +group vec4_swizzles "vec4 swizzles" + + case mediump_vec4_x + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.x; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_w + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.w; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wx + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wz + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wz; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_www + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.www; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_yyw + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzy + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xyzw + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyzw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzyx + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzyx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xxxx + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xxxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_yyyy + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.yyyy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wwww + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwww; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wzzw + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wzzw; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_wwwy + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.wwwy; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_xyxx + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.xyxx; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_zzwz + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.zzwz; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_s + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.s; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_q + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.q; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qs + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qs; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qp + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qp; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqq + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ttq + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ttq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qpt + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_stpq + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stpq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qpts + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qpts; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ssss + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ssss; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_tttt + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.tttt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqqq + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qppq + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qppq; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_qqqt + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.qqqt; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_stss + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.stss; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ppqp + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ppqp; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_r + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.0 | 1.0 | -0.5 | -32.0 | -0.75 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.r; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_a + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output float out0 = [ 0.825 | 1.75 | 9.0 | 24.0 | 0.25 ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.a; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ar + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.0) | vec2(1.75, 1.0) | vec2(9.0, -0.5) | vec2(24.0, -32.0) | vec2(0.25, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ar; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_ab + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec2 out0 = [ vec2(0.825, 0.75) | vec2(1.75, 1.125) | vec2(9.0, -4.875) | vec2(24.0, -51.0) | vec2(0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.ab; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaa + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.825, 0.825) | vec3(1.75, 1.75, 1.75) | vec3(9.0, 9.0, 9.0) | vec3(24.0, 24.0, 24.0) | vec3(0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaa; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_gga + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.5, 0.5, 0.825) | vec3(1.25, 1.25, 1.75) | vec3(-2.25, -2.25, 9.0) | vec3(64.0, 64.0, 24.0) | vec3(-0.0322580645161, -0.0322580645161, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gga; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abg + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec3 out0 = [ vec3(0.825, 0.75, 0.5) | vec3(1.75, 1.125, 1.25) | vec3(9.0, -4.875, -2.25) | vec3(24.0, -51.0, 64.0) | vec3(0.25, 0.0526315789474, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abg; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rgba + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgba; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abgr + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.5, 0.0) | vec4(1.75, 1.125, 1.25, 1.0) | vec4(9.0, -4.875, -2.25, -0.5) | vec4(24.0, -51.0, 64.0, -32.0) | vec4(0.25, 0.0526315789474, -0.0322580645161, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abgr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rrrr + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.0, 0.0, 0.0) | vec4(1.0, 1.0, 1.0, 1.0) | vec4(-0.5, -0.5, -0.5, -0.5) | vec4(-32.0, -32.0, -32.0, -32.0) | vec4(-0.75, -0.75, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rrrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_gggg + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.5, 0.5, 0.5, 0.5) | vec4(1.25, 1.25, 1.25, 1.25) | vec4(-2.25, -2.25, -2.25, -2.25) | vec4(64.0, 64.0, 64.0, 64.0) | vec4(-0.0322580645161, -0.0322580645161, -0.0322580645161, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.gggg; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaaa + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.825) | vec4(1.75, 1.75, 1.75, 1.75) | vec4(9.0, 9.0, 9.0, 9.0) | vec4(24.0, 24.0, 24.0, 24.0) | vec4(0.25, 0.25, 0.25, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaaa; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_abba + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.75, 0.75, 0.825) | vec4(1.75, 1.125, 1.125, 1.75) | vec4(9.0, -4.875, -4.875, 9.0) | vec4(24.0, -51.0, -51.0, 24.0) | vec4(0.25, 0.0526315789474, 0.0526315789474, 0.25) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.abba; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_aaag + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.825, 0.825, 0.825, 0.5) | vec4(1.75, 1.75, 1.75, 1.25) | vec4(9.0, 9.0, 9.0, -2.25) | vec4(24.0, 24.0, 24.0, 64.0) | vec4(0.25, 0.25, 0.25, -0.0322580645161) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.aaag; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_rgrr + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.0, 0.5, 0.0, 0.0) | vec4(1.0, 1.25, 1.0, 1.0) | vec4(-0.5, -2.25, -0.5, -0.5) | vec4(-32.0, 64.0, -32.0, -32.0) | vec4(-0.75, -0.0322580645161, -0.75, -0.75) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.rgrr; + ${OUTPUT} + } + "" + end + + + case mediump_vec4_bbab + version 300 es + values + { + input vec4 in0 = [ vec4(0.0, 0.5, 0.75, 0.825) | vec4(1.0, 1.25, 1.125, 1.75) | vec4(-0.5, -2.25, -4.875, 9.0) | vec4(-32.0, 64.0, -51.0, 24.0) | vec4(-0.75, -0.0322580645161, 0.0526315789474, 0.25) ]; + output vec4 out0 = [ vec4(0.75, 0.75, 0.825, 0.75) | vec4(1.125, 1.125, 1.75, 1.125) | vec4(-4.875, -4.875, 9.0, -4.875) | vec4(-51.0, -51.0, 24.0, -51.0) | vec4(0.0526315789474, 0.0526315789474, 0.25, 0.0526315789474) ]; + } + + both "" + #version 300 es + precision mediump float; + + ${DECLARATIONS} + + void main() + { + ${SETUP} + out0 = in0.bbab; + ${OUTPUT} + } + "" + end + + +end # vec4_swizzles \ No newline at end of file diff --git a/LayoutTests/webgl/resources/webgl_test_files/js/js-test-pre.js b/LayoutTests/webgl/resources/webgl_test_files/js/js-test-pre.js index e1cb9f749c02..adc1f8a5aa55 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/js/js-test-pre.js +++ b/LayoutTests/webgl/resources/webgl_test_files/js/js-test-pre.js @@ -93,20 +93,25 @@ const RESULTS = { fail: 0, }; +// We cache these values since they will potentially be accessed many (100k+) +// times and accessing window can be significantly slower than a local variable. +const locationPathname = window.location.pathname; +const webglTestHarness = window.parent.webglTestHarness; + function reportTestResultsToHarness(success, msg) { if (success) { RESULTS.pass += 1; } else { RESULTS.fail += 1; } - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg); + if (webglTestHarness) { + webglTestHarness.reportResults(locationPathname, success, msg); } } function reportSkippedTestResultsToHarness(success, msg) { - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.reportResults(window.location.pathname, success, msg, true); + if (webglTestHarness) { + webglTestHarness.reportResults(locationPathname, success, msg, true); } } @@ -116,8 +121,8 @@ function notifyFinishedToHarness() { } window._didNotifyFinishedToHarness = true; - if (window.parent.webglTestHarness) { - window.parent.webglTestHarness.notifyFinished(window.location.pathname); + if (webglTestHarness) { + webglTestHarness.notifyFinished(locationPathname); } if (window.nonKhronosFrameworkNotifyDone) { window.nonKhronosFrameworkNotifyDone(); @@ -268,9 +273,9 @@ function getCurrentTestName() */ function testPassedOptions(msg, addSpan) { + reportTestResultsToHarness(true, _currentTestName + ": " + msg); if (addSpan && !quietMode()) { - reportTestResultsToHarness(true, _currentTestName + ": " + msg); _addSpan('PASS ' + escapeHTML(_currentTestName) + ": " + escapeHTML(msg) + ''); } if (_jsTestPreVerboseLogging) { @@ -285,9 +290,9 @@ function testPassedOptions(msg, addSpan) */ function testSkippedOptions(msg, addSpan) { + reportSkippedTestResultsToHarness(true, _currentTestName + ": " + msg); if (addSpan && !quietMode()) { - reportSkippedTestResultsToHarness(true, _currentTestName + ": " + msg); _addSpan('SKIP ' + escapeHTML(_currentTestName) + ": " + escapeHTML(msg) + ''); } if (_jsTestPreVerboseLogging) { diff --git a/LayoutTests/webgl/resources/webgl_test_files/js/tests/canvas-tests-utils.js b/LayoutTests/webgl/resources/webgl_test_files/js/tests/canvas-tests-utils.js index 747711261835..7c3010437916 100644 --- a/LayoutTests/webgl/resources/webgl_test_files/js/tests/canvas-tests-utils.js +++ b/LayoutTests/webgl/resources/webgl_test_files/js/tests/canvas-tests-utils.js @@ -340,6 +340,7 @@ function testAPIs(contextType) { passed = passed && r; } + methods.push(...["makeXRCompatible"]); var extended = false; for (var i in gl) { if (typeof gl[i] == "function" && methods.indexOf(i) == -1) { diff --git a/LayoutTests/webgl/resources/webgl_test_files/resources/transparent-2frames.mp4 b/LayoutTests/webgl/resources/webgl_test_files/resources/transparent-2frames.mp4 new file mode 100644 index 000000000000..261069776f60 Binary files /dev/null and b/LayoutTests/webgl/resources/webgl_test_files/resources/transparent-2frames.mp4 differ