Commit Graph

228 Commits

Author SHA1 Message Date
Dzmitry Malyshau
0a8675d612 hal/linux: Work around Intel+Nvidia presentation conflict 2021-09-08 17:47:12 -04:00
chee
f8a1b78a7e Fix a few comments. 2021-09-01 19:25:36 -04:00
chee
7e202ccbab Fix some comment error. 2021-09-01 19:25:36 -04:00
Dzmitry Malyshau
9da5c1d3a0
Release v0.10 (#1820)
* Release v0.10

* hal/gles: update glow handles logic
2021-08-18 19:06:21 +00:00
Dzmitry Malyshau
f78061bcef Merge swap chain into surface 2021-08-11 20:58:42 -04:00
Connor Fitzgerald
3afab9c5aa
Splits non-uniform indexing into two different features (#1785) 2021-08-10 22:43:08 -04:00
Agorgianitis Loukas
5bc42843cf Add downlevel flag for storage buffers in vertex shaders 2021-08-06 21:22:16 +03:00
Zicklag
88c58d2b20 Improve Docs for DownlevelFlags 2021-07-28 19:00:43 -05:00
Zicklag
fd460fa1e4 Use Bitshift Style for All Bitflag Consts
This makes existing bitflags easier to read and makes it eaiser to add
new flags later.
2021-07-28 11:28:54 -05:00
Dzmitry Malyshau
552a5f138e Rename texture usage names 2021-07-28 00:17:54 -04:00
Dzmitry Malyshau
405cf57955 hal/dx12: compact register allocation, naga update 2021-07-26 02:01:14 -04:00
Dzmitry Malyshau
bb218c1580 Check render bundle encoding for RODS 2021-07-23 11:24:05 -04:00
Connor Fitzgerald
683d03a8e4 Add Rgb9e5Ufloat 2021-07-21 23:54:46 -04:00
Dzmitry Malyshau
1a9a855ea9 Rename InputStepMode to VertexStepMode 2021-07-21 17:48:00 -04:00
Craig
e837a589ad Fix a couple of spelling errors 2021-07-19 11:25:19 -07:00
initial-algebra
0db00e9657 Implement Feature::SHADER_PRIMITIVE_INDEX on Vulkan 2021-07-17 15:31:35 -03:00
Andreas Fischer
6514b22145 Removed metal from platforms that support multi draw indirect 2021-07-15 07:20:21 +02:00
Dzmitry Malyshau
8cd17aafe3 Switch read-only storage textures to be exclusive and behind a feature 2021-07-14 01:04:37 -04:00
bors[bot]
0f784bb3c0
Merge #1602
1602: New DX12 backend (unfinished) r=kvark a=kvark

**Connections**
Continuation of #1471

**Description**
Mostly fresh implementation on DX12 backend for wgpu-hal
Core changes:
  - texture usage is filtered before passing to `create_texture_view`, so that wgpu-hal can assume every bit is important.
  - all the copies involving textures are limited to one array layer at a time
  - remove render pass boundary usages

**Testing**
Examples (not running yet)


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-13 22:26:44 +00:00
Connor Fitzgerald
adcd708cf1 Fix example limits 2021-07-13 14:07:39 -04:00
Dzmitry Malyshau
8163dc7b47 hal/dx12: pipeline creation 2021-07-13 01:04:07 -04:00
Dzmitry Malyshau
27b8085048 hal/dx12: queries 2021-07-13 01:01:29 -04:00
Jim Blandy
454164c1d0 Docs: Fix outdated references to SAMPLED_TEXTURE_BINDING_ARRAY.
This is now simply `Features::TEXTURE_BINDING_ARRAY`.
2021-07-12 12:50:09 -07:00
Jim Blandy
3e6629ceca Document that no dimension of a texture's size may be zero. 2021-07-12 12:50:09 -07:00
Connor Fitzgerald
3deb4f5fb6 Improve documentation of ImageDataLayout 2021-07-12 02:16:38 -04:00
Connor Fitzgerald
8ded21862e Fix downlevel vertex stage storage buffer check 2021-07-06 21:43:47 -04:00
Connor Fitzgerald
130ddcf561 Unify CI and testing 2021-07-04 15:22:51 -04:00
Connor Fitzgerald
26f3c03150 Add downlevel limit for vertex shader access to SSBO 2021-07-03 22:15:16 -04:00
Connor Fitzgerald
53e2c95dc8 Fix wgpu-info display by moving masks to associated functions 2021-07-02 01:15:19 -04:00
Dzmitry Malyshau
ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau
568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Dzmitry Malyshau
6f13eebb7b hal/gles: compressed ETC2 texture support 2021-06-30 12:06:59 -04:00
Dzmitry Malyshau
4be8864b38 hal/gles: totally rework the vertex data binding 2021-06-30 02:31:13 -04:00
Dzmitry Malyshau
91df157462 Refactor downlevel support a bit, implement blending for hal/gles 2021-06-30 02:29:28 -04:00
Dzmitry Malyshau
5083f56149 Add more downlevel flags, implement device opening on Gles 2021-06-30 02:29:26 -04:00
Andreas Reich
9aa251c675 fix conservative rasterization for vulkan 2021-06-28 21:08:06 +02:00
Alex S
b4b3dd720c Reorder & reassign flags to group up the binding flags together. 2021-06-28 14:44:08 +03:00
Alex S
2828100143 Reduce feature flag surface for descriptor arrays.
DYNAMIC_INDEXING is checked by default, since WGPU doesn't allow
for any kind of specialization constants and constant indexing is
nigh useless.

STORAGE_RESOURCE_BINDING_ARRAY is enabled iff the device supports:
- both or neither of uniform and buffer arrays with dynamic indexing;
- both or neither of sampled and storage images with dynamic indexing.

NONUNIFORM_INDEXING is enabled iff for ALL types of descriptor arrays
*that are supported for dynamic indexing*, nonuniform indexing is
also allowed.

These flags have a limitation in that some platforms
(eg.
https://vulkan.gpuinfo.org/displayreport.php?id=11692#features_core_12)
may support a strange subset of those features (example device
supporting non-uniform indexing for textures and storage buffers,
but NOT for storage textures or uniform buffers). In that case feature
will be reported as missing, even though it is partially present.

In the author's opinion, this flag set is convenient for the
users to query; however, due to aforementioned limitations, it would be
desirable to obtain statistics about "edge-case" platforms and what
percentage of reports they comprise.
2021-06-28 14:44:00 +03:00
Connor Fitzgerald
9377149e85 Remove holes from wgpu-info 2021-06-23 21:29:44 -04:00
Connor Fitzgerald
b060bf1afe Assorted touchups 2021-06-23 20:23:19 -04:00
bors[bot]
96dbd06a1f
Merge #1525
1525: Add Naga bypass to allow feeding raw SPIR-V shader data to the backend. r=kvark a=ElectronicRU

**Connections**
Fixes #1520 .

**Description**
While Naga checking is undoubtedly very useful, it currently lags behind
what is possible in SPIR-V and even what is promised by WGPU (ie binding
arrays). This adds an unsafe method to wgpu::Device to allow feeding
raw SPIR-V data into the backend, and adds a feature flag to request a
backend supporting this operation.

**Testing**
`texture_arrays` example is runnable now, which uncovers an additional bug in Vulkan backend - binding arrays are instead treated like sole bindings, and indices shift, too. Lots of errors from validation layer ensue.


Co-authored-by: Alex S <alex0player@gmail.com>
2021-06-20 16:13:53 +00:00
Alex S
7cd7b18560 Code review:
- Remove Cow from wgpu-hal API surface. You graze on in our hearts.
- Rename feature flag to SPIRV_SHADER_PASSTHROUGH in anticipation
  of crate feature `spirv` to reduce confusion.
- Add some more documentation about behaviour and intended avenues of
  use to the feature.
2021-06-20 15:22:04 +03:00
Dzmitry Malyshau
e72bf3e10c Fix wgpu downlevel check 2021-06-20 01:24:44 -04:00
Alex S
8bfa949261 Code review:
- rename ShaderInput variants
- rename feature flag
- hard error on Metal backend trying to compile SPIR-V
- fix test failing because of feature flag bits changing
2021-06-20 06:22:59 +03:00
Alex S
3d6cda100a Fix unfortunate flag duplication. (I wish bitflags would catch that). 2021-06-20 05:05:33 +03:00
Alex S
6d2e6e5a56 Add Naga bypass to allow feeding raw SPIR-V shader data to the backend.
While Naga checking is undoubtedly very useful, it currently lags behind
what is possible in SPIR-V and even what is promised by WGPU (ie binding
arrays). This adds an unsafe method to wgpu::Device to allow feeding
raw SPIR-V data into the backend, and adds a feature flag to request a
backend supporting this operation.
2021-06-19 23:32:44 +03:00
Gordon-F
2873ac32d9 Remove MPL 2.0 header in files 2021-06-19 21:06:08 +03:00
bors[bot]
1d2efb43bc
Merge #1511
1511: Added storage texture array support. r=kvark a=ElectronicRU

**Description**
Arrays of storage images (*f*image*n*D in GLSL parlance) should now be supported.
I also took the liberty to refactor texture format checking a bit,
and tighten up sampled texture support detection for Metal as well.

**Testing**
Not completely sure what's the proper testing approach here, open to suggestions.


Co-authored-by: Alex S <alex0player@gmail.com>
2021-06-18 21:38:54 +00:00
Connor Fitzgerald
74d2becb18 Relicense to MIT/Apache 2021-06-18 13:40:31 -04:00
Alex S
52fab481e6 Added storage texture array support.
I also took the liberty to refactor texture format checking a bit,
and tighten up sampled texture support detection for Metal as well.
2021-06-18 19:20:37 +03:00