vulkano/examples
gurchetansingh 65254ed10c
More memory changes with some thoughts on error handling (#1510)
* vulkano: instance: derive Ord, PartialOrd for PhysicalDeviceType

Useful for want differeniating integrated and discrete GPUs in a
hash table.

* vulkano: don't pull in all of crossbeam

Just pull in crossbeam-queue, since that's what used.

Having a smaller set of packages is easier for system integrators
such as myself.

* vulkano: memory: add import support, separate device memory and mappings, and much more!

- Chaining structs copied shamelessly and poorly from Ash :-)
- Import support, as previously promised.
- DeviceMemoryMappings so we can maybe one day expose the binding model.
- Attempts to rigorously check Valid Usage IDs (VUIDs).

A note about error handling:

- Currently, Vulkano error handling is a bit unclear.  For example, I
  didn't define a "DeviceMemoryMappingError" and simply reused the
  "DeviceMemoryAllocError" already present in the file.  In reality,
  both a theoretical "DeviceMemoryMappingError" and the already
  present "DeviceMemoryAllocError" should mostly just check the valid
  usage IDs present in the Vulkan spec (or return an error from the
  implementation).  This code pattern is common throughout Vulkano.
  Perhaps we should go to a simpler VulkanoResult<T>??? Just an idea.

- Also, is Vulkano a validation layer??? LunarG tracks every single
  VUIDs in their uber layer already:

  https://www.lunarg.com/wp-content/uploads/2019/04/UberLayer_V3.pdf

  Of course, given how Vulkan drivers are relatively straigtforward
  compared to OpenGL, it's generally possible to match LunarG *using
  Rust* if we just have a big enough community.  Whether we want to or
  not may be up for debate. For now, I just followed the original
  vision of tomaka and added validation.  If we do want to do it, then
  we have to be more rigorous about it.
2021-03-27 20:50:51 +07:00
..
src More memory changes with some thoughts on error handling (#1510) 2021-03-27 20:50:51 +07:00
Cargo.toml Update various dependencies (#1483) 2021-02-06 02:35:24 +07:00
readme.md Copy examples from example repo (#1023) 2018-08-30 11:37:51 +10:00

Examples

These examples use unreleased functionality of vulkano. For a snapshot of the examples at the latest vulkano release take a look at the examples repository

Running the examples:

cargo run --bin <example>

Example:

cargo run --bin triangle

If you want to compare performances with other libraries, you should pass the --release flag as well. Rust is pretty slow in debug mode.