Skip to content

Commit

Permalink
Implement multithreading in voxel-mesh manager, and cleanup.
Browse files Browse the repository at this point in the history
- Disable thin LTO due to rust-lang/rust#81408
- Pin shaderc to 0.7.3 due to linker errors with newer version.
- Update dependencies.
  • Loading branch information
Gohla committed Jan 23, 2022
1 parent a3a2788 commit 018b6e8
Show file tree
Hide file tree
Showing 8 changed files with 157 additions and 106 deletions.
2 changes: 1 addition & 1 deletion .run/FB voxel_meshing -- Standalone-MC.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FB voxel_meshing -- Standalone-MC" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="bench --package voxel_meshing --profile fastbench -- Standalone-MC" />
<option name="command" value="bench --package voxel_meshing --profile=fastbench -- Standalone-MC" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion .run/FB voxel_meshing -- Standalone-Sphere.run.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="FB voxel_meshing -- Standalone-Sphere" type="CargoCommandRunConfiguration" factoryName="Cargo Command">
<option name="command" value="bench --package voxel_meshing --profile fastbench -- Standalone-Sphere" />
<option name="command" value="bench --package voxel_meshing --profile=fastbench -- Standalone-Sphere" />
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
<option name="channel" value="DEFAULT" />
<option name="requiredFeatures" value="false" />
Expand Down
20 changes: 0 additions & 20 deletions .run/RR voxel_meshing.run.xml

This file was deleted.

89 changes: 42 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 25 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ default-members = [
]
resolver = "2"

# Development profile: no debug information, some optimisations.

# Development profile: no debug information, some optimisations. Very low compile-time.
[profile.dev]
opt-level = 2
debug = false
Expand All @@ -29,11 +30,12 @@ overflow-checks = true
debug-assertions = true
incremental = true

# Testing: same as development profile.
# Testing: same as development profile. Very low compile-time.
[profile.test]
inherits = "dev"

# Debug profile: full debug information, no optimisations.

# Debug profile: full debug information, no optimisations. Low compile-time.
[profile.dbg]
inherits = "dev"
opt-level = 0
Expand All @@ -51,7 +53,8 @@ overflow-checks = true
debug-assertions = true
incremental = true

# Release profile: full optimisations, including full LTO.

# Release profile: full optimisations, including full LTO. High compile-time.
[profile.release]
opt-level = 3
debug = false
Expand All @@ -60,18 +63,29 @@ debug-assertions = false
lto = true
panic = "abort"

# Benchmarking profile: full optimisations, including full LTO.
# Fast iteration release profile: full optimisations, but without LTO. Medium compile-time.
[profile.fastrelease]
inherits = "release"
incremental = true
codegen-units = 256
lto = false


# Benchmarking profile = release. High compile-time.
[profile.bench]
inherits = "release"

# Fast benchmarking profile: full optimisations, but with thin LTO and incrementality enabled.
# Fast iteration benchmarking profile = fastrelease. Medium compile-time
[profile.fastbench]
inherits = "release"
incremental = true
codegen-units = 256
lto = "thin"
inherits = "fastrelease"

# Performance profiling profile: full debug information, full optimisations.

# Performance profiling profile = release + debug. High compile-time.
[profile.profile]
inherits = "release"
debug = true

# Fast iteration performance profiling profile = fastrelease + debug. Medium compile-time
[profile.fastprofile]
inherits = "fastrelease"
debug = true
3 changes: 2 additions & 1 deletion core/gfxc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ edition = "2021"
publish = false

[dependencies]
shaderc = "0.7"
shaderc = "=0.7.3"
shaderc-sys = "=0.7.3"
walkdir = "2.3"
Loading

0 comments on commit 018b6e8

Please sign in to comment.