teoxoy
63e85b4b15
[doc] explain how case clauses with multiple selectors are supported
2022-12-09 10:21:58 -08:00
teoxoy
f36adeefaa
[glsl-out] introduce a new block for switch cases
2022-12-09 10:21:58 -08:00
teoxoy
eccdc0aeb1
[spv-out] omit extra switch case blocks where possible
2022-12-09 10:21:58 -08:00
teoxoy
be70a2ec03
[spv-out] fix switch cases after default not being output
2022-12-09 10:21:58 -08:00
teoxoy
3455147496
[hlsl-out] omit extra switch case blocks where possible
2022-12-09 10:21:58 -08:00
teoxoy
db63877c8c
[msl-out] omit extra switch case blocks where possible
2022-12-09 10:21:58 -08:00
teoxoy
e05706bc48
[wgsl] remove fallthrough statement
...
also add support for default to be used with other case selectors
2022-12-09 10:21:58 -08:00
teoxoy
8405e387d8
[wgsl-in] use parse_block in more places
2022-12-09 10:21:58 -08:00
Harald Reingruber
f0f700c2d9
Test setup for WebAssembly+WebGL ( #3238 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-09 01:02:39 +00:00
Elabajaba
85fda2d18e
Update to ash 0.37.1 to replace deprecated function call ( #3273 )
...
* update to ash 0.37.1 to fix CI
* changelog
* Use equals for ash version
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-08 15:22:30 -05:00
Connor Fitzgerald
458fb9bed7
Implement SHADER_PRIMITIVE_INDEX on all Backends ( #3272 )
...
* Fix bunnymark on GL
* Implement SHADER_PRIMITIVE_INDEX on all backends
* Changelog
2022-12-08 08:47:44 -05:00
Jim Blandy
a50836e0cb
Make wgpu-core users responsible for choosing back ends. ( #3254 )
2022-12-07 20:58:45 -05:00
Jim Blandy
3d33ace8d7
Update workspace Cargo.lock for new deno_webgpu version. ( #3270 )
2022-12-06 19:06:21 +00:00
Erich Gubler
feddf187c0
fix: oops, remove gles feature from wgpu-hal's defaults ( #3264 )
2022-12-05 16:46:07 -05:00
Jim Blandy
537f077132
Evaluate gfx_select's #[cfg] conditions at the right time. ( #3253 )
...
See the comments in the code for details.
2022-12-05 12:47:42 -08:00
Ashley
6147c91818
Support OES_texture_float_linear in webgl ( #3261 )
...
closes https://github.com/gfx-rs/wgpu/issues/3215
2022-12-05 12:58:06 -05:00
JMS55
bf4e62b1ac
Fix textureGather on texture_2d<u32/i32> ( #2138 )
...
* Fix textureGather on texture_2d<u32/i32>
* Add textureGather u32/i32 tests
* Update src/valid/expression.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
* Fix formatting
* undo analyzer change
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com >
2022-12-05 10:03:11 +00:00
Leo Kettmeir
9cc0ff1cd5
chore: update deno ( #3258 )
...
* update deno
* bump ver
2022-12-03 09:35:10 -08:00
Jinlei Li
5f3acf50b4
Decrease max_buffer_size limit value to be compatible with Apple2 GPU ( #3255 )
...
* Decrease `max_buffer_size` limit value to be compatible with Apple2 GPU
* Update CHANGELOG
* Update CHANGELOG.md
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-03 08:12:43 +00:00
João Capucho
d1c29534c8
glsl-in: Fix position propagation in lowering ( #2079 )
...
When lowering `Select` expressions the position could be wrongfully
updated from `AccessBase { constant_index: false }` to
`AccessBase { constant_index: true }` this caused dynamic indexing
in an array behind a structure to fail if it was stored in a constant.
Furthermore the position could also be updated from `Rhs` to
`AccessBase`, this could cause issues because `AccessBase` doesn't
load variables (which `Rhs` does), so accessing a member from a
structure behind a pointer would return the wrong result.
2022-12-02 10:48:20 +01:00
i509VCB
88acaf7922
wgpu spell checking ( #3228 )
2022-12-02 02:59:55 -05:00
Kevin Reid
2209463a54
Return an error instead of panicking when canvas context is unavailable ( #3052 )
...
* Low-level error handling in canvas context creation (for WebGPU and WebGL 2).
Part of fixing #3017 . This commit changes the handling of `web_sys`
errors and nulls from `expect()` to returning `Err`, but it doesn't
actually affect the public API — that will be done in the next commit.
* Breaking: Change type of `create_surface()` functions to expose canvas errors.
Part of fixing #3017 .
2022-11-30 23:41:29 -05:00
Connor Fitzgerald
7960c5e154
Disable multithreaded gl compute on llvmpipe ( #3251 )
2022-12-01 04:28:09 +00:00
Kevin Reid
98999dad63
Document when types are not WebGPU types. ( #3235 )
...
* Explain wgpu::util more precisely.
* Add notes to types that are unique to wgpu (not WebGPU).
I also changed the wording in BufferSlice to be more consistent with
other documentation.
2022-12-01 02:30:30 +00:00
Nicolas Silva
e90aacea96
Validate texture copy ranges earlier to prevent integer overflow ( #3090 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2022-12-01 01:20:48 +00:00
Erich Gubler
46b121667b
refactor(dx12): remove unsafe ops in Adapter::texture_format_capabilities ( #3194 )
2022-11-30 16:48:03 -05:00
Erich Gubler
9bb2d28ce2
Add cargo-deny to CI ( #3185 )
2022-11-30 16:46:58 -05:00
Jim Blandy
9c6a60d97c
Fix surface creation cfgs in example framework. ( #3246 )
2022-11-30 16:46:24 -05:00
Nicolas Silva
a9d33193b3
Fix incorrect offset in get_mapped_range ( #3233 )
...
* Add a test.
* Fix incorrect offset in get_mapped_range.
* Add an entry in the changelog.
2022-11-30 16:45:49 -05:00
Jim Blandy
6d025a93c7
README.md: Update "Get started" link to "Running the examples". ( #3242 )
2022-11-28 14:38:39 -05:00
Connor Fitzgerald
183ba3f231
Make Surface::get_default_config return an Option.
2022-11-27 01:50:47 -05:00
Connor Fitzgerald
84cb3e65a9
Unify Surface Capabilities APIs under one function call
2022-11-27 01:50:47 -05:00
Jinlei Li
d7fe7ef8cc
vk: eliminate duplicate values in SurfaceCapabilities's formats field ( #3227 )
2022-11-26 03:37:37 -05:00
Nicolas Silva
82e9dcf8f7
Allow unspecified bits when deserializing the API's bitflags ( #3229 )
2022-11-25 23:13:22 -05:00
Xiaopeng Li
fd0df189ef
Create IDXGIFactoryMedia by CreateDXGIFactory1
2022-11-25 15:21:08 +08:00
Jim Blandy
d4b1d57f3c
Move ResourceMetadata into its own module, and give it a proper interface ( #3213 )
2022-11-23 17:29:20 -05:00
Samuel Hurel
d3e5789b95
Fix doc generation ( #3224 )
2022-11-23 16:59:59 -05:00
Jim Blandy
73b23f1c8d
Move minimum supported rust version (MSRV) from 1.65 back to 1.64. ( #3231 )
2022-11-23 21:22:03 +00:00
Andreas Reich
2ccfb42440
allow gles float textures to be multisampled if available ( #3183 )
2022-11-23 16:10:11 -05:00
Jim Blandy
596d8851aa
Update ndk-sys to v0.4.1+23.1.7779620, to fix checksum failures. ( #3232 )
2022-11-23 15:29:22 -05:00
Marco Buono
4976494709
Document EarlyDepthTest and ConservativeDepth syntax in WGSL ( #2132 )
2022-11-20 10:45:45 +01:00
Teodor Tanasoaia
5b79cca384
bump MSRV to 1.63 ( #2129 )
2022-11-18 16:29:49 +00:00
Erich Gubler
aa22301b4b
Parenthesize unary negations to avoid -- ( #2087 )
...
* fix(glsl-out,hlsl-out,msl-out): parenthesize unary negations a la `wgsl` everywhere
Unify parenthesization of unary negations across all backends with what the `wgsl` backend does,
which is `<op>(<expr>)`. This avoids ambiguity with output languages for which `--` is a different
operation; in this case, we've been accidentally emitting prefix decrements.
* build: update `rspirv` 0.11 -> 0.12 (FIXME: use upstream release)
* test: add `operators::negation_avoids_prefix_decrement` test
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com >
2022-11-17 11:43:56 +01:00
Teodor Tanasoaia
e056805784
[msl-out] use back::COMPONENTS ( #2124 )
2022-11-16 11:12:45 -08:00
Jim Blandy
f41a1c294b
Remove unnecessary mutability from ResourceMetadata field uses. ( #3210 )
2022-11-15 21:52:12 +00:00
Erich Gubler
18f3f5f6f0
Enable unsafe_ops_in_unsafe_fn lint in all workspaces ( #3044 )
2022-11-14 10:49:39 -08:00
Xiaopeng Li
bd2290f4ac
Add FactoryMedia
2022-11-10 17:38:01 +08:00
Connor Fitzgerald
d536613705
Fix merge compile issues ( #3198 )
2022-11-09 21:46:49 +00:00
Jim Blandy
bc1728065b
wgpu-hal: Document some details of buffer binding. ( #3169 )
2022-11-09 15:50:06 -05:00
i509VCB
0e937c8cd0
make Ids a u64 internally ( #3178 )
2022-11-09 15:48:07 -05:00