Commit Graph

9013 Commits

Author SHA1 Message Date
Nicolas Silva
bf38b4b0b1 Update naga to 0.11.0@git:568d7c4c136dada369ef7f59ee8414a263d6c7b2 (#3491)
* Update naga to 0.11.0@git:568d7c4c136dada369ef7f59ee8414a263d6c7b2

* Fix the clear_texture after naga update.
2023-02-16 15:24:24 +01:00
Josh Groves
568d7c4c13 Require LF for snapshots (#2253) 2023-02-16 01:54:49 +01:00
daxpedda
719ba83726 Enable more wgpu-hal functions for webgl (#3490) 2023-02-15 22:04:57 +00:00
daxpedda
e4445205c2 Remove emscripten crate features (#3467) 2023-02-15 21:46:00 +00:00
Teodor Tanasoaia
c51edd36fd Support stencil-only views and copying to/from combined depth-stencil textures (#3436) 2023-02-15 16:20:22 -05:00
Artavazd Balaian
ee33f4d384 [gles] fix: Set FORCE_POINT_SIZE if it is vertex shader with mesh consist of point list (#3440) 2023-02-15 10:05:52 -05:00
Teodor Tanasoaia
b33731c44c Validate before extracting texture selectors (#3487)
Move calls to `extract_texture_selector` after calls to `validate_texture_copy_range`, to avoid overflow.
2023-02-14 12:31:18 -08:00
Hanno Braun
581b22e6a0 Move warning to correct location (#3484)
It seems that where it was, it warned about the context being recreated
in every case, no matter whether the context would actually be recreated
or not.
2023-02-14 12:23:29 +00:00
Evan Mark Hopkins
1ad47f732d Fix texture built-ins where u32 was expected (#2245)
- The Typifier was updated to expect `uint`
- Both `glsl` and `spv` frontends where updated to cast the result to `sint`.
- Both `glsl` and `spv` backends where updated to cast the result to `uint`.
- Remove cast in `msl` backend.
2023-02-13 14:13:58 +01:00
Leo Kettmeir
bb01d723ba fix(deno): use correct op for GPUDevice.createSampler (#3480) 2023-02-11 01:29:07 +01:00
dependabot[bot]
bd712e083c Bump env_logger from 0.9.3 to 0.10.0 (#3479)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.9.3 to 0.10.0.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.9.3...v0.10.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 20:12:04 +00:00
dependabot[bot]
34da9b2da1 Bump termcolor from 1.1.3 to 1.2.0 (#3478)
Bumps [termcolor](https://github.com/BurntSushi/termcolor) from 1.1.3 to 1.2.0.
- [Release notes](https://github.com/BurntSushi/termcolor/releases)
- [Commits](https://github.com/BurntSushi/termcolor/compare/1.1.3...1.2.0)

---
updated-dependencies:
- dependency-name: termcolor
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 20:09:18 +00:00
dependabot[bot]
fd920338a0 Bump range-alloc from 0.1.2 to 0.1.3 (#3477)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 17:41:04 +00:00
dependabot[bot]
420cfe66f7 Bump wasm-bindgen-test from 0.3.33 to 0.3.34 (#3474)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 17:36:56 +00:00
dependabot[bot]
0c273bc496 Bump hassle-rs from 0.9.0 to 0.10.0 (#3473)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 12:17:17 -05:00
dependabot[bot]
1c17d57e4d Bump thiserror from 1.0.37 to 1.0.38 (#3471)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 17:16:09 +00:00
dependabot[bot]
72ff326b53 Bump bytemuck from 1.12.3 to 1.13.0 (#3470)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 17:09:40 +00:00
dependabot[bot]
492b877b68 Bump libc from 0.2.126 to 0.2.139 (#3469)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-10 17:06:57 +00:00
daxpedda
5677195873 Add Dependabot (#3468) 2023-02-10 11:51:06 -05:00
Teodor Tanasoaia
40b8f66146 Fix setup-dxc not found and make sure workflows run if their file was changed (#2247)
* fix setup-dxc not found

* run validation-windows if its workflow file was changed

* run validation-macos if its workflow file was changed

* run validation-linux if its workflow file was changed

* run lazy if its workflow file was changed
2023-02-10 13:44:57 +01:00
daxpedda
5b8c55c451 Build for WASM on docs.rs (#3462) 2023-02-09 15:38:40 -05:00
Jinlei Li
4593f951dd vk: fix surface view formats validation error (#3432)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-09 13:00:42 -05:00
Jinlei Li
0d5b4841d5 web: reimplement adapter|device_features (#3428) 2023-02-09 12:14:15 -05:00
Teodor Tanasoaia
4bebad706e Improve CI (#3453) 2023-02-09 10:33:53 -05:00
Connor Fitzgerald
49cfc88f35 [GL] Unbind Vertex Buffers After Renderpass (#3459)
Closes https://github.com/gfx-rs/wgpu/issues/3457
2023-02-09 10:32:27 -05:00
Connor Fitzgerald
f1ef213bbb Fix CI for merge queues 2023-02-08 19:52:25 -05:00
João Capucho
f038537e61 glsl-in: Add tests for output parameters casts 2023-02-08 11:39:09 +00:00
João Capucho
0a2e93c098 glsl-in: Perform output parameters implicit casts
Glsl defines under `Function Definitions` (Paragraph 6.1 in glsl 4.60),
the following:

> When function calls are resolved, an exact type match for all
> the arguments is sought.
> (...)
> If no exact match is found, then the implicit conversions in
> section “Implicit Conversions” will be applied to find a match.
> (...)
> Mismatched types on output parameters (out or inout) must have a
> conversion from the formal parameter type to the calling argument type.

The glsl frontend wasn't performing this implicit cast for output parameters.

This commit fixes that by using a proxy write, this
creates a spill variable with the correct type and in the call
prologue a conversion is made back to the original type and the
value is stored in the original variable.
2023-02-08 11:39:09 +00:00
Jim Blandy
b1d2ec043e Don't try to build the entire workspace on wasm32. (#3460) 2023-02-07 21:56:00 +00:00
Nathan Adams
238697c2da Add MULTISAMPLE_X16 texture format feature flag where supported (#3454) 2023-02-06 19:53:48 +01:00
Andreas Reich
3ea2c22c47 Fix for some minor issues in comments on some features. (#3455) 2023-02-06 18:19:33 +01:00
Teodor Tanasoaia
64f8691e52 Improve CI (#2241)
* update to actions/checkout@v3

* update to actions/upload-artifact@v3

* remove minor version

* remove unmaintained actions-rs actions

* update to codecov/codecov-action@v3

* use ubuntu-latest

* use extra cargo/rust env vars

* use cargo-nextest

* check naga-fuzz

* only check on MSRV and minimal-versions

* add whitespace between steps

* rename to CI

* use cargo-llvm-cov to generate code coverage
2023-02-06 17:47:18 +01:00
manunio
2d0aab875a fuzz: fix build failure (#2240) 2023-02-03 15:11:48 +01:00
Teodor Tanasoaia
41de797c74 Change type of mip_level_count and array_layer_count (members of TextureViewDescriptor and ImageSubresourceRange) from Option<NonZeroU32> to Option<u32> (#3445)
Clean up duplicated code related to texture layers/mips.
2023-02-03 15:03:34 +01:00
Nicolas Silva
6399dd4866 Update naga to 0.11.0@git:4b796b157cb2b67b0ab166a2238fe4e9473bfd52 (#3451) 2023-02-03 12:30:08 +01:00
João Capucho
fc81a20f53 spv-in: Don't apply interpolation to fragment shaders outputs (#2239)
SPIR-V doesn't allow the `Flat`, `NoPerspective`, `Sample` or
`Centroid` decorations on fragment shaders outputs, but the spirv
frontend was applying default interpolation to all outputs
unconditionally.

This wasn't an issue for most shaders since they output floats and the
default values for them don't interfere with SPIR-V semantics, but if
the shader returned a uint or int the interpolation would be set to
`Flat` which as stated above is disallowed.

This commit fixes the issue by only running the default interpolation
code when constructing the entry point and if the stage/IO allow it.
2023-02-03 11:48:23 +01:00
Elabajaba
42b48ecb9f Update gpu allocator to 0.22 (#3447)
* bump gpu-allocator version

* cargo.lock
2023-02-03 00:58:07 -05:00
Leo Kettmeir
e36c080ef8 fix(deno): specify viewFormats in configure surface (#3446) 2023-02-02 22:14:31 +01:00
Evan Mark Hopkins
4b796b157c [glsl-out] Version check countLeadingZeros (#2238) 2023-02-02 22:11:09 +01:00
Evan Mark Hopkins
fb2d438dbd [msl-out] Update firstLeadingBit for signed integers (#2235)
The prior code only supported unsigned integers.

Also fixes #2236.

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2023-02-02 09:47:17 -08:00
Artavazd Balaian
fe851fb008 [glsl] Inject default gl_PointSize = 1.0 in vertex shaders if FORCE_POINT_SIZE option was set (#2223)
According to https://registry.khronos.org/OpenGL/specs/es/3.2/GLSL_ES_Specification_3.20.html#built-in-language-variables

> The variable gl_PointSize is intended for a shader to write the size of the point to be rasterized. It is measured in pixels. If gl_PointSize is not written to, its value is undefined in subsequent pipe stages.

- Write warn message if `ClipDistance` and `CullDistance` are used on unsupported version

---------

Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2023-02-02 13:08:18 +01:00
Connor Fitzgerald
4ea31598a0 Re-sort view formats (#3444) 2023-02-02 09:22:33 +01:00
Elabajaba
7826092d86 Fix dx12 shader validation errors when dxil.dll isn't available in the local scope. (#3434)
* Fix dx12 shader validation errors when dxil.dll isn't available in the local scope.

* changelog

* clippy

* always explicitly validate shaders to simplify code

* destructor ordering
2023-02-01 22:55:54 -05:00
Elabajaba
c5e2f5a7b9 Add SHADERINT_16 feature to allow 16bit ints in Vulkan shaders (#3401)
* add support for vulkan SHADER_INT16

* changelog

* deno shader-i16

* better INT16 docs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

* fix typo

---------

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-02-02 02:00:22 +00:00
AdrianEddy
2562f323bb [Metal] Add a way to create a device and queue from raw resources in wgpu-hal (#3338) 2023-02-01 23:56:48 +00:00
Elabajaba
1e27fd4afb fix clippy for rust 1.67 (#3435)
* clippy --fix

* elide lifetimes

* fmt and more fixes

* disable clippy::needless_borrowed_reference as it clashes with clippy::pattern_type_mismatch

* missed flags for target=wasm32-unknown-unknown
2023-02-01 23:06:03 +01:00
João Capucho
c371e7039d Implement the new checks for readonly stencils (#3443)
wgpu currently checks if the `write_mask` is 0 to determine wether a
stencil is used as readonly or not. However Webgpu contains a more
complex ruleset that also checks the cull mode and face operations to
determine if the stencil is readonly or not.

This commit brings these new rules to wgpu.
2023-02-01 21:13:46 +01:00
SparkyPotato
a5c2cf94b8 update tests 2023-02-01 12:28:31 +01:00
SparkyPotato
dcfd5c6f4a improve invalid assignment diagnostic 2023-02-01 12:28:31 +01:00
SparkyPotato
231af68386 expect semicolons wherever required 2023-02-01 12:28:31 +01:00