Commit Graph

3231 Commits

Author SHA1 Message Date
Dzmitry Malyshau
22fff526ab dx12/hal: invalidate root elements on signature change 2021-07-14 23:13:08 -04:00
bors[bot]
93e1eb8091
Merge #1658
1658: Removes nightly from bors r=kvark a=cwfitzgerald

**Connections**

Following up on the trouble #1654 had merging. We actually shouldn't force bors to wait for nightly to work.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-14 20:22:54 +00:00
Connor Fitzgerald
03b2ba1cb3 Removes nightly from bors 2021-07-14 16:21:26 -04:00
Dzmitry Malyshau
d85e8c6011 Clippy fixes 2021-07-14 16:17:39 -04:00
Dzmitry Malyshau
509b683e6b hal: renderdoc integration 2021-07-14 16:17:39 -04:00
bors[bot]
0a81cb08bf
Merge #1657
1657: hal: Fix copy-paste error in texture copy dimensions r=cwfitzgerald a=Bobo1239

**Testing**
My textures aren't cut off past the square anymore ^^
![2021-07-14_19-57-06_grim](https://user-images.githubusercontent.com/2302947/125669952-121b4da9-6f2f-4cf9-b4c3-b2f3bf081114.png)
![2021-07-14_19-50-38_grim](https://user-images.githubusercontent.com/2302947/125670442-351ebde1-e8d3-4be0-accf-5395537fc3b8.png)


Co-authored-by: Boris-Chengbiao Zhou <bobo1239@web.de>
2021-07-14 18:06:51 +00:00
Boris-Chengbiao Zhou
783c85e264 hal: Fix copy-paste error in texture copy dimensions 2021-07-14 19:52:57 +02:00
bors[bot]
2cb2a6ed70
Merge #1655
1655: hal/vulkan: Respect swapchain's minImageCount r=kvark a=Bobo1239

**Description**
Respect `minImageCount` from the `VkSwapchainCreateInfoKHR` struct. Previously wgpu caused Vulkan validation errors like this:
```
[2021-07-14T17:15:18Z ERROR wgpu_hal::vulkan::instance] VALIDATION [VUID-VkSwapchainCreateInfoKHR-minImageCount-01271 (0xe18476f3)]
    	Validation Error: [ VUID-VkSwapchainCreateInfoKHR-minImageCount-01271 ] Object 0: handle = 0x5595501a6190, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0xe18476f3 | vkCreateSwapchainKHR() called with minImageCount = 3, which is outside the bounds returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR() (i.e. minImageCount = 4, maxImageCount = 0). The Vulkan spec states: minImageCount must be greater than or equal to the value returned in the minImageCount member of the VkSurfaceCapabilitiesKHR structure returned by vkGetPhysicalDeviceSurfaceCapabilitiesKHR for the surface (https://github.com/KhronosGroup/Vulkan-Docs/search?q=)VUID-VkSwapchainCreateInfoKHR-minImageCount-01271)
```
(Wayland with AMD RADV POLARIS10 (ACO))

**Testing**
Validation error doesn't get emitted anymore.


Co-authored-by: Boris-Chengbiao Zhou <bobo1239@web.de>
2021-07-14 17:44:44 +00:00
Boris-Chengbiao Zhou
1ecb48db80 hal/vulkan: Respect swapchain's minImageCount 2021-07-14 19:20:17 +02:00
bors[bot]
7e47f3082b
Merge #1652
1652: Switch read-only storage textures to be exclusive and behind a feature r=cwfitzgerald a=kvark

**Connections**
See https://github.com/gpuweb/gpuweb/pull/1864 and https://github.com/gpuweb/gpuweb/pull/1794

**Description**
WebGPU API doesn't have RO storage textures right now. However, since `wgpu` already had a way to expose read-write storage textures, I figured we can just use it to gate read-only storage.

**Testing**
No examples currently exercise this path.


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-14 05:19:58 +00: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]
f11639e8ea
Merge #1651
1651: Fix Vulkan Backend Texture Format Mapping r=cwfitzgerald a=zicklag

Fixes the Bgra8UnormSrgb texture format.

**Connections**
Resolves #1646.

**Description**
Fixes the mappings between the `Bgra8UnormSrgb` and `Bgra8Unorm` texture formats and their Vulkan equivalents.

**Testing**
Tested on my Ubuntu 20.04 machine on:

- Intel(R) UHD Graphics (CML GT2) (Vulkan)
- GeForce GTX 1650 (Vulkan)


Co-authored-by: Zicklag <zicklag@katharostech.com>
2021-07-14 01:39:40 +00:00
Zicklag
2896a6e5f3 Fix Vulkan Backend Texture Format Mapping
Fixes the Bgra8UnormSrgb texture format.

Resolves #1646.
2021-07-13 20:21:47 -05: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
bors[bot]
2e02eefad9
Merge #1647
1647: Check for blendable flag in filtering r=cwfitzgerald a=kvark

**Connections**
Discussion on the matrix.

**Description**
The validation is written in a way that considers "filterable" to be responsible for both linear sampling and rendering.
But we didn't take blending into account when determining this filtering flag.

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-13 20:10:45 +00:00
bors[bot]
d136e0579c
Merge #1645
1645: Disable Intel Fastclear in GL Backend r=kvark a=zicklag

This works around a Mesa bug on Intel cards:

- https://gitlab.freedesktop.org/mesa/mesa/-/issues/2565
- https://github.com/gfx-rs/wgpu/issues/1627#issuecomment-877854185

**Connections**
Related to pixelated edges in GL backend brought up in #1627.

**Description**
This just adds the `INTEL_DEBUG=nofc` environment variable setting when creating an `Instance` using the GL backend in `wgpu_hal`. This is just a workaround until the mesa bug is fixed.

I wanted to wait until adapters were enumerated to determine that the user wanted to use an Intel Mesa adapter, but the environment variable has to be set before the x11 display was opened so that wasn't an option.

This may not be the strategy we want to take with this one, but it seems relatively harmless. Because the environment variable prefixed with `INTEL` anyway, it might not effect devices other than the ones we want to, which would be good.

**Testing**
I tested this on Ubuntu 20.04 with Mesa Intel(R) UHD Graphics (CML GT2) on using the GL backend.


Co-authored-by: Zicklag <zicklag@katharostech.com>
2021-07-13 19:56:16 +00:00
bors[bot]
049d94fccb
Merge #1644
1644: Fix Example Resolution Limits r=kvark a=cwfitzgerald

**Connections**

Closes #1616.

**Description**

This change automatically expands resolution to the adapter's limits so examples always work.

**Testing**

Ran locally, but couldn't make it bigger than the screen



Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-13 18:10:11 +00:00
Connor Fitzgerald
adcd708cf1 Fix example limits 2021-07-13 14:07:39 -04:00
Dzmitry Malyshau
bbb046077e Check for blendable flag in filtering 2021-07-13 13:13:40 -04:00
Zicklag
f0c7e990f7 Disable Intel Fastclear in GL Backend
This works around a Mesa bug on Intel cards:

- https://gitlab.freedesktop.org/mesa/mesa/-/issues/2565
- https://github.com/gfx-rs/wgpu/issues/1627#issuecomment-877854185
2021-07-13 11:21:06 -05:00
Aron Granberg
c434b94ca2
Implicitly add COPY_DST when using create_texture_with_data (#1622)
* Implicitly add `COPY_DST` when using `create_texture_with_data`

* Always clone texture descriptor
2021-07-13 10:26:24 -04:00
Dzmitry Malyshau
0df804e9c2 hal/dx12: bunch of validation fixes 2021-07-13 02:54:37 -04:00
Dzmitry Malyshau
7fb0315700 hal/dx12: build fixes for the new arrayvec 2021-07-13 01:11:47 -04:00
bors[bot]
226694c1d7
Merge #1643
1643: Check docs in CI r=kvark a=cwfitzgerald

**Connections**

Closes #1637.

**Description**

Doc links will now fail. `cargo doc` doesn't let you pass through flags, so you have to use RUSTDOCFLAGS.

**Testing**

It is.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-13 05:07:54 +00:00
Dzmitry Malyshau
450e5dc08b hal/dx12: queue operations 2021-07-13 01:04:08 -04:00
Dzmitry Malyshau
8163dc7b47 hal/dx12: pipeline creation 2021-07-13 01:04:07 -04:00
Dzmitry Malyshau
0a609e74c0 hal/dx12: compute pipelines, update naga 2021-07-13 01:04:06 -04:00
Dzmitry Malyshau
040a602b69 hal/dx12: bind group creation 2021-07-13 01:03:45 -04:00
Dzmitry Malyshau
7d29a3b70e hal/dx12: binding resources and index/vertex buffers 2021-07-13 01:03:44 -04:00
Dzmitry Malyshau
c0432761d9 hal/dx12: use range-alloc for descriptor heaps 2021-07-13 01:03:15 -04:00
Dzmitry Malyshau
ba1bff58ed hal/dx12: attachment clears and resolvess 2021-07-13 01:03:14 -04:00
Dzmitry Malyshau
00859b9e0c Stop using render pass boundary usages for resource transitions 2021-07-13 01:02:42 -04:00
Dzmitry Malyshau
12bc3eb3fc hal/dx12: set render targets 2021-07-13 01:01:31 -04:00
Dzmitry Malyshau
81f31f5555 hal: change blend color argument 2021-07-13 01:01:30 -04:00
Dzmitry Malyshau
1f91c5f297 hal/dx12: debug markers 2021-07-13 01:01:30 -04:00
Dzmitry Malyshau
27b8085048 hal/dx12: queries 2021-07-13 01:01:29 -04:00
Dzmitry Malyshau
b818157f67 hal/dx12: draws and dispatches 2021-07-13 01:01:28 -04:00
Dzmitry Malyshau
9069c2301f hal/dx12: implement fill_buffer with zero 2021-07-13 01:01:28 -04:00
Dzmitry Malyshau
2c76b0e656 hal/dx12: clippy fixes, buffer-texture copies 2021-07-13 01:01:27 -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
f79c3781c3 hal/dx12: buffer-buffer and texture-texture copies 2021-07-13 01:01:25 -04:00
Dzmitry Malyshau
4f6812fc36 hal/dx12: resource barriers 2021-07-13 01:01:25 -04:00
Dzmitry Malyshau
43a39a229e hal/dx12: command pooling 2021-07-13 01:01:24 -04:00
Dzmitry Malyshau
e128021aee hal/dx12: pipeline layout 2021-07-13 01:01:23 -04:00
Dzmitry Malyshau
904621ee19 hal/dx12: sampler and query set creation 2021-07-13 01:01:23 -04:00
Dzmitry Malyshau
04ca3212de hal/dx12: intercept debug output 2021-07-13 01:01:22 -04:00
Dzmitry Malyshau
855689462c hal/dx12: fences 2021-07-13 01:01:21 -04:00
Dzmitry Malyshau
c7519432ee Filter texture usages on view creation 2021-07-13 01:01:21 -04:00
Dzmitry Malyshau
925ece8b40 hal/dx12: creation of RTV/DSV/UAV 2021-07-13 01:01:20 -04:00
Dzmitry Malyshau
23615aa55d hal/dx12: texture and view creation 2021-07-13 01:01:19 -04:00