Skip to content
This repository has been archived by the owner on Jun 18, 2021. It is now read-only.

Disable SPIRV-Cross by default #826

Merged
merged 1 commit into from
Mar 31, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ all-features = true
[lib]

[features]
default = ["cross"]
default = []
trace = ["serde", "wgc/trace"]
replay = ["serde", "wgc/replay"]
# Make Vulkan backend available on platforms where it is by default not, e.g. macOS
Expand Down Expand Up @@ -45,6 +45,7 @@ rev = "41f106d7fc8e2ca49b21aed0919fa6cc67317f7f"

[dependencies]
arrayvec = "0.5"
log = "0.4"
parking_lot = "0.11"
profiling = { version = "0.1.10", default-features = false } # Need 0.1.10+ to avoid compliation error with proc macros off.
raw-window-handle = "0.3"
Expand Down
4 changes: 3 additions & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ For the simplest examples without using any helping code (see `framework.rs` her

Notably, `capture` example shows rendering without a surface/window. It reads back the contents and saves them to a file.

All the examples use [WGSL](https://gpuweb.github.io/gpuweb/wgsl.html) shaders unless specified otherwise.

All framework-based examples render to the window.

## Feature matrix
| Feature | boids | cube | mipmap | msaa-line | shadow | skybox | texture-arrays | water | conservative-raster |
| ---------------------------- | ------ | ------ | ------ | --------- | ------ | ------ | -------------- | ------ | ------------------- |
| WGSL shaders | :star: | :star: | :star: | :star: | :star: | :star: | | :star: | :star: |
| vertex attributes | :star: | :star: | | :star: | :star: | :star: | :star: | :star: | |
| instancing | :star: | | | | | | | | |
| lines and points | | | | :star: | | | | | :star: |
Expand All @@ -34,6 +35,7 @@ All framework-based examples render to the window.
| render bundles | | | | :star: | | | | :star: | |
| compute passes | :star: | | | | | | | | |
| *optional extensions* | | | | | | | :star: | | |
| - SPIR-V shaders | | | | | | | :star: | | |
| - binding indexing | | | | | | | :star: | | |
| - push constants | | | | | | | :star: | | |
| - depth clamping | | | | | :star: | | | | |
Expand Down
14 changes: 14 additions & 0 deletions src/backend/direct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,11 @@ impl crate::Context for Context {
implicit_pipeline_ids
));
if let Some(cause) = error {
if let wgc::pipeline::CreateRenderPipelineError::Internal { stage, ref error } = cause {
log::warn!("Shader translation error for stage {:?}: {}", stage, error);
log::warn!("Please report it to https://github.com/gfx-rs/naga");
log::warn!("Try enabling `wgpu/cross` feature as a workaround.");
}
self.handle_error(
&device.error_sink,
cause,
Expand Down Expand Up @@ -1053,6 +1058,15 @@ impl crate::Context for Context {
implicit_pipeline_ids
));
if let Some(cause) = error {
if let wgc::pipeline::CreateComputePipelineError::Internal(ref error) = cause {
log::warn!(
"Shader translation error for stage {:?}: {}",
wgt::ShaderStage::COMPUTE,
error
);
log::warn!("Please report it to https://github.com/gfx-rs/naga");
log::warn!("Try enabling `wgpu/cross` feature as a workaround.");
}
self.handle_error(
&device.error_sink,
cause,
Expand Down