Commit Graph
151 Commits
Author SHA1 Message Date
Dzmitry Malyshau b07950ca8a Expose get_bind_group_layout 2020-08-11 00:36:32 -04:00
Hiroaki Yutani b9dcf32595 Update a doc's reference to create_buffer_init() 2020-08-01 17:57:13 +09:00
OptimisticPeach 2512c30e57 Combine create_buffer and create_buffer_with_dataCombines both by creating a new buffer descriptor which can deal with both of copying and allocating. 2020-07-29 21:35:21 -04:00
bors[bot]andAndrea Nardi 9a9bf53a6e Merge #475
475: Made RenderBundleEncoder derive Debug r=kvark a=Andful

This is a continuation of the pull request #466 and should resolve the issue #458.

Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-24 19:11:05 +00:00
Marvin Löbel 166fdc1052 Fix missing cows in some places 2020-07-24 17:24:30 +02:00
Andrea Nardi 4784c45be4 Made RenderBundleEncoder derive Debug
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-24 14:59:40 +02:00
Marvin Löbel a7abefaaab Fix two missed renames in docs 2020-07-24 02:08:01 +02:00
Marvin Löbel eb9299d247 Update wgpu-rs for the Cow changes in wgpu 2020-07-23 00:48:13 +02:00
Andrea Nardi 019e7513b3 made fields of direct::Context private 2020-07-22 21:53:13 +02:00
Andrea Nardi f1fa1e884b implement debug for public types
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:44:48 +02:00
Dzmitry Malyshau 655828f88f Fix Vulkan portability support on macOS 2020-07-21 12:39:40 -04:00
Rukai 87da83cb4f create_buffer_with_data automatically handles its own alignment requirements 2020-07-22 01:21:50 +10:00
bors[bot]andAndrea Nardi 8a07a09610 Merge #453
453: Added Static Lifetime to Statically Loaded SPIR-V Modules r=kvark a=Andful

The commit enables `include_spirv!` to return a `ShaderModuleSource<'static>`.
This allows `ShaderModuleSource` to outlive the context in which `include_spirv!` was called in.
An example where this implementation would work but the previews would not is the following.
```rust
fn get_vertex_module<'a>() -> wgpu::ShaderModuleSource<'a> {
    wgpu::include_spirv!("shader.vert.spv")
}
let vs_module = device.create_shader_module(get_vertex_module());
```
Also it makes logical sense for a statically loaded module to have a static lifetime.  

