Commit Graph

107 Commits

Author SHA1 Message Date
Andreas Reich
dfe686bbc6 Added TextureFormatFeatures::filterable
Can overwrite TextureSampleType::Float.filterable
2021-02-23 23:59:17 +01:00
Dzmitry Malyshau
91f5329b33 Update gfx and naga to gfx-12 2021-02-21 11:25:45 -05:00
Dzmitry Malyshau
8ed543f26a Update all versions 2021-02-01 00:35:40 -05:00
Jonathan Behrens
a97ec9df91 Add SHADER_FLOAT64 feature (#1154)
* Add SHADER_FLOAT64 feature

* Also enable SHADER_FLOAT64 hal feature when creating the device

* Update wgpu-core/src/instance.rs

Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>

* Add warning about 64-bit float performance

* Add (currently unsupported) VERTEX_ATTRIBUTE_64BIT feature

Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>
2021-01-24 21:59:09 -05:00
Connor Fitzgerald
a22037ced0 Add pipeline statistics and timeline queries 2021-01-16 00:48:54 -05:00
Niklas Korz
ac98c0bdfa Move get_swap_chain_preferred_format from device to adapter and check formats
Squashed commit of the following:

commit 16e9c89dbccda3e37d05f7548dc8b9ddfb1d8613
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 19:15:43 2021 +0100

    format

commit 8c69a70ec22427b6a030915e06654bb0fc9b3c69
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 19:12:24 2021 +0100

    Implement Global::adapter_get_swap_chain_preferred_format

commit 63efae1cff508d060eaa6ccafe80c02af6af21f4
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 17:25:42 2021 +0100

    Move get_swap_chain_preferred_format to adapter

commit 1e72a876994820aec9b18f9dac7f1a9ae82d7cee
Author: Niklas Korz <niklas@niklaskorz.de>
Date:   Mon Jan 11 15:49:10 2021 +0100

    Add fallback to device_get_swap_chain_preferred_format
2021-01-11 19:50:32 +01:00
Andreas Reich
78466fbb31 Enable storage read/write format feature 2021-01-10 22:12:09 +01:00
Jonathan Behrens
1e7fa480a1 Make all textures support their guaranteed usages 2021-01-10 10:59:42 -05:00
bors[bot]
8c00cbcc8e Merge #1112
1112: Expose adapter specific formats features via Extension, support for storage read+write r=kvark a=Wumpf

**Connections**
Draft until https://github.com/gfx-rs/gfx/pull/3559 landed (then update and comment two lines in)
New & improved replacement for #1109

PR for wgpu-rs to be opened once there's some confidence that this is that it should look like. [Preview](https://github.com/gfx-rs/wgpu-rs/compare/master...Wumpf:texture-format-feature-query?expand=1)

**Description**
Adapter exposes now per texture format specific features. Feature struct defined as allowed usages + flags. Flags describe only storage texture usage so far.

Query not used for validation unless `TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` feature is enabled on a device. Otherwise uses hardcoded feature set guaranteed by webgpu.
Storage read/write binding can then be used as a consequence (storage atomic has no effect yet).

**Testing**
Manual testing with my fluid sim project through wgpu-rs which covers storage r/w for a few different formats and storage in general for formats that don't support this usage by default at all.
Ran tests and a couple of samples to see if anything broke with the feature disabled.

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-01-06 18:56:30 +00:00
Andreas Reich
30c96bfead Added note on why hal update needed for STORAGE_READ_WRITE is blocked atm 2021-01-06 17:59:53 +01:00
Greg V
072b94c9fd Never prefer CPU devices over GPUs 2021-01-06 19:19:39 +03:00
Andreas Reich
757d12aca3 map depth/stencil feature to RENDER_ATTACHMENT 2020-12-30 12:23:13 +01:00
Andreas Reich
c17b2dc6a0 Expose adapter_get_texture_format_features 2020-12-30 12:00:00 +01:00
Andreas Reich
4207e57c02 validation against adapter specific format features
TextureFormatFeatures is now a struct of two u32 flags. Query happens only at texture creation time
2020-12-30 10:38:55 +01:00
Andreas Reich
0ccad9a466 wip adapter specific format features & rw storage 2020-12-29 17:14:22 +01:00
Imbris
e775987233 Pass DEPTH_CLAMPING feature request to gfx-hal 2020-12-19 16:14:51 -05:00
Dzmitry Malyshau
b95a66da5e Move AdapterInfo into wgt 2020-12-18 16:43:19 -05:00
Vincent Jousse
ab64aa5b92 Fix bad copy/paste in #907 2020-12-18 21:37:17 +01:00
Dzmitry Malyshau
f07cc8156b Update naga and gfx, move the shader validation into a shader descriptor bit 2020-12-17 11:33:47 -05:00
Connor Fitzgerald
8f430ab1ef Implement ETC2 and ASTC textures 2020-12-05 19:30:26 -05:00
Dzmitry Malyshau
c6bc37dbde [error] render bundles 2020-11-23 12:00:47 -05:00
Dzmitry Malyshau
ad824de268 [error] bind groups and layouts creation 2020-11-23 11:57:32 -05:00
Mikko Lehtonen
4498f172cc Retain labels for resources
As a braking api change, adds also label for the error id generation,
for labeling invalid ids too.

Also adds query methods the label.
2020-11-19 00:09:21 +02:00
Dzmitry Malyshau
ac89fbab8a Drop surfaces and adapters 2020-11-13 18:39:14 -05:00
Dzmitry Malyshau
73d3f71caa Enable the non-fill polygon mode feature if requested (#1016)
* Enable the non-fill polygon mode feature if requested

* Update wgpu-core/src/instance.rs

Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>

Co-authored-by: monocodus[bot] <49363530+monocodus[bot]@users.noreply.github.com>
2020-11-06 00:32:04 -05:00
Zicklag
f7f1ff699a Implement OpenGL Backend For Unix Platforms 2020-11-04 20:32:33 -06:00
Zicklag
165d7717b4 Add Error Message When Surface Creation Fails 2020-11-02 20:24:30 -06:00
frbimo
fdd561e69e remove PowerPreference::Default
Signed-off-by: frbimo <fr.bimo@gmail.com>
2020-10-12 19:17:44 +08:00
Dzmitry Malyshau
45ade807cc Only request features that are needed 2020-10-05 14:51:32 -04:00
Dzmitry Malyshau
0a67d6a7be Enable RBA feature where available 2020-10-05 10:21:39 -04:00
Adam Nemecek
db1870e7fc use self 2020-09-25 19:11:46 -07:00
Connor Fitzgerald
a9750f83bc Remove erroneous extra feature check 2020-09-23 18:13:54 -04:00
Manuel Woelker
336d070b26 add polygon_mode: PolyonMode to RasterizationStateDescriptor to allow drawing wireframes 2020-09-09 21:34:37 +02:00
Zicklag
7572dbeaf9 Use CFG Aliases to Replace the backends! Macro
Uses the `cfg_aliases` crate to replace the `backends!` macro and
provide a more natural way to gate backend specific code.
2020-08-29 21:55:17 -05:00
Justin Shrake
19eeee27ee Add AddressMode::ClampToBorder behind a feature 2020-08-22 13:23:50 -07:00
John Mitchell
4cb50e8395 Added image cube array. 2020-08-16 23:10:06 -04:00
Dzmitry Malyshau
44fdfb80d0 Fix support for d24unorm format 2020-08-13 17:26:44 -04:00
Gabriel Majeri
021251a908 Remove power module 2020-08-05 16:27:41 +03:00
Dzmitry Malyshau
dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Connor Fitzgerald
e5c647745e Implement TEXTURE_COMPRESSION_BC extension 2020-07-29 18:43:50 -04:00
Gabriel Majeri
e860dd995f Handle command pool creation error 2020-07-29 09:56:42 +03:00
Connor Fitzgerald
cb485f3798 Convert all logging to tracing and add fmt logger 2020-07-25 19:33:21 -04:00
Dzmitry Malyshau
21be559a9f Add depth clamping support 2020-07-22 11:03:36 -04:00
Gabriel Majeri
1b563c8e3d Safe error handling in instance module (#817)
* Safe error handling in instance module

* Revert alignment checks back to assertions
2020-07-18 18:11:04 -04:00
Connor Fitzgerald
c8bcc50ed6 Implement PUSH_CONSTANTS feature 2020-07-13 12:47:09 -04:00
bors[bot]
d7ee89018b Merge #791
791: Unify `wgpu-core` and `wgpu-rs` types r=kvark a=GabrielMajeri

**Connections**
Closes #689.

**Description**
Moves a lot of types from `wgpu-rs` which were duplicated in `wgpu-core` to `wgpu-types`.

**Testing**
Checked with core, player and `wgpu-rs`.

Corresponding `wgpu-rs` PR: https://github.com/gfx-rs/wgpu-rs/pull/437

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-13 15:45:09 +00:00
Gabriel Majeri
f3b80f1d8d Unify wgpu-core and wgpu-rs types 2020-07-13 18:39:49 +03:00
bors[bot]
08c873969c Merge #790
790: core: make DeviceType repr(u8) r=kvark a=DavidPeicho

**Connections**

This PR will make gfx-rs/wgpu-native#43 mergeable.

**Description**

`DeviceType` wasn't made to be used in FFI. The enum is now set to `#[repr(u8)]`.

**Testing**

It's not tested 💯 


Co-authored-by: David Peicho <david.peicho@gmail.com>
2020-07-13 13:55:35 +00:00
David Peicho
257151b9a4 core: make DeviceType repr(u8) 2020-07-13 10:45:47 +01:00
Gabriel Majeri
9cd3d47ce7 Remove non-exhaustive markers 2020-07-12 19:56:04 +03:00