Commit Graph

79 Commits

Author SHA1 Message Date
Dzmitry Malyshau
e867a7434c Let GLES/Angle path compile on macOS 2021-12-05 17:09:36 -05:00
Dzmitry Malyshau
ab28009d80 Angle support on Windows
Also remove the macros module in favor of generic functions.
2021-12-05 17:09:36 -05:00
Dzmitry Malyshau
65a805ab3d hal: exclude COPY_DST from ordered sync usages 2021-12-02 12:33:26 -05:00
Layl
2ef72b9313
Add multiview support (#2187)
Co-authored-by: Layl Bongers <2385329-layl@users.noreply.gitlab.com>
2021-11-19 10:56:48 -05:00
Dzmitry Malyshau
2755cd08eb
Add clippy non_send_fields_in_send_ty (#2156) 2021-11-05 08:57:09 -04:00
Dzmitry Malyshau
ca7ca749cd
Update naga to 323999f, report pretty errors in shader validation (#2141) 2021-11-01 16:57:33 -04:00
Riccardo Zaglia
d46c39af1d FIx raw Vulkan API 2021-10-22 21:53:20 -04:00
Wumpf
a28c52873f
Move clear_texture impl from wgpu-hal to wgpu-core (#2046)
* new test for clearing textures of all formats

* clear_texture is now always implemented in wgpu-core instead of wgpu-hal

* add 1D/array/volume texture to clear_texture test

* set mip_level_count to 1 for D1 textures in clear_texture test

* fix warning & clippy lints

* Fix web build

* [pr feedback] fix potentially skipped resource transition, fix wrong mip size for texture clear

* collect_zero_buffer_copies_for_clear_texture aligns rows now properly
2021-10-13 13:42:13 -04:00
Zicklag
312828f12f
Implement WebGL2 Backend (#1686)
* Implement WebGL Backend

* Add WebGL Fixes by @mrk-its

* Update Limits for WASM and Examples

* Address Review Points
2021-10-07 16:18:09 -04:00
Dzmitry Malyshau
97d6db4d18 Allow if/panic in wgpu-hal 2021-10-01 16:22:51 -04:00
Connor Fitzgerald
b679342d9e Support descriptor arrays shorter than binding length 2021-09-30 14:11:51 -04:00
João Capucho
9bc5908492
Add method to create shader modules without runtime checks (#1978)
* Add method to create shader modules without runtime checks

* Use opaque struct to represent shader bound checks
2021-09-27 19:51:44 +00:00
Luke Street
76bcd9c494
Implement min_{uniform,storage}_buffer_offset_alignment limits (#1923)
* Implement min_{uniform,storage}_buffer_offset_alignment limits

* Add Limits::using_alignment

* Update docs & examples

* Create binding_model::buffer_binding_type_alignment fn
2021-09-08 13:53:02 -04:00
Dzmitry Malyshau
076031c1ba
hal: switch texture copies to expect physical sizes (#1908) 2021-09-07 13:13:11 +00:00
Wumpf
df2a686c29
Reintroduce clear_texture Metal/Vulkan/DX12 (#1905)
* enable CLEAR_COMMANDS feature for all adapters

* replaced fill_buffer with clear_buffer (minus variable value)

* Improve clear buffer/texture test
and remove unused clear-buffer.ron test

* renamed clear_image to clear_texture

* skeleton for new wgpu-hal clear_texture

* clear_texture implementation for vulkan

* clear_texture now restricts usage

* clear_texture implementation for dx12

* Implemented clear_texture for Metal backend

* Clean up GLES clear_buffer and leave note on how to implement clear_texture in the future

* fix linux compilation & formatting issues

* comment & namespace fixes

* Extent3d has now a simple mipmap calculating function

Fix incorrect use of texture.size in clear_texture for metal/dx12
Fix incorrect mip/layer ranges in clear_texture for metal/dx12
2021-09-06 21:14:40 -04:00
Connor Fitzgerald
938c069608
Properly implement timestamp periods (#1907) 2021-09-04 22:24:15 -04:00
Dzmitry Malyshau
663f64c571 Fix read-write buffer barrier 2021-09-02 16:39:55 -04:00
Dzmitry Malyshau
9b85882ff8 [dx12] implement num_workgroups 2021-08-18 00:14:44 -04: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
69f808c54a hal/dx12: support base vertex/instance 2021-07-27 08:59:41 -04:00
Dzmitry Malyshau
1a9a855ea9 Rename InputStepMode to VertexStepMode 2021-07-21 17:48:00 -04: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
Dzmitry Malyshau
8cd17aafe3 Switch read-only storage textures to be exclusive and behind a feature 2021-07-14 01:04:37 -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
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
c01f6a557e hal/dx12: enable the backend in wgpu-core 2021-07-13 01:01:19 -04:00
Dzmitry Malyshau
3a2bbfd563 hal/dx12: adapter initialization 2021-07-13 01:01:16 -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
e4aee90341 hal/gles: object labels, view dimensions, and buffer clears 2021-06-30 02:29:29 -04:00
Dzmitry Malyshau
8fd6b36e6c hal/egl: add coherence preference, hook up EGL_KHR_debug message callbacks 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
d3d2ed5a9e hal/gles: pipeline creation 2021-06-30 02:29:27 -04:00
Dzmitry Malyshau
d29c450ec3 hal/gles: bind group creation 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau
5083f56149 Add more downlevel flags, implement device opening on Gles 2021-06-30 02:29:26 -04:00
Dzmitry Malyshau
d88bc440e6 hal/gles: describe format, adapter info 2021-06-30 02:29:25 -04:00
Dzmitry Malyshau
41bc9d0625 hal/gl: start the backend, port the Instance 2021-06-30 02:29:25 -04:00
Andreas Reich
b44b5eded9 Fix query stride handling
Fixes #1374
2021-06-27 11:20:38 +02: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
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
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
Alex S
1dea443340 Better compile error for not using resolver=2. 2021-06-19 17:36:50 +03:00
Dzmitry Malyshau
220f359535 Address review notes 2021-06-17 14:18:30 -04:00