mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-02-16 17:02:32 +00:00
Test WebGPU backend with extra features
This commit is contained in:
parent
4bfa2722f7
commit
043e36c59a
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -156,10 +156,14 @@ jobs:
|
||||
- name: check web
|
||||
if: matrix.kind == 'web'
|
||||
run: |
|
||||
cargo ${{matrix.tool}} --target ${{ matrix.target }} -p wgpu
|
||||
# build examples
|
||||
cargo ${{matrix.tool}} --target ${{ matrix.target }} -p wgpu --examples
|
||||
|
||||
# Build for WebGL
|
||||
cargo ${{matrix.tool}} --target ${{ matrix.target }} -p wgpu --features webgl -- -D warnings
|
||||
# build with features
|
||||
cargo ${{matrix.tool}} --target ${{ matrix.target }} -p wgpu --features glsl,spirv
|
||||
|
||||
# build for WebGL
|
||||
cargo ${{matrix.tool}} --target ${{ matrix.target }} -p wgpu --features webgl
|
||||
|
||||
# build docs
|
||||
cargo doc --target ${{ matrix.target }} -p wgpu --no-deps
|
||||
|
@ -85,6 +85,8 @@ git = "https://github.com/gfx-rs/naga"
|
||||
rev = "09d35f3"
|
||||
#version = "0.8"
|
||||
|
||||
# DEV dependencies
|
||||
|
||||
[dev-dependencies.naga]
|
||||
git = "https://github.com/gfx-rs/naga"
|
||||
rev = "09d35f3"
|
||||
@ -94,4 +96,6 @@ features = ["wgsl-in"]
|
||||
[dev-dependencies]
|
||||
env_logger = "0.8"
|
||||
winit = "0.26" # for "halmark" example
|
||||
|
||||
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||
glutin = "0.28" # for "gles" example
|
||||
|
@ -2,9 +2,14 @@
|
||||
//! the ability to hook up wgpu-hal to an existing context and draw into it.
|
||||
|
||||
extern crate wgpu_hal as hal;
|
||||
use hal::{Adapter as _, CommandEncoder as _, Device as _, Queue as _};
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn main() {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn main() {
|
||||
use hal::{Adapter as _, CommandEncoder as _, Device as _, Queue as _};
|
||||
|
||||
env_logger::init();
|
||||
println!("Initializing external GL context");
|
||||
|
||||
|
@ -104,9 +104,12 @@ fn print_info_from_adapter(adapter: &wgpu::Adapter, idx: usize) {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
fn main() {}
|
||||
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
fn main() {
|
||||
env_logger::init();
|
||||
|
||||
let args: Vec<_> = std::env::args().skip(1).collect();
|
||||
|
||||
let instance = wgpu::Instance::new(wgpu::Backends::all());
|
||||
|
@ -1,3 +1,5 @@
|
||||
#![cfg_attr(target_arch = "wasm32", allow(dead_code))]
|
||||
|
||||
use std::collections::HashMap;
|
||||
use winit::{
|
||||
event::{Event, WindowEvent},
|
||||
|
Loading…
Reference in New Issue
Block a user