The only downside that this change might bring is the redundant presence of the binary string (the non aligned binary string and the aligned binary string) but from the produced assembly I could only find one copy of the binary string so I don't think this is the case.

Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-20 17:39:39 +00:00
Andrea Nardi dcd5b4675d Added Static Lifetime to Statically Loaded SPIR-V Modules
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-20 19:35:34 +02:00
Rukai be388200dc Update to latest wgpu 2020-07-21 01:51:55 +10:00
Gabriel Majeri f4fe83be77 Implement more derives for Operations (#450)
* Implement more derives for `Operations`

* Use `trace` / `replay` features for serialization

* Set `store` to default
2020-07-19 20:20:45 -04:00
Connor Fitzgerald 17a53cf003 Remove Lifetimes from Push Constants 2020-07-17 14:52:33 -04:00
DasEtwas db834c58ab added Display and Error implementation for SwapChainError, imported Display and Error more nicely 2020-07-16 23:46:10 +02:00
Connor Fitzgerald 8bc91dc124 Impl Error for Error types 2020-07-16 09:23:00 -04:00
Connor Fitzgerald a67047297c Implement PUSH_CONSTANTS feature 2020-07-13 15:43:46 -04:00
Gabriel Majeri e01e93a619 Use common types from wgpu-types 2020-07-13 20:12:27 +03:00
Lachlan Sneff 42a8c480a7 Split render pass docs into multiple sections, divided by feature 2020-07-09 11:06:09 -04:00
Gabriel Majeri eb91482d0b Update to new wgpu-core render pipeline API 2020-07-07 21:02:11 +03:00
Connor Fitzgerald cc5ff8e992 Implement MultiDrawIndirect Extensions 2020-06-28 01:39:17 -04:00
Gabriel Majeri 3720e96321 Improve crate docs 2020-06-27 21:25:19 +03:00
Connor Fitzgerald 5529b60da4 Convert Extensions + Capabilities into Features 2020-06-26 01:27:57 -04:00
Dzmitry Malyshau 4aa7abdff8 Staging belt, use LocalSpawner for the framework 2020-06-23 23:15:47 -04:00
Dzmitry Malyshau 3f57811e7a Another refactor of RenderPassDescriptor API 2020-06-20 19:07:06 -04:00
Dzmitry Malyshau 330986bc66 Update wgpu without peek-poke 2020-06-20 17:20:20 -04:00
Marvin Löbel 693abce446 Move backends: BackendBit paramter to Instance::new() 2020-06-19 01:25:38 +02:00
Connor Fitzgerald ffde811da2 wgpu-rs documentation pass 2020-06-18 11:10:18 -04:00
Dzmitry Malyshau 65718c1e25 Add include_spirv macro 2020-06-18 01:04:42 -04:00
bors[bot]andNikita Krupitskas ddfe8d67d2 Merge #374
374: Add debug markers and debug markers example r=kvark a=krupitskas

Depends on https://github.com/gfx-rs/wgpu/pull/719

Co-authored-by: Nikita Krupitskas <krupitskas@icloud.com>
2020-06-17 13:54:00 +00:00
Dzmitry Malyshau 47cbde6782 Update with minBufferBindingSize 2020-06-17 00:13:47 -04:00
Nikita Krupitskas f9ae9be70a Add debug markers and debug markers example 2020-06-16 11:13:03 +03:00
Dzmitry Malyshau fe42169e2e Revert "API update for RODS2"
This reverts commit edb3610530.
2020-06-15 18:16:14 -04:00
Connor Fitzgerald 021419b15d Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING 2020-06-15 15:09:06 -04:00
Dzmitry Malyshau edb3610530 API update for RODS2 2020-06-14 09:25:13 -04:00
Dzmitry Malyshau 71cfb32342 Render bundle support, use in msaa-line example 2020-06-11 22:59:40 -04:00
bors[bot]andConnor Fitzgerald 7b887f12a3 Merge #360
360: Implement TEXTURE_BINDING_ARRAY extension r=kvark a=cwfitzgerald

This extends https://github.com/gfx-rs/wgpu/pull/711 into wgpu-rs.

Notable changes: 
- Added an example showing off both this extension and the future descriptor indexing extension.
- Changed the framework so there is a static function showing what extensions you need. This is provided by the trait,, which defaults to no extensions, so existing examples and new ones don't have to care about extensions.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-11 20:37:46 +00:00
Connor Fitzgerald f8be38cc01 Implement TEXTURE_BINDING_ARRAY extension 2020-06-11 16:36:53 -04:00
Lachlan Sneff 35dd34b4ec Add BufferView and BufferViewMut and fix safety issues with mapped range. 2020-06-09 20:03:28 -04:00
bors[bot]andConnor Fitzgerald 092d5bb6fd Merge #350
350: Implement Extensions Interface r=kvark a=cwfitzgerald

This implements https://github.com/gfx-rs/wgpu/pull/703 in wgpu-rs. Notable changes include the removal of the anisotropic field from the examples, in favor of the now mandatory `..Default::default()` syntax.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-08 05:21:23 +00:00
Connor Fitzgerald b71c420f7a Implement extensions interface as described in wgpu#691 2020-06-08 01:20:00 -04:00
kyren 42de0b2769 Properly honor mapped_at_creation in Device::create_buffer
The returned `Buffer` should immediately be mappable.  Fixes #351
2020-06-06 15:55:15 -04:00
Rukai f6123e4fe8 Add aribitrary texture size handling to the capture example 2020-06-06 14:56:08 +10:00
Dzmitry Malyshau 63219a5a85 Use the new map-async 2020-06-02 14:23:34 -04:00
Dzmitry Malyshau ac6f79cb72 Read-only depth-stencil support 2020-06-01 20:25:01 -04:00
Connor Fitzgerald c4819ccf7d Add Extension/Limit interface 2020-06-01 13:08:56 -04:00
AlphaModder 91d46ecc2b Rename SwapChain::get_next_texture to SwapChain::get_next_frame, and have it return errors to the user. 2020-05-30 18:41:31 -07:00