Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 3.47 KB

README.md

File metadata and controls

57 lines (39 loc) · 3.47 KB

React Native WebGPU Conformance Test Suite

This is the conformance test suite for React Native WebGPU. It tests the behaviors defined by the WebGPU specification. This repository is forked from the WebGPU CTS and currently targets the react-native-wgpu library. In the future, we hope to support any WebGPU-compliant React Native module.

The contents of this test suite are considered normative; implementations must pass them to be WebGPU-conformant. Mismatches between the specification and tests are bugs.

Building and running the Test Suite

To install dependencies for the conformance test suite, run the following command:

npm install

For ios:

pod install --project-directory=ios

The React Native portion of this test suite is built on top of React Native Test App. Build instructions for your target platform can be found here: https://github.com/microsoft/react-native-test-app/wiki/Quick-Start#platform-specific-instructions. The conformance test suite targets Hermes by default.

To run on an ios simulator, run:

npm run ios

To run tests, click the "Run Tests" button on the app homepage. Once tests complete, the app will generate a summary of failed and skipped tests, along with a list of all tests that failed. The tests will take a few minutes to run. A log of the current running test can be viewed in the Metro console.

react-native-wgpu inventory

For the react-native-wgpu library, there are a few blockers for generating a full inventory of tests passing. Here are the test suites that currently crash or hang:

  • webgpu/api/operation/adapter: Main thread hangs on a promise await. See: wcandillon/react-native-webgpu#126
  • webgpu/api/operation/buffers: map.spec and map_oom.spec have tests that crash when trying to allocate a buffer. remapped_for_write, mappedAtCreation,mapState, mapAsync,mapState, mappedAtCreation.
  • webgpu/api/operation/command_buffer: Tests with compressed texture formats seem to hang indefinitely (e.g. astc-4x4-unorm). Tests following the copyTextureToTexture tests all seem to time out, possibly due to the depth32float_stencil8 format.
  • webgpu/api/operation/memory_sync: The "either" interpolation option is not supported, causing shader compilation to crash. Shader compilation crashes should likely not crash the app. Tests run to completion when Dawn is updated to v6592+.
  • webgpu/api/operation/render_pipeline: Tests crash with an unknown error in pipeline_output_targets.spec.
  • webgpu/api/operation/rendering: Same shader compilation issue as memory_sync tests. depth_clip_clamp has a hang when mapping buffer data asynchronously.
  • webgpu/api/operation/shader_module: Different shader compilation issue.
  • webgpu/api/operation/storage_texture: Same as memory_sync tests.
  • webgpu/api/operation/vertex_state: Same as memory_sync tests.
  • webgpu/api/operation/reflection: Attribute tests crash.

Contributing

Please read the introductory guidelines before contributing. Other documentation may be found in docs/ and in the helper index (source).

Read CONTRIBUTING.md on licensing.

For realtime communication about WebGPU spec and test, join the #WebGPU:matrix.org room on Matrix.