Will fail with an error when trying to generate a GLSL shader that has
dynamically sized arrays in a version of GLSL that does not support
dynamically sized arrays.
1694: hal/dx12: fix the binding model r=kvark a=kvark
**Connections**
Depends on https://github.com/gfx-rs/naga/pull/1114
Makes the halmark + bunnymark run on DX12
**Description**
There was a mess-up in trying to use top-down layout...
Also fixes double-free on the queue in DX12.
**Testing**
Examples
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1692: Avoid dev-dep on image r=cwfitzgerald a=Craig-Macomber
**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_
#1610
**Description**
_Describe what problem this is solving, and how it's solved._
This removes image from the dev-deps, reducing build time/size.
Looks like noise was pulling in image with all formats enabled:
├── noise v0.7.0
│ ├── image v0.23.14
This was fixed in https://github.com/Razaekel/noise-rs/commit/1af9e1522236b2c584fb9a02150c9c67a5e6bb04#diff-2e9d962a08321605940b5a657135052fbcef87b5e360662bb527c96d9a615542 which has not been released yet.
For now, we can workaround this with:
noise = { version = "0.7", default-features = false }
**Testing**
_Explain how this change is tested._
Ran `cargo build` as well as `cargo run --example water`
Co-authored-by: Craig <CraigM@CraigM.info>
1691: Fix a couple of spelling errors in comments r=cwfitzgerald a=Craig-Macomber
**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_
None.
**Description**
_Describe what problem this is solving, and how it's solved._
Fixes a couple spelling errors my spell checker highlighted when reading the source.
**Testing**
_Explain how this change is tested._
Spell checker stopped highlighting the words.
Co-authored-by: Craig <CraigM@CraigM.info>
1687: Update naga, use binding map in DX12 r=kvark a=kvark
**Connections**
Updates naga with https://github.com/gfx-rs/naga/pull/1105
**Description**
Establishes a binding map contract between dx12 backend and naga.
**Testing**
Gets the cube running, but there is something strange there.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1676: Add `Feature::SHADER_PRIMITIVE_INDEX` to support `builtin(primitive_index)` in fragment shaders r=kvark a=initial-algebra
**Connections**
https://github.com/gfx-rs/wgpu/issues/1669https://github.com/gfx-rs/naga/pull/1097
**Description**
Allows fragment shaders to access the index of the current primitive via a new builtin variable.
**Testing**
Works on my machine.
- passes the capability to my fork of `naga` for basic validation and translation
- enables the `geometryShader` feature for Vulkan
- is refused by DX12
Needs to be implemented and tested for OpenGL, DirectX and Metal.
Co-authored-by: initial-algebra <67286231+initial-algebra@users.noreply.github.com>
1618: webgpu: pass wgsl directly r=kvark a=grovesNL
**Connections**
Matrix conversation about passing WGSL to Gecko
**Description**
Gecko accepts WGSL now, so we can pass it directly instead of going through naga.
We could also consider converting SPIR-V to WGSL soon, assuming nobody is relying on the SPIR-V path with older versions of Gecko. We could do that in a separate PR though.
**Testing**
Tried hello-compute locally, using the examples HTML file and creating wasm with something like
```
RUSTFLAGS=--cfg=web_sys_unstable_apis cargo build --release --example hello-compute --target wasm32-unknown-unknown
wasm-bindgen target/wasm32-unknown-unknown/release/examples/hello-compute.wasm --out-dir target/generated --web
```
Co-authored-by: Joshua Groves <josh@joshgroves.com>
* Hack in support for PrimitiveID on Vulkan
* Rename to PrimitiveIndex and add preliminary support for GLSL, HLSL and MSL
* Implement as an extra WGSL built-in
* Update extra.wgsl outputs
* Run rustfmt; fix WGSL writer
* Add rustfmt changes I forgot
* Update extra.wgsl test output for WGSL fix
* Bump macOS version to 10.15 in validate-msl to support primitive_index
1673: hal/vk: relay semaphore r=Ralith a=kvark
**Connections**
Somewhere on the Matrix, by @pythonesque
**Description**
Vulkan (somewhat confusingly) requires semaphore synchronization between `vkQueueSubmit` and `vkQueuePresent` *even if* it's done on the same queue.
This PR exercises a dumb idea of just keeping one binary semaphore as a "relay" between all queue commands, all concealed within hal/vk backend.
**Testing**
Running Halmark shows that all the things break here. I'm not seeing anything particularly wrong with the code though. My humble guess is that AMD driver (at least) isn't happy about the mix of binary and timeline semaphores used together in the same signal operation.
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
1671: Use EGL_KHR_gl_colorspace for srgb if available r=kvark a=cwfitzgerald
**Connections**
Fixes#1667
**Description**
Uses the extension to provide SRGB if needed relevant.
I also promoted the log message about missing robustness to a warning because it is a safety issue.
**Testing**
Tested on rpi and haswell.
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
1664: hal/dx12: reset scissor and viewport r=kvark a=kvark
**Connections**
Follow-up to #1602 that actually makes it render!
**Description**
"hello-triange" and "msaa-line" examples work now.
Everything else is blocked on Naga's HLSL output, starting from https://github.com/gfx-rs/naga/pull/1086
**Testing**
Ran the examples :)
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>