mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 00:17:03 +00:00
Roll third_party/webgpu-cts/ c0d64c238..65fcd99b7 (8 commits)
Regenerated:
- expectations.txt
- ts_sources.txt
- test_list.txt
- cache_list.txt
- resource_files.txt
- webtest .html files
c0d64c2382..65fcd99b74
- 65fcd9 webgpu/shader/validation: Add static_assert tests
- 0ec986 runtime: Add server '/load' RPC
- b5a8a3 webgpu/shader: Validate semicolons
- 921148 webgpu/shader/validation: Add resource binding tests
- 408f94 Fix resize-observer test.
- f32e8c Fix local ref-test runner
- bb8f11 val,render_pipeline,depth_stencil_state,depth_write,frag_depth (#2163)
- 77e0a9 Add subrect copy tests for copyToTexture (#2150)
Created with './tools/run cts roll'
Change-Id: I6534e8c067a897d65fe3002cd587672570d553f4
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Include-Ci-Only-Tests: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/117221
Kokoro: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
86a853d5ca
commit
6bbd8b4e77
@@ -16,63 +16,76 @@
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="dpr"></div>
|
||||
<div class="outer"></div>
|
||||
<script type="module">
|
||||
import { takeScreenshotDelayed } from '../../../../common/util/wpt_reftest_wait.js';
|
||||
import createPatternDataURL from '../create-pattern-data-url.js';
|
||||
|
||||
const {patternSize, dataURL} = createPatternDataURL();
|
||||
(async () => {
|
||||
const {patternSize, dataURL} = createPatternDataURL();
|
||||
|
||||
/**
|
||||
* Set the pattern's size on this element so that it draws where
|
||||
* 1 pixel in the pattern maps to 1 devicePixel.
|
||||
*/
|
||||
function setPattern(elem) {
|
||||
const oneDevicePixel = 1 / devicePixelRatio;
|
||||
const patternPixels = oneDevicePixel * patternSize;
|
||||
elem.style.backgroundImage = `url("${dataURL}")`;
|
||||
elem.style.backgroundSize = `${patternPixels}px ${patternPixels}px`;
|
||||
}
|
||||
document.querySelector('#dpr').textContent = `dpr: ${devicePixelRatio}`;
|
||||
|
||||
/*
|
||||
This ref creates elements like this
|
||||
<body>
|
||||
<div class="outer">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
...
|
||||
</div>
|
||||
</body>
|
||||
Where the outer div is a flexbox centering the child elements.
|
||||
Each of the child elements is set to a different width in percent.
|
||||
The devicePixelContentBox size of each child element is observed
|
||||
with a ResizeObserver and when changed, a pattern is applied to
|
||||
the element and the pattern's size set so each pixel in the pattern
|
||||
will be one device pixel.
|
||||
A similar process happens in the test HTML using canvases
|
||||
and patterns generated using putImageData.
|
||||
The test and this reference page should then match.
|
||||
*/
|
||||
|
||||
const outerElem = document.querySelector('.outer');
|
||||
|
||||
/**
|
||||
* Set the pattern's size on this element so that it draws where
|
||||
* 1 pixel in the pattern maps to 1 devicePixel.
|
||||
*/
|
||||
function setPatterns(entries) {
|
||||
for (const entry of entries) {
|
||||
setPattern(entry.target)
|
||||
/**
|
||||
* Set the pattern's size on this element so that it draws where
|
||||
* 1 pixel in the pattern maps to 1 devicePixel.
|
||||
*/
|
||||
function setPattern(elem) {
|
||||
const oneDevicePixel = 1 / devicePixelRatio;
|
||||
const patternPixels = oneDevicePixel * patternSize;
|
||||
elem.style.backgroundImage = `url("${dataURL}")`;
|
||||
elem.style.backgroundSize = `${patternPixels}px ${patternPixels}px`;
|
||||
}
|
||||
}
|
||||
|
||||
const observer = new ResizeObserver(setPatterns);
|
||||
for (let percentSize = 7; percentSize < 100; percentSize += 13) {
|
||||
const innerElem = document.createElement('div');
|
||||
innerElem.style.width = `${percentSize}%`;
|
||||
observer.observe(innerElem, {box:"device-pixel-content-box"});
|
||||
outerElem.appendChild(innerElem);
|
||||
}
|
||||
/*
|
||||
This ref creates elements like this
|
||||
<body>
|
||||
<div class="outer">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
...
|
||||
</div>
|
||||
</body>
|
||||
Where the outer div is a flexbox centering the child elements.
|
||||
Each of the child elements is set to a different width in percent.
|
||||
The devicePixelContentBox size of each child element is observed
|
||||
with a ResizeObserver and when changed, a pattern is applied to
|
||||
the element and the pattern's size set so each pixel in the pattern
|
||||
will be one device pixel.
|
||||
A similar process happens in the test HTML using canvases
|
||||
and patterns generated using putImageData.
|
||||
The test and this reference page should then match.
|
||||
*/
|
||||
|
||||
const outerElem = document.querySelector('.outer');
|
||||
|
||||
let resolve;
|
||||
const promise = new Promise(_resolve => (resolve = _resolve));
|
||||
|
||||
/**
|
||||
* Set the pattern's size on this element so that it draws where
|
||||
* 1 pixel in the pattern maps to 1 devicePixel.
|
||||
*/
|
||||
function setPatterns(entries) {
|
||||
for (const entry of entries) {
|
||||
setPattern(entry.target)
|
||||
}
|
||||
resolve();
|
||||
}
|
||||
|
||||
const observer = new ResizeObserver(setPatterns);
|
||||
for (let percentSize = 7; percentSize < 100; percentSize += 13) {
|
||||
const innerElem = document.createElement('div');
|
||||
innerElem.style.width = `${percentSize}%`;
|
||||
observer.observe(innerElem, {box:"device-pixel-content-box"});
|
||||
outerElem.appendChild(innerElem);
|
||||
}
|
||||
|
||||
await promise;
|
||||
takeScreenshotDelayed(50);
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="dpr"></div>
|
||||
<div class="outer"></div>
|
||||
<script type="module" src="resize_observer.html.js"></script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user