Commit Graph
827 Commits
Author SHA1 Message Date
Dzmitry Malyshau be13fe3048 hal/dx12: fix the binding model 2021-07-20 10:07:40 -04:00
Dzmitry Malyshau 35145615bf Update naga, use binding map in DX12 2021-07-18 12:03:14 -04:00
initial-algebra 0db00e9657 Implement Feature::SHADER_PRIMITIVE_INDEX on Vulkan 2021-07-17 15:31:35 -03:00
Dzmitry Malyshau 5419947095 hal/vk: relay semaphore 2021-07-16 17:55:03 -04:00
Dzmitry Malyshau 509b683e6b hal: renderdoc integration 2021-07-14 16:17:39 -04:00
Boris-Chengbiao Zhou 783c85e264 hal: Fix copy-paste error in texture copy dimensions 2021-07-14 19:52:57 +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
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
Dzmitry Malyshau bbb046077e Check for blendable flag in filtering 2021-07-13 13:13:40 -04:00
Dzmitry Malyshau 0df804e9c2 hal/dx12: bunch of validation fixes 2021-07-13 02:54:37 -04:00
Dzmitry Malyshau 0a609e74c0 hal/dx12: compute pipelines, update naga 2021-07-13 01:04:06 -04:00
Dzmitry Malyshau 00859b9e0c Stop using render pass boundary usages for resource transitions 2021-07-13 01:02:42 -04:00
Dzmitry Malyshau 81f31f5555 hal: change blend color argument 2021-07-13 01:01:30 -04:00
Dzmitry Malyshau 35ee65707f hal: make copy to work on one array layer at a time 2021-07-13 01:01:26 -04:00
Dzmitry Malyshau c7519432ee Filter texture usages on view creation 2021-07-13 01:01:21 -04:00
Dzmitry Malyshau c01f6a557e hal/dx12: enable the backend in wgpu-core 2021-07-13 01:01:19 -04:00
bors[bot]andAndreas Reich 5c2e40c6ed Merge #1636
1636: Rename StoreOp::Clear to StoreOp::Discard r=kvark a=Wumpf

(recent change in spec)

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-07-12 16:47:19 +00:00
Andreas Reich f5a4cbc0e1 Rename StoreOp::Load to StoreOp::Discard
(recent change in spec)
2021-07-12 18:06:15 +02:00
bors[bot]andConnor Fitzgerald 4781d9da7b Merge #1607
1607: Fix Downlevel Vertex Stage Storage Buffer Check r=kvark a=cwfitzgerald

**Connections**

Fixes a bug in #1599. Also follows up on #1583 marking all of hello-compute as a failure.

**Testing**

Tests now pass on rpi4.


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-07 14:01:37 +00:00
Connor Fitzgerald 8ded21862e Fix downlevel vertex stage storage buffer check 2021-07-06 21:43:47 -04:00
Benoît du Garreau e7269e72f3 Upgrade arrayvec to 0.7 2021-07-06 00:45:24 +02:00
bors[bot]andConnor Fitzgerald 118cf2cdba Merge #1599
1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald

**Connections**

No longer fixes #1551.

**Description**

This PR has a couple things going on at once.

- Fixes limits for llvmpipe, lavapipe, and rpi4.
- Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL.
- Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits.
- Moved all examples to the new downlevel limits
- Reworks CI to re-enable software testing and unify instructions.

**Testing**

It is

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-04 19:23:23 +00:00
Connor Fitzgerald 130ddcf561 Unify CI and testing 2021-07-04 15:22:51 -04:00
Dzmitry Malyshau b704a0542f Fix memory leak in acquiring encoders 2021-07-03 22:25:59 -04:00
Connor Fitzgerald 26f3c03150 Add downlevel limit for vertex shader access to SSBO 2021-07-03 22:15:16 -04:00
Dzmitry Malyshau d2a4af35af Generation of memory reports for Hubs 2021-07-03 01:51:04 -04:00
bors[bot]andDzmitry Malyshau 7ab950e465 Merge #1592
1592: Detailed limits check and error r=cwfitzgerald a=kvark

**Connections**
Related to #1590

**Description**
The old comparison "A < B" was simply wrong, because it would do every field in order and could bail out mid-way without reaching for all limits.

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-03 01:12:43 +00:00
Dzmitry Malyshau 23b587246a Detailed limits check and error 2021-07-02 20:17:12 -04:00
Clayton Walker 25c452cbdd Add metal layer back in 2021-07-02 15:51:11 -06:00
Dzmitry Malyshau ba8fcb937d Update naga to 0b9af95 2021-07-02 01:58:19 -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 8db6f99a3e Suspect new resources for destruction only after the current submission is tracked 2021-07-01 02:02:16 -04:00
Dzmitry Malyshau f9f19faed6 Rewire the path of destruction for swapchain texture views 2021-07-01 01:39:12 -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 582c128520 Pick up naga's GLSL continuing and Y-flip fixes 2021-06-30 02:29:30 -04:00
Dzmitry Malyshau e4aee90341 hal/gles: object labels, view dimensions, and buffer clears 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau 403ff6faf8 hal/gles: Update glow and fill up the missing methods 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau 952173efde Enable Gles backend, add checks for downlevel flags 2021-06-30 02:29:28 -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 51dd90b1ab hal/gles: render passes 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau d29c450ec3 hal/gles: bind group creation 2021-06-30 02:29:26 -04: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
bors[bot]andAron Granberg 4ca6ab302d Merge #1562
1562: Fix check for QUERY_SET_MAX_QUERIES was using >= instead of > r=cwfitzgerald a=HalfVoxel

Fixes #1560

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-06-27 21:10:32 +00:00
Aron Granberg 6416bc5b68 Fix check for QUERY_SET_MAX_QUERIES was using >= instead of > 2021-06-27 17:08:49 +02:00
bors[bot]andAndreas Reich 8332493d3d Merge #1559
1559: Query support fixes r=kvark a=Wumpf

**Connections**
Fixes #1374 for master
If PR is accepted,I already have a fix for 0.9 which came out as a sideproduct: https://github.com/Wumpf/wgpu/tree/v0.9-fix-buffer-init-on-query-resolve

**Description**
Fixes:
* (affects master, v0.8, v0.9) query resolve operation not marking buffers as initialized
* (affects master) Broken query stride handling for Vulkan
* (affects master) Vulkan not advertising query support

**Testing**
* added new test
* mipmap sample


Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-06-27 14:27:27 +00:00
Andreas Reich b44b5eded9 Fix query stride handling
Fixes #1374
2021-06-27 11:20:38 +02:00
Dzmitry Malyshau 5ca1fe58e9 Update naga to 57b3256020 2021-06-27 01:44:49 -04:00