Commit graph

459 commits

Author SHA1 Message Date
Dzmitry Malyshau 871cc90b09 Support more than one frame in flight 2020-09-08 01:06:45 -04:00
Dzmitry Malyshau cbaf5ba24e Switch CI to github actions 2020-08-25 23:09:09 -04:00
Dzmitry Malyshau 8dcbf11d89 gfx update with metal MSAA clear fix 2020-08-24 01:12:43 -04:00
Dzmitry Malyshau bbd2e78d26 Support recording swapchain commands from multiple threads 2020-08-23 10:50:38 -04:00
Dzmitry Malyshau d4fbf6c0a8 Update gfx with the metal clear_image fix 2020-08-23 00:19:05 -04:00
Dzmitry Malyshau 1c8ba98fd1 Update gfx with the border color changes 2020-08-23 00:19:05 -04:00
Dzmitry Malyshau 47bbd375b3 Fix the difference in clear attachment data with gfx 2020-08-22 01:41:42 -04:00
Dzmitry Malyshau 7034f366b3 Add basic support for VK_KHR_portability_subset 2020-08-22 01:41:42 -04:00
Dzmitry Malyshau bb40160a6a Convert the rest of functions to unsafe 2020-08-22 01:41:42 -04:00
Dzmitry Malyshau 8ccdddda2e Update to latest gfx, mark some of the methods unsafe 2020-08-22 01:41:42 -04:00
Dzmitry Malyshau 3c68e62cdf Update gfx dependencies 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau 7962ce0d8b Support VK_KHR_get_surface_capabilities2 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau 1b19af0f5d Port all the limits 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau d6a92224ab Fake fence semantics 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau 13773ea162 Fix push constant ranges 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau bef4517f83 Port to the new swapchain model 2020-08-05 13:08:29 -04:00
Dzmitry Malyshau 0a7426f847
Merge pull request #215 from gfx-rs/kvark-staticlib
Add staticlib target for libportability
2020-06-04 12:02:28 -04:00
Dzmitry Malyshau 7e80b10bfa
Add staticlib target for libportability 2020-06-04 11:27:17 -04:00
bors[bot] 8be1de3d3d
Merge #209
209: Update to gfx-hal-0.5 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-27 04:39:03 +00:00
Dzmitry Malyshau a66a3baeb8 Update to gfx-hal-0.5 2020-03-27 00:38:01 -04:00
bors[bot] 72d8338290
Merge #205
205: Update to 2018 edition r=kvark a=krolli

This PR implements #179. Most of the work was done by `cargo fix --edition`.

Co-authored-by: Martin Krošlák <kroslakma@gmail.com>
2020-01-26 21:38:29 +00:00
Martin Krošlák 46776f5bcf Update to 2018 edition 2020-01-25 09:03:23 +01:00
bors[bot] 4958223f8e
Merge #204
204: Fix rustc warnings r=kvark a=krolli

This PR fixes warnings encountered with stable 1.40.0 rust toolchain. The most interesting issue is likely switch from `mem::zeroed()` and related functions to `MaybeUninit`.

While `mem::zeroed()` is not marked deprecated in the same way as `mem::uninitialized()` is, compiler still threw warning on it. However, in this case it may have been causing undefined behavior, as `EntryPoint` contains references which may not be null. Another option here would be using `Option` instead of `MaybeUninit`, which would be completely safe with some extra checks. Since original code didn't, and because valid Vulkan use requires exactly one vertex shader, I chose to use `MaybeUninit` instead.

Co-authored-by: Martin Krošlák <kroslakma@gmail.com>
2020-01-23 13:07:35 +00:00
Martin Krošlák 6ad83bed4c Fix rustc warnings 2020-01-23 06:36:10 +01:00
bors[bot] 988fb7547c
Merge #203
203: Update gfx-hal r=kvark a=krolli

Update of portability to use the most recent version gfx-hal. Also cleaned up formatting with rustfmt to reduce noise in commit with actual update of gfx-hal.

Co-authored-by: Martin Krošlák <kroslakma@gmail.com>
2020-01-22 20:24:38 +00:00
Martin Krošlák 7c28bd34ef Update gfx-hal 2020-01-20 20:45:07 +01:00
Martin Krošlák 9f5d97a43c Format code using rustfmt 2020-01-20 20:38:55 +01:00
bors[bot] a9edbc0337
Merge #202
202: Added vkGetPhysicalDeviceWin32PresentationSupportKHR r=kvark a=SaschaWillems

This PR adds vkGetPhysicalDeviceWin32PresentationSupportKHR, which will allow applications that query this work with gfx-portability. One such application is my Vulkan Hardware Capability Viewer.

Adding this function will also silences a Vulkan loader debug message that is shown for ICDs not implementing vkGetPhysicalDeviceWin32PresentationSupportKHR.

The implementation will always just return true.

Co-authored-by: Sascha Willems <webmaster@saschawillems.de>
2019-10-24 20:48:59 +00:00
Sascha Willems 421443fa05 Added vkGetPhysicalDeviceWin32PresentationSupportKHR 2019-10-23 20:56:59 +02:00
bors[bot] eac7f6b477
Merge #201
201: fixes crash when enumerating on some systems r=kvark a=Hugobros3

Was crashing when calling `vulkaninfo`. I did some digging:

In gfxEnumeratePhysicalDevices, there is some logic for dealing with the cases where the slots allocated by the caller aren't enough to fit all the adapters the implementation has available. This logic has a flaw though, because it doesn't account for the cases where `num_output` is greater than the numbers of adapters gfx has to offer, and in that case the output is oversized wrt to the adapters we have to fit inside.

