264: update README.md r=kvark a=Napokue
Changes:
- Add supported platforms table
- Remove example docs here, and referencing the user to the wiki
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
261: streamline Makefile r=kvark a=Napokue
Changes:
- Streamlining the Make commands to make it look better
- Introduced two new variables: `WILDCARD_WGPU_NATIVE` & `WILDCARD_WGPU_NATIVE_AND_REMOTE` to reduce duplicate code. Will continue to reduce duplicate after my compute example is merged, to avoid unnecessary merge conflicts
Maybe I am not too familiar with the concept FFI, but wouldn't it be easier to understand that we just generate headers and not foreign function interfaces. Basically the same, but the latter one sounds a lot more complex. We want to reach as much as possible people, so maybe renaming this would be beneficial?
So I was thinking to have the commands: `header-wgpu` and `header-wgpu-remote`, instead of `ffi-wgpu` and `ffi-wgpu-remote`.
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
258: Run-time lock protection against double root r=grovesNL a=kvark
Fixes https://github.com/gfx-rs/wgpu-rs/issues/42
cc @paulkernfeld
We didn't handle a case where the root locking token would get dropped (while some children are borrowed), and a new one is created. This was the case in `wgpu_device_poll`, which ended up trying to unmap the buffers.
This PR brings a relatively simple run-time check for this. It could *probably* be done at the type level, but I'm going to leave it for any follow ups (help is welcome!), because:
1. we'll still have a run-time check for the simple case where 2 or more root tokens are created
2. I spent 20 minutes trying and wasn't able to get this going
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
38: Add an example showing how to capture a render r=kvark a=paulkernfeld
I had wanted to use wgpu-rs to generate `.png` images rather than displaying to the screen, so I coded up this prototype as an example to others who might want to do something similar.
Possible changes:
- Create an actual `.png` or other image
- Convert this into a unit test
I'm happy to make other modifications to this as well.
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
254: Rebind with proper dynamic offsets r=grovesNL a=kvark
~~The change fixed a bug found by @kocsis1david : when we re-bind the higher bind groups we aren't currently considering their dynamic offsets.~
Fixes#255
Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
40: Update running an example documentation r=kvark a=Napokue
- Removed link to gfx getting started
- Created our own getting started (with examples)
- Updated syntax
Motivation: I always forget how to run the examples, gfx getting started is not the same as the wgpu-rs one. So I found the correct usage of the syntax to run examples. I am noticing in the Gitter channel that many people are struggling with running the examples, maybe this will clear it up a little.
This is the beginning, I will continue to expand the documentation in the future.
Co-authored-by: Timo de Kort <dekort.timo@gmail.com>
Disable vsync
Revert accidential hardcode of num_frames
Make the PresentMode configurable
Adapt examples
+ adjust style according to @kvrak
Adher to @kvarks wishes for style.
Examples build.
Fix unnecessary ampersand.
32: Add conversion matrix from OpenGL to wgpu r=kvark a=dragly
The matrices in the examples are given in an OpenGL-like coordinate system,
while a Vulkan-like coordinate system is used by wgpu. This was previously
partially corrected in the shader and by flipping the up axis of the camera,
but left the x-axis mirrored in the final result.
This change adds a conversion matrix to framework.rs that can be used
to convert from OpenGL to wgpu. This also allows us to set the
winding-order to counter-clockwise, which matches the ordering in the data.
Co-authored-by: Svenn-Arne Dragly <dragly@cognite.com>
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
The matrices in the examples are given in an OpenGL-like coordinate system,
while a Vulkan-like coordinate system is used by wgpu. This was previously
partially corrected in the shader and by flipping the up axis of the camera,
but left the x-axis mirrored in the final result.
This change adds a conversion matrix to framework.rs that can be used
to convert from OpenGL to wgpu. This also allows us to set the
winding-order to counter-clockwise, which matches the ordering in the data.
223: Derive Debug for All Remaining Public Types r=kvark a=arashikou
With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all of the gfx-hal types that wgpu depends on implement `Debug`. Thus, some types that could not derive `Debug` in #216 can now derive `Debug`.
This patch also adds `Debug` implementations for a few types that were recently added to wgpu.
Fixes#76.
Co-authored-by: John W. Bruce <arashikou@gmail.com>
With gfx-hal 0.2.1 and the various backend releases on 2019-06-28, all
of the gfx-hal types that wgpu depends on implement Debug. Thus, some
types that could not derive Debug in #216 can now derive Debug.
This patch also adds Debug implementations for a few types that were
recently added to wgpu.
Fixes#76.
242: Add logic to pick highest performance GPU on DirectX 12 r=kvark a=AndrewGaspar
I was having an issue on my Surface Book where my Intel's integrated GPU is always selected instead of my Nvidia discrete GPU when querying for `HighPerformance`. It turns out the Intel GPU is reported as a `DistcreteGPU` by `gfx` (in fact `gfx` has no logic for reporting `IntegratedGPU`s for DX12). However, it also turns out that `dx12::Instance::enumerate_adapters` returns adapters in descending order of performance, at least on Windows 10 > 1803. Therefore, we should use the _first_ GPU in each category, at least for `HighPerformance`. With this fix, `LowPower` selects my Intel GPU and `HighPerformance` and `Default` select my Nvidia GPU.
I'm not so sure `LowPower` = `IntegratedGPU` and `HighPerformance` = `DiscreteGPU` is the quite correct mapping, so I filed an issue on gfx to improve the ability for querying for power/performance preference: https://github.com/gfx-rs/gfx/issues/2879
Anyway, let me know if you have a different fix you'd prefer.
Co-authored-by: Andrew Gaspar <andrew.gaspar@outlook.com>