Skip to content

Commit 64d67b5

Browse files
authored
Fix and enforce line endings + stray whitespace (#1099)
1 parent 7189c7f commit 64d67b5

File tree

17 files changed

+337
-337
lines changed

17 files changed

+337
-337
lines changed

Diff for: .travis.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ addons:
2222
- cmake-data
2323

2424
script:
25+
- git diff-tree --check $(git hash-object -t tree /dev/null) HEAD
2526
- travis_wait cargo test --all -j 1
2627
- cd examples
2728
- cargo build

Diff for: CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ borrowed `str`s.
4141
- Allow `Surface` to own the window it references.
4242
- Clear value validation for `AutoCommandBufferBuilder::begin_render_pass()`
4343
- Fix occasional truncation of glslang_validator when glsl-to-spirv is rebuilt
44-
- Fix linking against MoltenVK >= 0.19.0
44+
- Fix linking against MoltenVK >= 0.19.0
4545
- Fix panic on DeviceLost error after resizing swapchain on nvidia/amd hardware
4646
- Added `AutoCommandBufferBuilder::copy_image`
4747
- Added `VulkanObject::TYPE` to look up the `DebugReportObjectTypeEXT` of an object

Diff for: DESIGN.md

+270-270
Large diffs are not rendered by default.

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,14 +100,14 @@ Vulkan is not natively supported by macOS and iOS. However, there exists [Molten
100100
a Vulkan implementation on top of Apple's Metal API. This allows vulkano to build and run on macOS
101101
and iOS platforms.
102102

103-
The easiest way to get vulkano up and running on macOS is to install the
103+
The easiest way to get vulkano up and running on macOS is to install the
104104
[Vulkan SDK for macOS](https://vulkan.lunarg.com/sdk/home). To install the SDK so that
105105
Vulkano will find it and dynamically link with `libvulkan.dylib`:
106106

107107
1. Download the latest macOS release and unpack it somewhere, for the next step
108108
we'll assume that's `~/vulkan_sdk`.
109-
2. Modify your environment to contain the SDK bin directory in PATH and the SDK lib directory in
110-
DYLD_LIBRARY_PATH. We also need to set VK_ICD_FILENAMES and VK_LAYER_PATH. When using the Bash
109+
2. Modify your environment to contain the SDK bin directory in PATH and the SDK lib directory in
110+
DYLD_LIBRARY_PATH. We also need to set VK_ICD_FILENAMES and VK_LAYER_PATH. When using the Bash
111111
shell, which is the default for macOS, it's easiest to do this by appending the following to the
112112
`~/.bash_profile` file and then restarting the terminal.
113113

Diff for: examples/src/bin/deferred/frame/system.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ impl<'a> Frame<'a> {
349349
// If we are in pass 2 then we have finished applying lighting.
350350
// We take the builder, call `end_render_pass()`, and then `build()` it to obtain
351351
// an actual command buffer.
352-
let command_buffer =
352+
let command_buffer =
353353
self.command_buffer
354354
.take()
355355
.unwrap()

Diff for: examples/src/bin/deferred/main.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010

1111
// Welcome to the deferred lighting example!
12-
//
12+
//
1313
// The idea behind deferred lighting is to render the scene in two steps.
14-
//
14+
//
1515
// First you draw all the objects of the scene. But instead of calculating the color they will
1616
// have on the screen, you output their characteristics such as their diffuse color and their
1717
// normals, and write this to images.
18-
//
18+
//
1919
// After all the objects are drawn, you should obtain several images that contain the
2020
// characteristics of each pixel.
21-
//
21+
//
2222
// Then you apply lighting to the scene. In other words you draw to the final image by taking
2323
// these intermediate images and the various lights of the scene as input.
24-
//
24+
//
2525
// This technique allows you to apply tons of light sources to a scene, which would be too
2626
// expensive otherwise. It has some drawbacks, which are the fact that transparent objects must be
2727
// drawn after the lighting, and that the whole process consumes more memory.
@@ -111,7 +111,7 @@ fn main() {
111111
} else {
112112
return;
113113
};
114-
114+
115115
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
116116
Ok(r) => r,
117117
Err(SwapchainCreationError::UnsupportedDimensions) => {

Diff for: examples/src/bin/msaa-renderpass.rs

+11-11
Original file line numberDiff line numberDiff line change
@@ -10,53 +10,53 @@
1010
//! Multisampling anti-aliasing example, using a render pass resolve.
1111
//!
1212
//! # Introduction to multisampling
13-
//!
13+
//!
1414
//! When you draw an object on an image, this object occupies a certain set of pixels. Each pixel
1515
//! of the image is either fully covered by the object, or not covered at all. There is no such
1616
//! thing as a pixel that is half-covered by the object that you're drawing. What this means is
1717
//! that you will sometimes see a "staircase effect" at the border of your object, also called
1818
//! aliasing.
19-
//!
19+
//!
2020
//! The root cause of aliasing is that the resolution of the image is not high enough. If you
2121
//! increase the size of the image you're drawing to, this effect will still exist but will be
2222
//! much less visible.
23-
//!
23+
//!
2424
//! In order to decrease aliasing, some games and programs use what we call "Super-Sampling Anti
2525
//! Aliasing" (SSAA). For example instead of drawing to an image of size 1024x1024, you draw to an
2626
//! image of size 4096x4096. Then at the end, you scale down your image to 1024x1024 by merging
2727
//! nearby pixels. Since the intermediate image is 4 times larger than the destination, this would
2828
//! be x4 SSAA.
29-
//!
29+
//!
3030
//! However this technique is very expensive in terms of GPU power. The fragment shader and all
3131
//! its calculations has to run four times more often.
32-
//!
32+
//!
3333
//! So instead of SSAA, a common alternative is MSAA (MultiSampling Anti Aliasing). The base
3434
//! principle is more or less the same: you draw to an image of a larger dimension, and then at
3535
//! the end you scale it down to the final size. The difference is that the fragment shader is
3636
//! only run once per pixel of the final size, and its value is duplicated to fill to all the
3737
//! pixels of the intermediate image that are covered by the object.
38-
//!
38+
//!
3939
//! For example, let's say that you use x4 MSAA, you draw to an intermediate image of size
4040
//! 4096x4096, and your object covers the whole image. With MSAA, the fragment shader will only
4141
//! be 1,048,576 times (1024 * 1024), compared to 16,777,216 times (4096 * 4096) with 4x SSAA.
4242
//! Then the output of each fragment shader invocation is copied in each of the four pixels of the
4343
//! intermediate image that correspond to each pixel of the final image.
44-
//!
44+
//!
4545
//! Now, let's say that your object doesn't cover the whole image. In this situation, only the
4646
//! pixels of the intermediate image that are covered by the object will receive the output of the
4747
//! fragment shader.
48-
//!
48+
//!
4949
//! Because of the way it works, this technique requires direct support from the hardware,
5050
//! contrary to SSAA which can be done on any machine.
51-
//!
51+
//!
5252
//! # Multisampled images
53-
//!
53+
//!
5454
//! Using MSAA with Vulkan is done by creating a regular image, but with a number of samples per
5555
//! pixel different from 1. For example if you want to use 4x MSAA, you should create an image with
5656
//! 4 samples per pixel. Internally this image will have 4 times as many pixels as its dimensions
5757
//! would normally require, but this is handled transparently for you. Drawing to a multisampled
5858
//! image is exactly the same as drawing to a regular image.
59-
//!
59+
//!
6060
//! However multisampled images have some restrictions, for example you can't show them on the
6161
//! screen (swapchain images are always single-sampled), and you can't copy them into a buffer.
6262
//! Therefore when you have finished drawing, you have to blit your multisampled image to a

Diff for: examples/src/bin/teapot/main.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fn main() {
144144
} else {
145145
return;
146146
};
147-
147+
148148
let (new_swapchain, new_images) = match swapchain.recreate_with_dimension(dimensions) {
149149
Ok(r) => r,
150150
Err(SwapchainCreationError::UnsupportedDimensions) => continue,
@@ -205,11 +205,11 @@ fn main() {
205205
.draw_indexed(
206206
pipeline.clone(),
207207
&DynamicState::none(),
208-
vec!(vertex_buffer.clone(), normals_buffer.clone()),
208+
vec!(vertex_buffer.clone(), normals_buffer.clone()),
209209
index_buffer.clone(), set.clone(), ()).unwrap()
210210
.end_render_pass().unwrap()
211211
.build().unwrap();
212-
212+
213213
let future = previous_frame.join(acquire_future)
214214
.then_execute(queue.clone(), command_buffer).unwrap()
215215
.then_swapchain_present(queue.clone(), swapchain.clone(), image_num)

Diff for: examples/src/bin/triangle.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ void main() {
255255
store: Store,
256256
// `format: <ty>` indicates the type of the format of the image. This has to
257257
// be one of the types of the `vulkano::format` module (or alternatively one
258-
// of your structs that implements the `FormatDesc` trait). Here we use the
258+
// of your structs that implements the `FormatDesc` trait). Here we use the
259259
// same format as the swapchain.
260260
format: swapchain.format(),
261261
// TODO:

Diff for: vulkano-shaders/src/lib.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
//! module like some normal macro crates do since derive macros cannot be used from
3434
//! the crate they are declared in. On the other hand, if you are looking for a
3535
//! high-level overview, you can see the below section.
36-
//!
36+
//!
3737
//! # Generated code overview
38-
//!
38+
//!
3939
//! The macro generates the following items of interest:
4040
//! * The `Shader` struct. This contains a single field, `shader`, which is an
4141
//! `Arc<ShaderModule>`.
@@ -61,11 +61,11 @@
6161
//! specialization constant found in the shader data. Implementations of
6262
//! `Default` and [`SpecializationConstants`][SpecializationConstants] are also
6363
//! generated for the struct.
64-
//!
64+
//!
6565
//! All of these generated items will be accessed through the module specified
6666
//! by `mod_name: foo` If you wanted to store the `Shader` in a struct of your own,
6767
//! you could do something like this:
68-
//!
68+
//!
6969
//! ```
7070
//! # extern crate vulkano_shaders;
7171
//! # extern crate vulkano;
@@ -89,11 +89,11 @@
8989
//! # }
9090
//! // various use statements
9191
//! // `vertex_shader` module with shader derive
92-
//!
92+
//!
9393
//! pub struct Shaders {
9494
//! pub vs: vs::Shader
9595
//! }
96-
//!
96+
//!
9797
//! impl Shaders {
9898
//! pub fn load(device: Arc<Device>) -> Result<Self, OomError> {
9999
//! Ok(Self {
@@ -102,9 +102,9 @@
102102
//! }
103103
//! }
104104
//! ```
105-
//!
105+
//!
106106
//! # Options
107-
//!
107+
//!
108108
//! The options available are in the form of the following attributes:
109109
//!
110110
//! ## `ty: "..."`
@@ -134,7 +134,7 @@
134134
//! ## `dump: true`
135135
//!
136136
//! The crate fails to compile but prints the generated rust code to stdout.
137-
//!
137+
//!
138138
//! [reflect]: https://github.com/vulkano-rs/vulkano/blob/master/vulkano-shaders/src/lib.rs#L67
139139
//! [cargo-expand]: https://github.com/dtolnay/cargo-expand
140140
//! [ShaderModule::new]: https://docs.rs/vulkano/*/vulkano/pipeline/shader/struct.ShaderModule.html#method.new

Diff for: vulkano/Cargo.toml

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
[package]
2-
name = "vulkano"
3-
version = "0.10.0"
4-
authors = ["Pierre Krieger <[email protected]>", "The vulkano contributors"]
5-
repository = "https://github.com/vulkano-rs/vulkano"
6-
description = "Safe wrapper for the Vulkan graphics API"
7-
license = "MIT/Apache-2.0"
8-
documentation = "https://docs.rs/vulkano"
9-
readme = "../README.md"
10-
categories = ["rendering::graphics-api"]
11-
build = "build.rs"
12-
13-
[dependencies]
14-
crossbeam = "0.4"
15-
fnv = "1.0.6"
16-
shared_library = "0.1.7"
17-
smallvec = "0.6.0"
18-
lazy_static = "1"
19-
vk-sys = { version = "0.3.3", path = "../vk-sys" }
20-
half = "1"
1+
[package]
2+
name = "vulkano"
3+
version = "0.10.0"
4+
authors = ["Pierre Krieger <[email protected]>", "The vulkano contributors"]
5+
repository = "https://github.com/vulkano-rs/vulkano"
6+
description = "Safe wrapper for the Vulkan graphics API"
7+
license = "MIT/Apache-2.0"
8+
documentation = "https://docs.rs/vulkano"
9+
readme = "../README.md"
10+
categories = ["rendering::graphics-api"]
11+
build = "build.rs"
12+
13+
[dependencies]
14+
crossbeam = "0.4"
15+
fnv = "1.0.6"
16+
shared_library = "0.1.7"
17+
smallvec = "0.6.0"
18+
lazy_static = "1"
19+
vk-sys = { version = "0.3.3", path = "../vk-sys" }
20+
half = "1"

Diff for: vulkano/src/command_buffer/auto.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl<P> AutoCommandBufferBuilder<P> {
547547
None => panic!("Not enough clear values")
548548
}
549549
}
550-
550+
551551
if clear_values_copy.count() != 0 {
552552
panic!("Too many clear values")
553553
}

Diff for: vulkano/src/format.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ macro_rules! formats {
186186

187187
impl Format {
188188
/*pub fn is_supported_for_vertex_attributes(&self) -> bool {
189-
189+
190190
}
191191
192192
.. other functions ..

Diff for: vulkano/src/image/mod.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -306,13 +306,13 @@ impl Dimensions {
306306
#[inline]
307307
pub fn to_view_type(&self) -> ViewType {
308308
match *self {
309-
Dimensions::Dim1d { .. } => ViewType::Dim1d,
310-
Dimensions::Dim1dArray { .. } => ViewType::Dim1dArray,
311-
Dimensions::Dim2d { .. } => ViewType::Dim2d,
312-
Dimensions::Dim2dArray { .. } => ViewType::Dim2dArray,
313-
Dimensions::Dim3d { .. } => ViewType::Dim3d,
314-
Dimensions::Cubemap { .. } => ViewType::Cubemap,
315-
Dimensions::CubemapArray { .. } => ViewType::CubemapArray,
309+
Dimensions::Dim1d { .. } => ViewType::Dim1d,
310+
Dimensions::Dim1dArray { .. } => ViewType::Dim1dArray,
311+
Dimensions::Dim2d { .. } => ViewType::Dim2d,
312+
Dimensions::Dim2dArray { .. } => ViewType::Dim2dArray,
313+
Dimensions::Dim3d { .. } => ViewType::Dim3d,
314+
Dimensions::Cubemap { .. } => ViewType::Cubemap,
315+
Dimensions::CubemapArray { .. } => ViewType::CubemapArray,
316316
}
317317
}
318318

Diff for: vulkano/src/instance/limits.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ macro_rules! limits_impl {
2626
limits
2727
}
2828
}
29-
29+
3030
$(
3131
#[inline]
3232
pub fn $name(&self) -> $t {

Diff for: vulkano/src/pipeline/graphics_pipeline/tests.rs

-1
Original file line numberDiff line numberDiff line change
@@ -342,4 +342,3 @@ const BASIC_FS: [u8; 420] = [3, 2, 35, 7, 0, 0, 1, 0, 1, 0, 8, 0, 13, 0, 0, 0, 0
342342
5, 0, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 248, 0, 2,
343343
0, 5, 0, 0, 0, 62, 0, 3, 0, 9, 0, 0, 0, 12, 0, 0, 0, 253, 0, 1,
344344
0, 56, 0, 1, 0];
345-

Diff for: vulkano/src/swapchain/swapchain.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@ unsafe impl<P, W> GpuFuture for PresentFuture<P, W>
10201020
// submit the command buffer by flushing previous.
10211021
// Since the implementation should remember being flushed it's safe to call build_submission multiple times
10221022
self.previous.flush()?;
1023-
1023+
10241024
let mut builder = SubmitPresentBuilder::new();
10251025
builder.add_swapchain(&self.swapchain,
10261026
self.image_id as u32,

0 commit comments

Comments
 (0)