This matches both sides for calling copy_from_slice in that function. Not sure why this happens, I have a proper vulkan-ready device in this computer with a "proper" driver too, which may or may not explain it ? I'm not knowledgeable enough on how the loader and everything works to make a definitive statement. 

This made things work on my pc so ¯\\_(ツ)_/¯

Co-authored-by: Gobrosse <hugo@xol.io>
2019-10-11 14:47:36 +00:00
Gobrosse 50a59c91de fixes crash when enumerating on some systems
matches both sides for calling copy_from_slice in
gfxEnumeratePhysicalDevices()
2019-10-11 12:34:37 +02:00
bors[bot] 9926fe0729
Merge #200
200: Update gfx-hal r=kvark a=aleksijuvani



Co-authored-by: Aleksi Juvani <aleksi@aleksijuvani.com>
2019-09-13 14:32:01 +00:00
Aleksi Juvani 7bccd08688 Update gfx-hal 2019-09-13 17:16:03 +03:00
bors[bot] 0142549521
Merge #199
199: Add missing limits r=kvark a=aleksijuvani



Co-authored-by: Aleksi Juvani <aleksi@aleksijuvani.com>
2019-09-09 14:30:53 +00:00
Aleksi Juvani e1ba0b2d52 Add missing limits 2019-09-09 16:14:16 +03:00
bors[bot] 2cdb4c21bb Merge #198
198: gfx-hal update with swapchain ranges r=msiglreith a=kvark

Also added a small batch file with commands I used to run the CTS. Having them in Makefile is unfortunately not very helpful on Windows.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2019-08-04 21:08:33 +00:00
Dzmitry Malyshau 96f89d9bb1 gfx-hal update with swapchain ranges 2019-08-02 22:23:34 -04:00
bors[bot] 869ea61d58 Merge #196
196: gfx-hal updated, non-normalized coordinates r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-07-19 19:48:44 +00:00
Dzmitry Malyshau 418dbd6647 gfx-hal updated, non-normalized coordinates 2019-07-19 15:47:36 -04:00
bors[bot] 1c822e9d50 Merge #195
195: gfx-hal update, gfxGetPhysicalDeviceProperties2KHR implementation r=msiglreith a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-07-03 22:06:14 +00:00
Dzmitry Malyshau 8f7cf7f4d8 gfx-hal update, gfxGetPhysicalDeviceProperties2KHR implementation 2019-07-03 16:46:31 -04:00
bors[bot] dbfd263506 Merge #189
189: Events hookup r=msiglreith a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2019-06-26 20:29:53 +00:00
Dzmitry Malyshau 9883b4ccc1 Enable x11 and xcb vulkan features 2019-06-26 16:29:10 -04:00
Dzmitry Malyshau 03af213184 Events hookup 2019-06-26 14:11:57 -04:00
bors[bot] 152ec622a9 Merge #188
188: Fixed some limits that were giving invalid validation layer responses r=kvark a=Thomspoon

Added missing limits for some validation layers.

Dependent on: https://github.com/gfx-rs/gfx/pull/2814/

Also cleaned up a compiler error and random warning from the previous commit.

Co-authored-by: Shawn Thompson <saturisk@gmail.com>
2019-06-26 17:53:22 +00:00
Shawn Thompson 25c65b23a7 Fixed some limits that were giving invalid validation layer responses 2019-06-09 10:59:10 -06:00
bors[bot] 4c0faf6c95 Merge #187
187: Add transfer bit to all queue families r=kvark a=aloucks

Per the `gfx_hal::queue::QueueType` [docs](https://docs.rs/gfx-hal/0.2.0/gfx_hal/queue/enum.QueueType.html), all variants should include transfer operations. Notably, `General` now contains all three queue types.

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2019-06-01 14:10:39 +00:00
Aaron Loucks 77f56d8a89 Add transfer bit to all queue families
Per the gfx_hal::queue::QueueType docs, all variants should include
transfer operations. Notably, `General` now contains all three
queue types.
2019-06-01 02:57:22 +00:00
bors[bot] 5796b6b158 Merge #185
185: Fixes for gfx HEAD, update Cargo.lock, and add gl backend option r=kvark a=aloucks

Updated Cargo.lock and some minor changes to get portability compiling again using the latest gfx master. 

With these changes I was able to get `vulkaninfo` to run on a GPU-less VM using Mesa. 

```
$ RUST_BACKTRACE=1 VK_ICD_FILENAMES=portability-linux-debug.json vulkaninfo > ~/vulkaninfo.txt

==========
VULKANINFO
==========

Vulkan Instance Version: 1.1.106



Instance Extensions:
====================
Instance Extensions	count = 4
	VK_EXT_debug_report                 : extension revision  9
	VK_EXT_debug_utils                  : extension revision  1
	VK_KHR_get_physical_device_properties2: extension revision  1
	VK_KHR_surface                      : extension revision 25
Layers: count = 15
=======

...

Device Properties and Extensions :
==================================
GPU0
VkPhysicalDeviceProperties:
===========================
	apiVersion     = 0x400042  (1.0.66)
	driverVersion  = 1 (0x1)
	vendorID       = 0x0000
	deviceID       = 0x0000
	deviceType     = CPU
	deviceName     = Mesa OffScreen

...
```

Full output:

https://gist.github.com/aloucks/1a9acfb51adba4bb598ee6de0a213d82

It's probably a long way from being usable, but it would be nice to use portability for unit testing in CI jobs. 

See also: https://github.com/gfx-rs/gfx/pull/2791 for updates to the gl backend. 

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2019-06-01 01:04:26 +00:00
Aaron Loucks ac3950be2e Fixes for gfx HEAD, update Cargo.lock, and add gl backend option 2019-06-01 00:16:51 +00:00