Skip to content

elliotsayes/AO-WebGPU-Demo

Repository files navigation

AO-WebGPU-Demo

frames_demo.mp4

Setup

  1. run git submodule update --init --recursive
  2. run ./build_docker.sh
  3. copy the glm source files from this folder into wasm_webgpu/glm
  4. run ./build.sh

Test

  1. (optional) verbose output from the loader by running (cd ao/loader && npm run patch:log && npm run build)
  2. cd into tests
  3. run npm install
  4. run npm run test:still or npm run test:frames
  5. check output folder tests/output for the generated image(s)

Example output

using GPU adapter: Apple M1 Max
...
Got device: <wgpu::Device 0x1>
Creating shader module...
[Asyncify] addSleepTaskOnce Data-Race Validation
Shader module: <wgpu::ShaderModule 0x1>
Creating render pipeline...
Render pipeline: <wgpu::RenderPipeline 0x1>
[Asyncify] addSleepTaskOnce RenderPassEncoderRelease
[Asyncify] addSleepTaskOnce TextureViewRelease
[Asyncify] addSleepTaskOnce CommandEncoderRelease
[Asyncify] addSleepTaskOnce QueueSubmit[1]
[Asyncify] addSleepTaskOnce QueueOnSubmittedWorkDone[1]
[Asyncify] addSleepTaskOnce CommandBufferRelease
[Asyncify] running SleepTasks [
  'Data-Race Validation',
  'RenderPassEncoderRelease',
  'TextureViewRelease',
  'CommandEncoderRelease',
  'QueueSubmit[1]',
  'CommandBufferRelease',
  'QueueOnSubmittedWorkDone[1]'
]
Running [ './faial-drf --all-dims --all-levels --json <wgsl_json>' ]
Kernel DRF status { fs_main: true, vs_main: true }
All Kernels Data-Race Free? true
[Asyncify] running SleepTasks []
[Asyncify] addSleepTaskOnce Data-Race Validation
[Asyncify] addSleepTaskOnce QueueSubmit[1]
[Asyncify] addSleepTaskOnce QueueOnSubmittedWorkDone[1]
[Asyncify] addSleepTaskOnce CommandEncoderRelease
[Asyncify] addSleepTaskOnce CommandBufferRelease
[Asyncify] addSleepTaskOnce BufferMapAsync
[Asyncify] running SleepTasks [
  'Data-Race Validation',
  'QueueSubmit[1]',
  'CommandEncoderRelease',
  'CommandBufferRelease',
  'BufferMapAsync',
  'QueueOnSubmittedWorkDone[1]'
]
Running [ './faial-drf --all-dims --all-levels --json <wgsl_json>' ]
Kernel DRF status { fs_main: true, vs_main: true }
All Kernels Data-Race Free? true
PNG size: 0x40589d0B
...

Diffs

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages