Commit Graph

55 Commits

Author SHA1 Message Date
Nils Hasenbanck
1f5a55ea13 Fix the default lod_max_clamp value for the SamplerDescriptor
The current default value for the lod_max_clamp of a sampler is 0.
This would deactivate mipmapping alltogether. Setting it to
f32::MAX makes sure to always enable it. It's the default value apple
uses in Metal, it seems to be valid usage in Vulkan (maxLod in
VkSamplerCreateInfo) and in DX12 (MaxLOD in D3D12_SAMPLER_DESC).
2020-06-20 18:03:51 +02:00
bors[bot]
b4410c5d8a
Merge #732
732: Dummy workspace crate r=cwfitzgerald a=kvark

Basically, it makes sure that doing `cargo check` locally in the workspace is all you need.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-06-18 19:11:53 +00:00
Dzmitry Malyshau
0cd1ec2981 Dummy workspace crate 2020-06-18 14:16:04 -04:00
Connor Fitzgerald
15d0db8828 wgpu-types documentation pass 2020-06-17 20:38:44 -04:00
Dzmitry Malyshau
a27341bd6d Basic support for minBufferBindingSize 2020-06-16 00:34:58 -04:00
Connor Fitzgerald
5a7fb4c1e5 Implement Capability/Extension Split 2020-06-14 02:32:54 -04:00
Dzmitry Malyshau
c038c206e7 Add RODS texture binding property 2020-06-12 21:26:19 -04:00
bors[bot]
373a1c2bf0
Merge #715
715: Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING r=kvark a=cwfitzgerald

## Connections

Closes #483. Extends support for #106.

## Description

This forwards the descriptor indexing features gfx-hal up to wgpu. 

Note this PR also changes the name of the `TEXTURE_BINDING_ARRAY` to `SAMPLED_TEXTURE_BINDING_ARRAY` to be more consistent with extensions.

## Testing

Texture-array example was simply extended to use descriptor indexing. This works on all platforms that the feature is supported. (thanks @stararawn)



Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-06-12 23:53:37 +00:00
Connor Fitzgerald
bfcc369bc7 Implement SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING 2020-06-12 19:52:10 -04:00
Dzmitry Malyshau
7aa5753701 Re-architecture the bundles using normalized command streams.
This is a major change in how the bundles are implemented. Instead of
transparently injecting them into the pass command stream, we are now
treating bundles as first-class API objects and API tracing them
accordingly. The bundle contains a normalized command stream that is
very easy to inject into a native command buffer multiple times.
2020-06-11 15:34:45 -04:00
Dzmitry Malyshau
afc4517db1 Render bundle reset states, updated descriptors 2020-06-11 15:28:55 -04:00
Dzmitry Malyshau
fbf35e43a6 Render bundles 2020-06-11 15:28:55 -04:00
Connor Fitzgerald
57b3b72571 Implement TEXTURE_BINDING_ARRAY extension 2020-06-10 22:35:25 -04:00
Connor Fitzgerald
4258c60f46 Implement mappable primary buffers extension 2020-06-08 22:33:47 -04:00
Connor Fitzgerald
27ffe5026b Implement buffer to any copy bounds checking 2020-06-08 11:24:33 -04:00
Dzmitry Malyshau
16424bfac1 Add shader validation bool to DeviceDescriptor 2020-06-06 23:34:04 -04:00
Connor Fitzgerald
f32cb103b8 Implement extensions interface as described in #691 2020-06-06 02:00:41 -04:00
Connor Fitzgerald
ade7ce10b2 Rustification of Extensions and SamplerDescriptor 2020-06-02 21:04:25 -04:00
Dzmitry Malyshau
cc418e747d Implement Default for BufferSize and PowerPreference 2020-06-02 13:44:12 -04:00
Dzmitry Malyshau
ae17ea7625 New map_async logic, change the semantic of mapped buffers. 2020-06-02 13:44:00 -04:00
Dzmitry Malyshau
aa12e7dc14 Read-only depth-stencil support 2020-06-01 19:54:56 -04:00
Dzmitry Malyshau
321a5cee0f Enforce copy buffer-texture row pitch alignment 2020-06-01 16:51:42 -04:00
Connor Fitzgerald
415ce97415 Implement anisotropic filtering and extensions/limits 2020-06-01 10:43:54 -04:00
Dzmitry Malyshau
7181bfe977 Move BufferSize to wgpu-types 2020-05-30 01:19:42 -04:00
bors[bot]
6650b94ff6
Merge #668
668: Return failures to the user in swap_chain_get_next_texture, rather than transparently reconfiguring. r=kvark a=AlphaModder

