743: Derive Serialize and Deserialize for HostMap r=kvark a=kunalmohan

**Connections**
_Link to the issues addressed by this PR, or dependent PRs in other repositories_

**Description**
_Describe what problem this is solving, and how it's solved._
Also a switch from `f32::MAX` to `std::f32::MAX`

**Testing**
_Explain how this change is tested._
<!--
Non-trivial functional changes would need to be tested through:
  - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
  - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.

Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->


Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
This commit is contained in:
bors[bot]andKunal Mohan authored and GitHub committed 2020-06-22 13:25:25 +00:00
commit 63a5f9974e
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -81,6 +81,8 @@ pub fn all_image_stages() -> hal::pso::PipelineStage {
}
#[derive(Clone, Copy, Debug, PartialEq)]
#[cfg_attr(feature = "trace", derive(serde::Serialize))]
#[cfg_attr(feature = "replay", derive(serde::Deserialize))]
pub enum HostMap {
Read,
Write,
+1 -1
View File
@@ -1475,7 +1475,7 @@ impl<L: Default> Default for SamplerDescriptor<L> {
min_filter: Default::default(),
mipmap_filter: Default::default(),
lod_min_clamp: 0.0,
lod_max_clamp: f32::MAX,
lod_max_clamp: std::f32::MAX,
compare: Default::default(),
anisotropy_clamp: Default::default(),
_non_exhaustive: Default::default(),