158 Commits

Author SHA1 Message Date
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
Dzmitry Malyshau f2a18ee57c Update naga to 1907a92 2021-08-12 23:58:19 -04:00
Dzmitry Malyshau dffe1f1793 Return a texture by the surface 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau f78061bcef Merge swap chain into surface 2021-08-11 20:58:42 -04:00
Zicklag 9310f264f1 Update Naga With New Storage Classes API (#1766) 2021-08-05 13:50:51 -04:00
Gordon-F f0b1d5a673 Update winit to 0.25 2021-07-23 14:30:38 +03:00
Zicklag 0614ccea7e Enable All Backends for Trace Player 2021-07-09 20:42:59 -05:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Alex S b4b3dd720c Reorder & reassign flags to group up the binding flags together. 2021-06-28 14:44:08 +03:00
Andreas Reich a745383516 Do multiple queries in pipeline-statistics-query test 2021-06-27 11:20:53 +02:00
Andreas Reich 2525d6ce9d Add player test for pipeline statistics 2021-06-27 08:43:48 +02:00
Dzmitry Malyshau 4c03d286c6 Remove SPIRV entirely from wgpu-core 2021-06-22 12:35:22 -04:00
Dzmitry Malyshau da38b8b077 Make spirv an optional feature 2021-06-21 12:09:12 -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 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
Gordon-F 2873ac32d9 Remove MPL 2.0 header in files 2021-06-19 21:06:08 +03:00
Connor Fitzgerald 74d2becb18 Relicense to MIT/Apache 2021-06-18 13:40:31 -04:00
Dzmitry Malyshau a421c1c8b6 Instance plumbing 2021-06-08 11:46:53 -04:00
Dzmitry Malyshau 569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Andreas Reich 99e691932d add clear buffer/image to wgpu-rs api 2021-06-05 11:49:13 +02: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 19dfcd93ca Make player automatically start/stop the capture 2021-05-18 17:42:49 -04:00
Luca Casonato 751aa714f4 fix: zeroable buffer_get_mapped_range size
According to spec, size can be Some(0).
2021-05-06 22:03:43 -04:00
Dzmitry Malyshau bc4c5c8f03 Change error type for the backend shader 2021-04-21 17:06:58 -04:00
Dzmitry Malyshau de86f2a72f Mark unused implicit BGL ids as vacant 2021-04-19 23:35:33 -04:00