Commit Graph

158 Commits

Author SHA1 Message Date
adamnemecek
687bc81fac derive copy for DeviceType, BlendComponent, BlendState, PrimitiveState, MultisampleState, DepthBiasState, StencilFaceState, VertexAttribute, ImageDataLayout, BindGroupLayoutEntry, DrawIndirectArgs, DrawIndexedIndirectArgs, DispatchIndirectArgs 2021-04-14 12:09:35 -07:00
Aaron Housh
c820cc8e73 Add Map Alignment type (#1322)
* Add Map Alignment type

* Fix clippy warnings

* Make buffer_map_async compare range start to MAP_ALIGNMENT
2021-04-12 13:28:46 -04:00
Dzmitry Malyshau
4d324bc38d Move depth clamping to primitive state 2021-04-05 16:01:23 -04:00
adamnemecek
d91ad13482 framecapture 2021-04-01 12:51:50 -07:00
Connor Fitzgerald
3073a454ff Update to flag-based downlevel bools 2021-04-01 11:48:09 -04:00
Connor Fitzgerald
4db9a4522e Add downlevel infrastructure 2021-03-31 01:08:48 -04:00
Connor Fitzgerald
0616a08c65 Add color blend modes 2021-03-30 13:37:43 -04:00
bors[bot]
fb0288a377 Merge #1279
1279: Fix some typos r=kvark a=grovesNL

**Description**
Fix a few small typos in doc comments

**Testing**
None

Co-authored-by: Joshua Groves <josh@joshgroves.com>
2021-03-23 06:44:11 +00:00
Joshua Groves
306eaf3969 Fix some typos 2021-03-23 01:01:32 -02:30
Joshua Groves
9058f3ba62 Rename copy views and layout to match spec 2021-03-23 00:48:42 -02:30
Andreas Reich
50043875e5 rows_per_image & rows_per_image are now optional
Fixes #988
2021-03-20 12:33:28 +01:00
Wumpf
717c2d73e7 Add CONSERVATIVE_RASTERIZATION native feature (#1263)
* Add CONSERVATIVE_RASTERIZATION native feature

* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43

* error for polygon mode not fill +conservative raster
2021-03-14 20:43:02 -04:00
Dzmitry Malyshau
231bba03a1 Lint all the things 2021-03-12 12:39:04 -05:00
Dzmitry Malyshau
11af3d1286 Add license to the memory init tracker 2021-03-04 10:42:18 -05:00
Dzmitry Malyshau
62ca24580d Add limits for textures sizes and vertex imputs 2021-03-01 12:10:40 -05:00
Dzmitry Malyshau
103e7763a3 Rename depth to depth_or_array_layers 2021-03-01 11:08:17 -05:00
Dzmitry Malyshau
cf165f9a3e Update VertexFormat variants 2021-02-25 15:25:56 -05:00
Jökull Máni Reynisson
ce4668a7ac const in ShaderStage that represents vertex and fragment access (#1229)
* const in ShaderStage that represents vertex and fragment access

We can store `ShaderStage`s as const values or members of const structs in all individual cases, but for example `ShaderStage::VERTEX | ShaderStage::FRAGMENT` cannot be stored in a const. This is not very elegant, but would be convenient.

* Correct VERTEX_FRAGMENT definition

VERTEX_FRAGMENT definition now follows directly from the bit representation of `ShaderStage::VERTEX` and `Shaderstage::FRAGMENT` such that it does not need to be independently maintained.
2021-02-24 16:37:05 -05:00
bors[bot]
f430adb828 Merge #1231
1231: Added TextureFormatFeatures::filterable which may overwrite TextureSampleType::Float.filterable r=kvark a=Wumpf

**Description**
The expectation is that with `wgt::Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES` enabled, any texture format which is sampled as float may be (linearly) filtered if so supported by the adapter, not only those that the webgpu specification denotes as filterable.

This arguably causes a bit of a mess in the way we distinguish `sample_type` and `(guaranteed_)format_features`: The float sample type (via spec) essentially integrates a feature, namely if it is filterable or not. Unlike the actual format _type_ which is just a property of the format, this property may or may not be available depending on the device.
So the type of `sample_type` stays statically defined whereas the Float.filterable property suddenly becomes overwritten by a format_feature which may or may not be present. Couldn't come up with a cleaner solution so far.

**Testing**
Tested in project (blub) depending on R32F filtering - passing now what was previously causing
```
wgpu error: Validation Error

Caused by:
    In Device::create_bind_group
      note: label = `BindGroup: Narrow Range filter 1`
    texture binding 1 expects sample type = Float { filterable: true }, but given a view with format = R32Float
```
(Blub still can't run on latest wgpu because of other reported issues)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-24 01:20:12 +00:00
Andreas Reich
dfe686bbc6 Added TextureFormatFeatures::filterable
Can overwrite TextureSampleType::Float.filterable
2021-02-23 23:59:17 +01:00
Dzmitry Malyshau
c506c76e45 Derive more things for primitive and multisampling states 2021-02-22 01:10:26 -05:00
Dzmitry Malyshau
ff31911760 Update the blend API to upstream 2021-02-19 12:07:47 -05:00
Jakob Hellermann
b89cb21ce3 fix rustdoc warnings 2021-02-12 13:56:51 +01:00
Zsolt Bölöny
47a45bcaad Convert PrimitiveState::cull_mode to Option<Face> 2021-02-10 11:59:38 +01:00
Dzmitry Malyshau
d0dcb105f5 Don't check the index format for non-indexed calls 2021-02-06 10:58:46 -05:00
Daniel Tang
07a2c9a712 Improve docs language 2021-02-01 02:19:32 -05:00
Dzmitry Malyshau
8ed543f26a Update all versions 2021-02-01 00:35:40 -05:00
Andreas Reich
6b51328b2e Add public structs for indirect command buffers
and fix missing IndirectBufferOverrun error for IndirectDispatch
2021-01-31 21:32:33 +01:00
Dzmitry Malyshau
4099c2ca8e Fix depth bias documentation 2021-01-29 00:25:54 -05:00
Dzmitry Malyshau
14eb99da87 Add DepthBiasState, rename StencilStateFace 2021-01-29 00:07:46 -05:00
Dzmitry Malyshau
cef0a30aa2 Add 0.7 changelog 2021-01-28 01:21:20 -05:00
Dzmitry Malyshau
0346b43982 Update the render pipeline API 2021-01-27 15:09:13 -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
Andreas Reich
e29d17a13f wgpu format features are again part of TextureFormatInfo
+ some cleanup/fix indentations
2021-01-05 23:54:50 +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
Joshua Groves
45b5ddcb83 Use repr(transparent) for shader flags
This allows cbindgen to generate bindings for shader flags in
wgpu-native
2020-12-23 06:43:15 -03:30
Connor Fitzgerald
43814d258f Add format usage descriptions and validate on it. 2020-12-21 23:08:31 -05:00
Dzmitry Malyshau
b95a66da5e Move AdapterInfo into wgt 2020-12-18 16:43:19 -05: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
kejor
4513fb2b83 Match upstream API changes for IndexFormat 2020-12-01 19:19:41 -05:00
Dzmitry Malyshau
5949dec61d Update bind group layout API to match upstream 2020-11-28 00:30:27 -05:00
Imbris
44a20d72ef Make VertexFormat::size a const fn 2020-11-26 03:36:13 -05:00
Dzmitry Malyshau
ad824de268 [error] bind groups and layouts creation 2020-11-23 11:57:32 -05:00
Zsolt Bölöny
2151a252ad Rename TextureUsage::OUTPUT_ATTACHMENT to RENDER_ATTACHMENT 2020-11-08 14:24:39 +01:00
Dzmitry Malyshau
367735d085 Rename the lint to broken_intra_doc_links 2020-11-02 18:00:56 -05:00
Dzmitry Malyshau
6e3c7b359f Add missing license headers 2020-10-28 13:40:41 -04:00
Connor Fitzgerald
dcc14fe645 Improve cubemap validation 2020-10-25 17:14:14 -04:00