Commit Graph
622 Commits
Author SHA1 Message Date
Dzmitry Malyshau 9f904700ee hal/mtl: creation of bind groups 2021-06-09 17:06:43 -04:00
Dzmitry Malyshau 3475d839f9 hal/metal: instance,adapter, and surface 2021-06-09 00:55:49 -04:00
Dzmitry Malyshau 0a82c232ba hal: port the rest of wgpu-core 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau c61ee1262b hal: transfer operations 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau beb88b0a88 Skip the cube compatibility on a downlevel flag 2021-06-01 08:29:44 -04:00
Wumpf f62d0d5edc Native Extension: Expose fill buffer & clear image (#1335)
* Add command buffer fill buffer method

* Added test for buffer fill

* Added image clear + test

* image/buffer clear methods are now pure clear to zero

* fix cargo clippy & int type issues

* clear buffer alignment is now given by COPY_BUFFER_ALIGNMENT

* joined buffer/image clear player tests

* ImageSubresourceRange is now used in TextureViewDescriptor
2021-05-30 11:03:33 -04:00
Dzmitry Malyshau e24e8f643c Fix dynamic stencil reference for Replace ops 2021-05-17 18:42:42 -04:00
bors[bot]andDzmitry Malyshau 13f2ca571c Merge #1391
1391: Simplify features r=cwfitzgerald a=kvark

**Connections**
Fixes #1390
Makes vertex writable storage optional (native-only for now)
Fixes the follow-up to #891 

**Description**
Refactors the code so that adding new features and maintaining current ones is much easier.
Refactors the way missing features are checked and reported, DRY way.

**Testing**
Not really tested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-05-17 19:03:59 +00:00
Dzmitry Malyshau f0a145d0fa Add VERTEX_WRITABLE_STORAGE feature, refactor the sample border 2021-05-17 14:09:02 -04:00
Conner Bryan eda7031f35 fix typo in PowerPreference::LowPower description 2021-05-11 19:10:06 -04:00
Dzmitry Malyshau e5ddb94be0 Version bump to 0.8 2021-04-29 11:57:22 -04:00
Chandler Newman 904ec7a5ee Add uniform and storage buffer arrays 2021-04-29 00:38:04 -04:00
Dzmitry Malyshau c744582052 Update blending API names 2021-04-15 11:25:04 -04:00
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]andJoshua Groves 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]andAndreas Reich 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 Behrensandmonocodus[bot] 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