TODO:
- [x] Change `Global::swap_chain_get_next_texture` in `wgpu-core`.
- [x] Update `wgpu_swap_chain_get_next_texture` in `wgpu-native`. (https://github.com/gfx-rs/wgpu-native/pull/32)
- [x] Wrap `SwapChainOutput`/`SwapChainStatus` in a nice enum in `wgpu-rs`. (https://github.com/gfx-rs/wgpu-rs/pull/323)
- [ ] Update `wgpu_bindings` (?)

Co-authored-by: AlphaModder <quasiflux@gmail.com>
2020-05-26 21:26:15 +00:00
AlphaModder
e89c3d6b1c Alter swap_chain_get_next_texture to bubble up failures to the user. 2020-05-26 14:15:22 -07:00
Dzmitry Malyshau
dff37bb65d Move TextureDataLayout to wgpu-types 2020-05-26 00:15:09 -04:00
mitchmindtree
a8b8bc8283 Implement From<TextureFormat> for TextureComponentType 2020-05-02 02:33:22 +02:00
Dzmitry Malyshau
f35dd741aa
Android support (#625) 2020-05-01 00:22:00 -04:00
Dzmitry Malyshau
f64b2dd3bb trace: make Id serialization nicer 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
1cc548a7a2 Make descriptors generic over Label 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
0e533547a1 Split serde feature into trace+replay 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau
5e458b5d45
Separate public usage from internal use (#601) 2020-04-21 09:12:40 -04:00
Dzmitry Malyshau
82a7791763 Fix vertex format enum to match the native header 2020-04-14 17:14:17 -04:00
Dzmitry Malyshau
d9609ec269 Remove array layer count from texture descriptor 2020-04-13 11:44:10 -04:00
Dzmitry Malyshau
7dba052900 Version bump and CHANGELOG update 2020-04-06 08:55:39 -04:00
Dzmitry Malyshau
a3aefe2535 Rustfmt stable pass 2020-04-06 08:55:39 -04:00
Rukai
99161cbeb5 Use crates.io release of peek-poke 2020-04-05 23:06:02 -04:00
Dzmitry Malyshau
f07943f2d8 Use NonZeroU64 for Id 2020-04-04 19:43:16 -04:00
Dzmitry Malyshau
f3eee020e6 Check surface compatibility 2020-03-30 23:31:24 -04:00
bors[bot]
306554600a
Merge #540
540: Add serialization to more types r=kvark a=HeroesGrave

With these changes, pretty much everything in wgpu-types can be serialized with the exception of BufferDescriptor, CommandEncoderDescriptor, and TextureDescriptor which contain a `*const c_char`.

Options for dealing with those:
- Leave these types as not de/serializable
- Skip when serializing, deserialize as nullptr
- Serialize as a string, deserialize as nullptr

AFAICT there's not really a way to allow a full roundtrip for these fields because nul-terminated strings don't play nicely with serde. Maybe it could serialize as a byte array?

Co-authored-by: HeroesGrave <heroesgrave@gmail.com>
2020-03-28 14:44:08 +00:00
HeroesGrave
1702a54c5c Add Undefined variant to CompareFunction 2020-03-28 16:20:47 +13:00
Joshua Groves
f3bb6eb230 Move more types to wgpu-types 2020-03-27 23:26:17 -02:30
HeroesGrave
98e18c5ac8 Add serialization to more types 2020-03-28 13:49:09 +13:00
Aaron Loucks
d64670aab1 Use ptr::null for default label 2020-03-26 20:26:03 -04:00
Aaron Loucks
fdcf9e7067 Add inital debug labels
- bind group
- bind group layout
- command encoder
- texture
2020-03-24 19:43:11 -04:00
Aaron Loucks
2700d1cc15 Add buffer debug labels 2020-03-24 19:38:07 -04:00
aloucks
e39aaa9cb3
Implement PartialEq, Eq, and Hash for more types (#535) 2020-03-24 19:29:18 -04:00
mitchmindtree
cce9d7a3f7 Add Clone and PartialEq implementations for SamplerDescriptor
Helps when attempting to support multiple samplers in an immediate mode
context (e.g. easily compare sampler descriptors and check if I need to
add a command to switch bind groups).
2020-03-19 19:44:11 +01:00
mitchmindtree
f00ab00ad9 Add derive PartialEq to Extent3d 2020-03-17 13:05:13 +01:00