Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[WIP, alpha] hal #463
Conversation
torkleyy
reviewed
Oct 27, 2017
A few comments, it's a bit hard to review since you can't see what the actual changes are. I'm gonna clone the branch myself later and create a diff so I can review it better.
| +repository = "https://github.com/amethyst/amethyst" | ||
| + | ||
| +readme = "README.md" | ||
| +license = "MIT OR Apache-2.0" |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| @@ -0,0 +1,39 @@ | ||
| + | ||
| +#[cfg(feature = "metal")] |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 27, 2017
Member
Shouldn't we at some point allow to dynamically choose the backend? I think for an actual game it's preferable to have one binary which supports all the backends.
torkleyy
Oct 27, 2017
Member
Shouldn't we at some point allow to dynamically choose the backend? I think for an actual game it's preferable to have one binary which supports all the backends.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| + | ||
| +use back::*; | ||
| + | ||
| +error_chain! { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 27, 2017
Member
error_chain! source today and I think it's something I want to have in Amethyst.
torkleyy
Oct 27, 2017
Member
error_chain! source today and I think it's something I want to have in Amethyst.
| +} | ||
| + | ||
| + | ||
| +/// This allocator is do dumb it can't even free memory |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +impl DumbAllocator { | ||
| + pub fn new() -> Self { | ||
| + DumbAllocator { | ||
| + granularity: 268_435_456, // 256 MB |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| @@ -0,0 +1,2 @@ | ||
| +reorder_imported_names = true | ||
| +take_source_hints = true |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I'll make it easier to view changes. |
| categories = ["rendering", "rendering::engine"] | ||
| -documentation = "https://www.amethyst.rs/doc/master/amethyst_renderer/" | ||
| +documentation = "https://docs.rs/amethyst_renderer/0.1.0/amethyst_renderer/" |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 27, 2017
Member
Is it a good thing to change this? Especially locking the version isn't a good thing IMO.
torkleyy
Oct 27, 2017
Member
Is it a good thing to change this? Especially locking the version isn't a good thing IMO.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Oct 27, 2017
Member
I think https://docs.rs/amethyst_renderer will be ideal. It will redirect to newest version automatically
omni-viral
Oct 27, 2017
•
Member
I think https://docs.rs/amethyst_renderer will be ideal. It will redirect to newest version automatically
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| - | ||
| -pub mod error; | ||
| +pub mod cam; | ||
| +pub mod mesh; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 27, 2017
Member
Why are you removing all my imports? Could we please leave the crate structure flat?
torkleyy
Oct 27, 2017
Member
Why are you removing all my imports? Could we please leave the crate structure flat?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Oct 27, 2017
Member
This file was written from scratch. I'll add everything required later.
omni-viral
Oct 27, 2017
•
Member
This file was written from scratch. I'll add everything required later.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 27, 2017
Member
Okay. Please just make the modules private and reexport everything if that's possible.
torkleyy
Oct 27, 2017
Member
Okay. Please just make the modules private and reexport everything if that's possible.
| + } | ||
| +} | ||
| + | ||
| +impl From<OutOfMemory> for Error { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Oct 27, 2017
Member
OutOfMemory isn't Error
links are for other error-chains. For non-chain errors there is foreign_links. But it still required to implement Error
omni-viral
Oct 27, 2017
Member
OutOfMemory isn't Error
links are for other error-chains. For non-chain errors there is foreign_links. But it still required to implement Error
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 28, 2017
Member
It would be really nice if you could just change what's absolutely necessary, because I don't want to end up with a renderer rewrite 2.0 that rewrites the whole engine (and blocks everything else). If there are things you need to change which don't have anything to do with the internals of the renderer crate, please create another PR if possible.
|
It would be really nice if you could just change what's absolutely necessary, because I don't want to end up with a renderer rewrite 2.0 that rewrites the whole engine (and blocks everything else). If there are things you need to change which don't have anything to do with the internals of the renderer crate, please create another PR if possible. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Oct 28, 2017
Member
I think the renderer is gonna be mostly rewritten, because hal is such a big change it's kind of required.
|
I think the renderer is gonna be mostly rewritten, because hal is such a big change it's kind of required. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 28, 2017
Member
True, but if you had seen the previous renderer rewrite you'd know what I mean. It did change the whole crate, not just the renderer.
|
True, but if you had seen the previous renderer rewrite you'd know what I mean. It did change the whole crate, not just the renderer. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Oh I saw, and shuddered :) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Oct 28, 2017
Member
@torkleyy I try to make render API to look mostly the same.
And I'm going to simplify things where possible
All sophisticated unsafe magic will be hidden inside renderer.
|
@torkleyy I try to make render API to look mostly the same. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Oct 28, 2017
Member
This one probably won't be as bad because of how well we've separated out our crates. The last renderer rewrite was functionally a rewrite of the whole project, this one isn't.
|
This one probably won't be as bad because of how well we've separated out our crates. The last renderer rewrite was functionally a rewrite of the whole project, this one isn't. |
Aceeri
added
project: rendering
status: working
type: improvement
labels
Oct 31, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 11, 2017
Member
I'm really happy to see this PR making progress, keep up the good work @omni-viral!
|
I'm really happy to see this PR making progress, keep up the good work @omni-viral! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
THIS IS AWESOME!! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 21, 2017
Member
I'm very confident I can review this in December, in case you didn't already merge it then.
|
I'm very confident I can review this in December, in case you didn't already merge it then. |
Xaeroxe
approved these changes
Nov 22, 2017
I like it a lot! Much simplified. A large PR mandates a large review, so here's 19 review comments for you :P
| +//! Pass tells renderer how to convert inputs to image. | ||
| +//! | ||
| +//! # Definition | ||
| +//! Pass - is a box which get some: |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Nov 22, 2017
Member
Might be better to use:
Pass is a trait that takes these inputs
...
...
and provides these outputs:
...
...
Xaeroxe
Nov 22, 2017
Member
Might be better to use:
Pass is a trait that takes these inputs
...
...
and provides these outputs:
...
...
| +//! * Push constants | ||
| +//! * Outputs | ||
| +//! * Attachments | ||
| +//! * Results of queries (Let's forget about it for now) |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +//! | ||
| +//! But it gets executed on the GPU. | ||
| +//! So instead of writing it as a function and calling with arguments needed | ||
| +//! we have to record commands into buffers and send them to the GPU. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Nov 22, 2017
Member
This isn't 100% true as some passes like UI are pretty CPU driven (out of necessity). I think a more accurate way to describe this might be
The pass prepares and sends data to GPU shader buffers, the shaders will then process the data.
Xaeroxe
Nov 22, 2017
Member
This isn't 100% true as some passes like UI are pretty CPU driven (out of necessity). I think a more accurate way to describe this might be
The pass prepares and sends data to GPU shader buffers, the shaders will then process the data.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +//! So instead of writing it as a function and calling with arguments needed | ||
| +//! we have to record commands into buffers and send them to the GPU. | ||
| +//! | ||
| +//! We want a way to define a box which will record all necessarry commands in declarative fasion. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +//! | ||
| +//! We want a way to define a box which will record all necessarry commands in declarative fasion. | ||
| +//! In order to feed this box with data we also need define `World -> [Input]` conversion | ||
| +//! (in declarative fasion where possible). |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| + | ||
| +use back::*; | ||
| + | ||
| +pub enum StagingBuffer { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Nov 22, 2017
Member
What's this for? The line bringing this module in is commented out so should we just get rid of this file?
Xaeroxe
Nov 22, 2017
Member
What's this for? The line bringing this module in is commented out so should we just get rid of this file?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +} | ||
| +unsafe impl Pod for Color {} | ||
| +impl Attribute for Color { | ||
| + const NAME: &'static str = "1_color"; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 23, 2017
Member
Attribute values (name + format) should be in strict order. Forcing it with name prefix was fast fix. It'll go away.
omni-viral
Nov 23, 2017
Member
Attribute values (name + format) should be in strict order. Forcing it with name prefix was fast fix. It'll go away.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 23, 2017
Member
The order is Position -> Color -> Normal -> Tangent -> TexCoord.
Buffers can only contain those attributes in sorted order. And Mesh has to contain Buffers in sorted order. Why? To bind mesh for O(n + k) insted of O(n*k).
omni-viral
Nov 23, 2017
Member
The order is Position -> Color -> Normal -> Tangent -> TexCoord.
Buffers can only contain those attributes in sorted order. And Mesh has to contain Buffers in sorted order. Why? To bind mesh for O(n + k) insted of O(n*k).
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 23, 2017
Member
Then maybe it would be better to have a separate constant for the order?
torkleyy
Nov 23, 2017
Member
Then maybe it would be better to have a separate constant for the order?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +} | ||
| +unsafe impl Pod for Normal {} | ||
| +impl Attribute for Normal { | ||
| + const NAME: &'static str = "2_normal"; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +} | ||
| +unsafe impl Pod for Tangent {} | ||
| +impl Attribute for Tangent { | ||
| + const NAME: &'static str = "3_tangent"; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| +} | ||
| +unsafe impl Pod for TexCoord {} | ||
| +impl Attribute for TexCoord { | ||
| + const NAME: &'static str = "4_tex_coord"; |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| + /// Reflects [`Pass::draw`] function | ||
| + /// | ||
| + /// [`Pass::draw`]: trait.Pass.html#tymethod.draw | ||
| + fn draw<'a>(&mut self, cbuf: &mut B::CommandBuffer, world: &'a World); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
kvark
self-assigned this
Nov 26, 2017
This was referenced Nov 27, 2017
omni-viral
changed the title from
[WIP, early, pre-alpha] hal
to
[WIP, alpha] hal
Nov 28, 2017
msiglreith
reviewed
Nov 28, 2017
Wheew, that's quite a large PR. Just a few notes from my side regarding some internal stuff. I haven't looked trough the whole code.
| + swapchain.present(queue, &presents); | ||
| + | ||
| + // Wait defice to finish the work | ||
| + device.wait_for_fences(&[finish], WaitFor::All, !0); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
msiglreith
Nov 28, 2017
Contributor
There should be multiple fences to reduce waiting time on the GPU. Currently it's CPU -> (submit) -> GPU -> (wait) -> CPU. This requires multiple command buffers per frame, etc. The main point is to reduce the time the CPU waits on the GPU to finish processing the currently requested frame. That's a pretty crucial design point imo to achieve good performance.
msiglreith
Nov 28, 2017
Contributor
There should be multiple fences to reduce waiting time on the GPU. Currently it's CPU -> (submit) -> GPU -> (wait) -> CPU. This requires multiple command buffers per frame, etc. The main point is to reduce the time the CPU waits on the GPU to finish processing the currently requested frame. That's a pretty crucial design point imo to achieve good performance.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 28, 2017
Member
What pattern of using fences I should follow?
I was thinking of waiting for fence before rendering next frame instead of after.
I'm not sure if starting rendering next frame before previous is complete is a good idea.
omni-viral
Nov 28, 2017
•
Member
What pattern of using fences I should follow?
I was thinking of waiting for fence before rendering next frame instead of after.
I'm not sure if starting rendering next frame before previous is complete is a good idea.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
msiglreith
Nov 28, 2017
Contributor

I made a small figure which visualizes the issue, I think. The current implementation introduces a stall between GPU-CPU due to the wait for the fence. The general proposal is to buffer a few frames (basically following double/tripple buffering of the swapchain) to give the GPU time to catch up and reducing the waiting time on the fence. In the figure I used frame3 waits unitl frame0 has finished on the GPU and can then re-use data (in particular, command pools, query buffers, etc.) of frame0. The drawback here is that this makes synchronization a bit trickier as fences ensure that objects can be safely accessed again. So, each frame in the chain requires an own command pool for example.
msiglreith
Nov 28, 2017
Contributor

I made a small figure which visualizes the issue, I think. The current implementation introduces a stall between GPU-CPU due to the wait for the fence. The general proposal is to buffer a few frames (basically following double/tripple buffering of the swapchain) to give the GPU time to catch up and reducing the waiting time on the fence. In the figure I used frame3 waits unitl frame0 has finished on the GPU and can then re-use data (in particular, command pools, query buffers, etc.) of frame0. The drawback here is that this makes synchronization a bit trickier as fences ensure that objects can be safely accessed again. So, each frame in the chain requires an own command pool for example.
| + } | ||
| + } | ||
| + | ||
| + pub fn build( |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
msiglreith
Nov 28, 2017
Contributor
The definition of a pass seems quite focused on Vulkan's renderpass concept. If I understand it correctly a pass is defined here as one renderpass with one subpass and pipeline. I would advise a lower level implementation which focuses purely on scheduling tasks and reducing the amount of synchronization handling for users writing rendering code. It might be tricky here to extend the current implementation to support compute and further optimizations.
msiglreith
Nov 28, 2017
Contributor
The definition of a pass seems quite focused on Vulkan's renderpass concept. If I understand it correctly a pass is defined here as one renderpass with one subpass and pipeline. I would advise a lower level implementation which focuses purely on scheduling tasks and reducing the amount of synchronization handling for users writing rendering code. It might be tricky here to extend the current implementation to support compute and further optimizations.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 28, 2017
Member
The concept of Pass is quite abstract here. It's a function-like thing that can have Behavior-like (from FRP) arguments (attachments and buffers) and return Behavior-like result.
What you see in this method is mapping of general concept to RenderPasses.
It's tricky to implement this so I started with simples unoptimized solution. I'll try to make it faster in next iterations.
omni-viral
Nov 28, 2017
•
Member
The concept of Pass is quite abstract here. It's a function-like thing that can have Behavior-like (from FRP) arguments (attachments and buffers) and return Behavior-like result.
What you see in this method is mapping of general concept to RenderPasses.
It's tricky to implement this so I started with simples unoptimized solution. I'll try to make it faster in next iterations.
| + let descriptor_set_layout = device.create_descriptor_set_layout(pass.bindings()); | ||
| + | ||
| + // Create `PipelineLayout` from single `DescriptorSetLayout` | ||
| + let pipeline_layout = device.create_pipeline_layout(&[&descriptor_set_layout]); |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
msiglreith
Nov 28, 2017
Contributor
Pipeline layouts and pipelines are not necessarily strongly-coupled. A pipeline layout can be compatible with multiple pipelines. Switching (non-compatible) pipeline layouts introduces costs due to rebinding descriptor sets and push constants.
msiglreith
Nov 28, 2017
Contributor
Pipeline layouts and pipelines are not necessarily strongly-coupled. A pipeline layout can be compatible with multiple pipelines. Switching (non-compatible) pipeline layouts introduces costs due to rebinding descriptor sets and push constants.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 28, 2017
Member
But how often different pipelines can share pipeline layout?
Doesn't pipeline layout defines bindigs interface of shaders?
How often different shaders share bindings interface?
omni-viral
Nov 28, 2017
•
Member
But how often different pipelines can share pipeline layout?
Doesn't pipeline layout defines bindigs interface of shaders?
How often different shaders share bindings interface?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
msiglreith
Nov 28, 2017
Contributor
Yes, it defines the interface but can be a superset (some sort of 'uberlayout'). There is always a tradeoff between both approaches: minimal pipeline layout vs 'uberlayout'. Which to choose depends on the available pipelines. It might be interesting when having a lot of similar materials with lightly varying pipelines. I would say that expecially latest gen architectures can live with only a few pipeline layouts by using large descriptor sets, only bound once, but I'm not an expert.
msiglreith
Nov 28, 2017
Contributor
Yes, it defines the interface but can be a superset (some sort of 'uberlayout'). There is always a tradeoff between both approaches: minimal pipeline layout vs 'uberlayout'. Which to choose depends on the available pipelines. It might be interesting when having a lot of similar materials with lightly varying pipelines. I would say that expecially latest gen architectures can live with only a few pipeline layouts by using large descriptor sets, only bound once, but I'm not an expert.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 28, 2017
Member
This makes sense but I'd like to hide such details from user. So I need to magically create super-layout for few consecutive passes.
omni-viral
Nov 28, 2017
•
Member
This makes sense but I'd like to hide such details from user. So I need to magically create super-layout for few consecutive passes.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
Reviewed 4 of 17 files at r1, 5 of 18 files at r2, 2 of 20 files at r3, 1 of 6 files at r5, 2 of 24 files at r6.
Review status: 13 of 34 files reviewed at latest revision, 34 unresolved discussions, some commit checks failed.
amethyst_renderer_new/Cargo.toml, line 15 at r7 (raw file):
readme = "README.md" license = "MIT OR Apache-2.0"
Should be "MIT/Apache-2.0"
amethyst_renderer_new/Cargo.toml, line 27 at r7 (raw file):
[dependencies] amethyst_core = { path = "../amethyst_core" }
Don't forget to specify versions here.
amethyst_renderer_new/rustfmt.toml, line 1 at r7 (raw file):
reorder_imported_names = true
Do we really need one config per crate?
amethyst_renderer_new/src/relevant.rs, line 2 at r7 (raw file):
/// Type that can't be silently dropped.
Types don't get dropped.
amethyst_renderer_new/src/relevant.rs, line 4 at r7 (raw file):
/// Type that can't be silently dropped. /// If structure has field with type `Relevant` /// than this structure can't be silently dropped either.
"than" should be "then", but I'd probably rewrite the sentence as "If a structure has a Disposable value, it can't be automatically dropped either."
amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file):
/// #[derive(Clone, Debug, PartialOrd, PartialEq, Ord, Eq, Hash)] pub struct Relevant;
Rename to Disposable?
amethyst_renderer_new/src/relevant.rs, line 23 at r7 (raw file):
impl Drop for Relevant { fn drop(&mut self) { panic!("This type can't be dropped")
This really isn't something I want the user to deal with, I hope we can keep this fully internal.
amethyst_renderer_new/src/utils.rs, line 4 at r7 (raw file):
#[inline(always)] pub fn is_slice_sorted<T>(slice: &[T]) -> bool
This seems very expensive for what it's doing. I don't know where it's used, but if it's necessary I'd recommend to just check if x_n < x_n+1 holds for every n from 0 to len - 2.
amethyst_renderer_new/src/utils.rs, line 14 at r7 (raw file):
#[inline(always)] pub fn is_slice_sorted_by_key<T, K, F>(slice: &[T], f: F) -> bool
Same as above.
examples/hal/hal.vert, line 2 at r7 (raw file):
#version 450 core #extension GL_ARB_separate_shader_objects : enable
Is this something we should recommend for all shaders until there is a good shading solution (cross-API, eventually in Rust) available?
examples/hal/main.rs, line 37 at r7 (raw file):
use renderer::vertex::PosColor; fn main() {
How much of this low-level code will the user need to set up a basic game in the final iteration?
Comments from Reviewable
|
Reviewed 4 of 17 files at r1, 5 of 18 files at r2, 2 of 20 files at r3, 1 of 6 files at r5, 2 of 24 files at r6. amethyst_renderer_new/Cargo.toml, line 15 at r7 (raw file):
Should be "MIT/Apache-2.0" amethyst_renderer_new/Cargo.toml, line 27 at r7 (raw file):
Don't forget to specify versions here. amethyst_renderer_new/rustfmt.toml, line 1 at r7 (raw file):
Do we really need one config per crate? amethyst_renderer_new/src/relevant.rs, line 2 at r7 (raw file):
Types don't get dropped. amethyst_renderer_new/src/relevant.rs, line 4 at r7 (raw file):
"than" should be "then", but I'd probably rewrite the sentence as "If a structure has a amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file):
Rename to amethyst_renderer_new/src/relevant.rs, line 23 at r7 (raw file):
This really isn't something I want the user to deal with, I hope we can keep this fully internal. amethyst_renderer_new/src/utils.rs, line 4 at r7 (raw file):
This seems very expensive for what it's doing. I don't know where it's used, but if it's necessary I'd recommend to just check if amethyst_renderer_new/src/utils.rs, line 14 at r7 (raw file):
Same as above. examples/hal/hal.vert, line 2 at r7 (raw file):
Is this something we should recommend for all shaders until there is a good shading solution (cross-API, eventually in Rust) available? examples/hal/main.rs, line 37 at r7 (raw file):
How much of this low-level code will the user need to set up a basic game in the final iteration? Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
So I've reviewed the easy files now so that I can concentrate on the other stuff. Is there some strategy you'd recommend for reviewing? Or some high-level overview that would make it easier?
FYI, I reviewed on https://reviewable.io, so it's probably easier to respond there.
|
So I've reviewed the easy files now so that I can concentrate on the other stuff. Is there some strategy you'd recommend for reviewing? Or some high-level overview that would make it easier? FYI, I reviewed on https://reviewable.io, so it's probably easier to respond there. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 29, 2017
Member
Review status: 13 of 34 files reviewed at latest revision, 34 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/utils.rs, line 4 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
This seems very expensive for what it's doing. I don't know where it's used, but if it's necessary I'd recommend to just check if
x_n < x_n+1holds for every n from 0 to len - 2.
This is very expensive of large N. But used only in debug_assert! for really small slices.
But I agree that it should be optimized to be O(n).
examples/hal/hal.vert, line 2 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Is this something we should recommend for all shaders until there is a good shading solution (cross-API, eventually in Rust) available?
I have no opinion on that yet.
examples/hal/main.rs, line 37 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
How much of this low-level code will the user need to set up a basic game in the final iteration?
None.
The user will fill configuration structure (or even deserialize it) and call build.
Comments from Reviewable
|
Review status: 13 of 34 files reviewed at latest revision, 34 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/utils.rs, line 4 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
This is very expensive of large N. But used only in examples/hal/hal.vert, line 2 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I have no opinion on that yet. examples/hal/main.rs, line 37 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
None. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
https://reviewable.io is so slow on my laptop. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 29, 2017
Member
Review status: 13 of 34 files reviewed at latest revision, 34 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Rename to
Disposable?
The name comes from here
amethyst_renderer_new/src/relevant.rs, line 23 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
This really isn't something I want the user to deal with, I hope we can keep this fully internal.
All higher-level types with Relevant values inside will do magic tricks in their Drop implementation to make user's life easier. But at cost in runtime.
For example Mesh can send Buffers back to the allocator over shared mpsc if user doesn't do that manually.
It adds some overhead but leaves user with a choice.
Comments from Reviewable
|
Review status: 13 of 34 files reviewed at latest revision, 34 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
The name comes from here amethyst_renderer_new/src/relevant.rs, line 23 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
All higher-level types with Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
@omni-viral It's slow for you? On my laptop it's faster than GH. For such a large PR you should just ensure you're using single-file mode.
|
@omni-viral It's slow for you? On my laptop it's faster than GH. For such a large PR you should just ensure you're using single-file mode. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
Review status: 13 of 34 files reviewed at latest revision, 32 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file):
Previously, omni-viral (Zakarum) wrote…
The name comes from here
At least the name isn't very obvious for me, but maybe it's more known to other people.
amethyst_renderer_new/src/graph/pass.rs, line 53 at r2 (raw file):
Previously, omni-viral (Zakarum) wrote…
It vice versa. I want all passes to be
Debugto print messages inside the engine where I only haveBox<AnyPass<B>>.
SoAnyPasshas to beDebug. ButAnyPassis private trait. I can't bound types to it in public methods. Instead public methods hasPassbound andAnyPassis implemented for allPasses. ButPassneedsDebugbound in order to implementAnyPassfor all types that implementsPass.Have no idea if someone could actually understand what I was trying to say here
😄
I did :)
Comments from Reviewable
|
Review status: 13 of 34 files reviewed at latest revision, 32 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/relevant.rs, line 12 at r7 (raw file): Previously, omni-viral (Zakarum) wrote…
At least the name isn't very obvious for me, but maybe it's more known to other people. amethyst_renderer_new/src/graph/pass.rs, line 53 at r2 (raw file): Previously, omni-viral (Zakarum) wrote…
I did :) Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
Reviewed 1 of 18 files at r2, 3 of 20 files at r3, 10 of 24 files at r6, 8 of 12 files at r7.
Review status: 30 of 34 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/epoch.rs, line 9 at r7 (raw file):
use relevant::Relevant; /// Epoch identifier.
Missing usage example / overview.
amethyst_renderer_new/src/epoch.rs, line 109 at r7 (raw file):
/// Make all new `Ec` from this to be valid /// until specifyed `Epoch` expired
specified
amethyst_renderer_new/src/epoch.rs, line 159 at r7 (raw file):
} pub struct DeletionQueue<T> {
Missing docs
amethyst_renderer_new/src/hal.rs, line 132 at r7 (raw file):
adapter: Adapter<B>, ) -> (B::Device, Factory<B>, CommandCenter<B>) { println!("Try adapter: {:?}", adapter.info);
Yet again, we should really set up logging.
amethyst_renderer_new/src/mesh.rs, line 25 at r7 (raw file):
errors { Incompatible { description("Incompatible"),
I don't think that this is any more descriptive than the defaults.
amethyst_renderer_new/src/mesh.rs, line 562 at r7 (raw file):
vertex.0.push((&self.vbufs[index].buffer, 0)); last = index; assert!(vertex_count == None || vertex_count == Some(self.vbufs[index].len));
nit: should be is_none
amethyst_renderer_new/src/mesh.rs, line 566 at r7 (raw file):
} else { // Can't bind return Err(ErrorKind::Incompatible.into());
Can't you use bail! here? Or is that for string errors only?
amethyst_renderer_new/src/shaders.rs, line 247 at r7 (raw file):
use std::fs::File; use std::io::Read; let mut file = File::open(path).chain_err(|| {
Only allowing shaders to be stored as a file is too restrictive.
amethyst_renderer_new/src/memory/mod.rs, line 160 at r7 (raw file):
/// Returns tag value. /// This is unsafe as the caller must ensure that /// memory was freed
This is unclear.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
unsafe { forget(vec); Vec::from_raw_parts(p as *mut Y, (s * tsize) / ysize, (c * tsize) / ysize)
As far as I know, this is currently unspecified behavior in Rust. That means it works, but it's not guaranteed that it's supported by all Rust compilers in the future.
Comments from Reviewable
|
Reviewed 1 of 18 files at r2, 3 of 20 files at r3, 10 of 24 files at r6, 8 of 12 files at r7. amethyst_renderer_new/src/epoch.rs, line 9 at r7 (raw file):
Missing usage example / overview. amethyst_renderer_new/src/epoch.rs, line 109 at r7 (raw file):
specified amethyst_renderer_new/src/epoch.rs, line 159 at r7 (raw file):
Missing docs amethyst_renderer_new/src/hal.rs, line 132 at r7 (raw file):
Yet again, we should really set up logging. amethyst_renderer_new/src/mesh.rs, line 25 at r7 (raw file):
I don't think that this is any more descriptive than the defaults. amethyst_renderer_new/src/mesh.rs, line 562 at r7 (raw file):
nit: should be amethyst_renderer_new/src/mesh.rs, line 566 at r7 (raw file):
Can't you use amethyst_renderer_new/src/shaders.rs, line 247 at r7 (raw file):
Only allowing shaders to be stored as a file is too restrictive. amethyst_renderer_new/src/memory/mod.rs, line 160 at r7 (raw file):
This is unclear. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
As far as I know, this is currently unspecified behavior in Rust. That means it works, but it's not guaranteed that it's supported by all Rust compilers in the future. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 29, 2017
Member
@omni-viral What I've seen so far looks great, but it's lacking documentation both for important details and as overview.
|
@omni-viral What I've seen so far looks great, but it's lacking documentation both for important details and as overview. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
That's where I could use some help |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 30, 2017
Member
Thing is my own overview isn't complete yet, but it's a requirement for providing a good review.
|
Thing is my own overview isn't complete yet, but it's a requirement for providing a good review. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 30, 2017
Member
Review status: 13 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/mesh.rs, line 25 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
I don't think that this is any more descriptive than the defaults.
There are defaults?
amethyst_renderer_new/src/mesh.rs, line 566 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Can't you use
bail!here? Or is that for string errors only?
Can. Thanks!
amethyst_renderer_new/src/graph/pass.rs, line 53 at r2 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
I did :)
Phew
amethyst_renderer_new/src/hal/build.rs, line 132 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Yet again, we should really set up logging.
But not in scope of this PR.
If logging will be setup before this PR gets merged I'd replace print-logging with proper one.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
As far as I know, this is currently unspecified behavior in Rust. That means it works, but it's not guaranteed that it's supported by all Rust compilers in the future.
I'm not sure how rustc can be changed so this will be broken.
If you are against this code you should also be against gfx_hal::memory::cast_slice.
Or your only concern is that it is Vec and it's totally OK for slices?
In that case I can replace Vec<T> with Box<[T]>
amethyst_renderer_new/rustfmt.toml, line 1 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Do we really need one config per crate?
Nope.
Comments from Reviewable
|
Review status: 13 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/mesh.rs, line 25 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
There are defaults? amethyst_renderer_new/src/mesh.rs, line 566 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Can. Thanks! amethyst_renderer_new/src/graph/pass.rs, line 53 at r2 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Phew amethyst_renderer_new/src/hal/build.rs, line 132 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
But not in scope of this PR. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I'm not sure how rustc can be changed so this will be broken. amethyst_renderer_new/rustfmt.toml, line 1 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Nope. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Nov 30, 2017
Member
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Previously, omni-viral (Zakarum) wrote…
I'm not sure how rustc can be changed so this will be broken.
If you are against this code you should also be againstgfx_hal::memory::cast_slice.
Or your only concern is that it isVecand it's totally OK for slices?
In that case I can replaceVec<T>withBox<[T]>
At the very least the cast_pod_vec function should be marked as unsafe, as this could cause wild behavior. Not all representations of Pod types are valid representations of other Pod types. I actually think this specific line is probably OK though as vectors are guaranteed to form contiguous data. This is effectively a mass transmute though, which is very unsafe.
Comments from Reviewable
|
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file): Previously, omni-viral (Zakarum) wrote…
At the very least the cast_pod_vec function should be marked as unsafe, as this could cause wild behavior. Not all representations of Pod types are valid representations of other Pod types. I actually think this specific line is probably OK though as vectors are guaranteed to form contiguous data. This is effectively a mass transmute though, which is very unsafe. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 30, 2017
Member
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Not all representations of Pod types are valid representations of other Pod types
T: Pod means that any bit sequence of appropriate size is valid T
Comments from Reviewable
|
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 30, 2017
Member
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Previously, omni-viral (Zakarum) wrote…
Not all representations of Pod types are valid representations of other Pod types
T: Podmeans that any bit sequence of appropriate size is validT
And this function ensures size and alignment restriction also.
That's why I consider it safe.
Comments from Reviewable
|
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file): Previously, omni-viral (Zakarum) wrote…
And this function ensures size and alignment restriction also. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Nov 30, 2017
Member
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
you should also be against
I guess I am.
I'm not sure how rustc can be changed so this will be broken.
This is not limited to rustc: e.g. GCC Rust could force strict aliasing.
I actually think this specific line is probably OK
Sorry, I don't think that helps.
That's why I consider it safe.
You'd be surprised how much undefined behavior there is in languages like C and some of them are still there for unsafe Rust code. And while this code currently works, it's not something one should rely on because it's unspecified.
Comments from Reviewable
|
Review status: 12 of 35 files reviewed at latest revision, 42 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
I guess I am.
This is not limited to rustc: e.g. GCC Rust could force strict aliasing.
Sorry, I don't think that helps.
You'd be surprised how much undefined behavior there is in languages like C and some of them are still there for Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Nov 30, 2017
Member
Review status: 12 of 35 files reviewed at latest revision, 39 unresolved discussions, some commit checks failed.
amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
you should also be against
I guess I am.
I'm not sure how rustc can be changed so this will be broken.
This is not limited to rustc: e.g. GCC Rust could force strict aliasing.
I actually think this specific line is probably OK
Sorry, I don't think that helps.
That's why I consider it safe.
You'd be surprised how much undefined behavior there is in languages like C and some of them are still there for
unsafeRust code. And while this code currently works, it's not something one should rely on because it's unspecified.
IIRC strict aliasing rules can't hurt you here.
As this function don't dereference pointers. And there is no aliasing before and after it.
gfx_hal::memory::cast_slice is OK with strict aliasing as it used shared references.
So you can't write to one slice and wait that it will affect another.
To see effects from strict aliasing optimizations you'll need convert & into &mut (under unsafe). And there is no wonder you'll have UB.
Comments from Reviewable
|
Review status: 12 of 35 files reviewed at latest revision, 39 unresolved discussions, some commit checks failed. amethyst_renderer_new/src/memory/mod.rs, line 273 at r7 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
IIRC strict aliasing rules can't hurt you here.
Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Dec 12, 2017
Member
Review status: 73 of 80 files reviewed at latest revision, 79 unresolved discussions, some commit checks failed.
amethyst_renderer/src/epoch.rs, line 129 at r13 (raw file):
Previously, kvark (Dzmitry Malyshau) wrote…
"spcified"
Done.
amethyst_renderer/src/vertex.rs, line 357 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
missing tangent
Done.
amethyst_renderer/src/command/mod.rs, line 17 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
When can I have ComputeExecution? :)
Do you need it already? For now you can use GeneralExecution.
amethyst_renderer/src/command/mod.rs, line 93 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
spandon't seem to exist in code below?
Outdated comments. Fixed.
amethyst_renderer/src/graph/build.rs, line 34 at r13 (raw file):
Previously, kvark (Dzmitry Malyshau) wrote…
the type is called
XXXView(single) but it contains a slice of views?
Done.
amethyst_renderer/src/graph/mod.rs, line 307 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
I'm not sure what
singnalis but it sounds like a lot of fun! ;)
There were also some witches. But I drove them away.
I need to install some spellchecker.
examples/hal/flat.rs, line 1 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
We may want to supply some simple passes inside the actual renderer crate for the poor users :)
I think we can supply them in main crate.
But I have no strong opinion on this.
examples/hal/main.rs, line 1 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
Shouldn't this example be inside the renderer crate?
Actually it may be removed when our existing examples will use hal.
src/lib.rs, line 76 at r15 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
Hmm?
Temporary solution
I will uncomment it back once those modules will compile.
Comments from Reviewable
|
Review status: 73 of 80 files reviewed at latest revision, 79 unresolved discussions, some commit checks failed. amethyst_renderer/src/epoch.rs, line 129 at r13 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. amethyst_renderer/src/vertex.rs, line 357 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Done. amethyst_renderer/src/command/mod.rs, line 17 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Do you need it already? For now you can use amethyst_renderer/src/command/mod.rs, line 93 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Outdated comments. Fixed. amethyst_renderer/src/graph/build.rs, line 34 at r13 (raw file): Previously, kvark (Dzmitry Malyshau) wrote…
Done. amethyst_renderer/src/graph/mod.rs, line 307 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
There were also some witches. But I drove them away. examples/hal/flat.rs, line 1 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
I think we can supply them in main crate. examples/hal/main.rs, line 1 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Actually it may be removed when our existing examples will use hal. src/lib.rs, line 76 at r15 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Temporary solution Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 12, 2017
Member
Review status: 73 of 80 files reviewed at latest revision, 73 unresolved discussions, some commit checks failed.
amethyst_renderer/src/cam.rs, line 87 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
What the benefit?
Guarantee we use the same version for core::Transform and for renderer.
amethyst_renderer/src/lib.rs, line 24 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
Either that or user will have to add backends as dependencies with correct versions.
If we will rexport onlygfx_backend_XXX::Backendthe user will have to import backend crate for doing platform specific stuff. Well, maybe the later is appropriate as if user write platform specific code he can import correct dependencies.
Yeah, I don't really understand the use case for having the backend crates reexported.
amethyst_renderer/src/mesh.rs, line 359 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
It may become handy if the origins of the mesh and collision shape (or anything else with origin) will be different.
Possibly, I just don't see it used very often
amethyst_renderer/src/renderer.rs, line 30 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
I's more like builder struct rather than config.
Hmm, ok. I just felt it should be kept close to the Window, because you can't pump events from winit without the Window.
amethyst_renderer/src/system.rs, line 1 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
I'm thinking of moving input and windowing out of renderer responsibility.
Yeah, that would be optimal, but that also means we need to move winit::Window out from the renderer.
amethyst_renderer/src/texture.rs, line 1 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
I'll add it to TODOs.
I think that with new API you can do skinning without placing matrices into texture.
Possibly.
amethyst_renderer/src/command/mod.rs, line 17 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
Do you need it already? For now you can use
GeneralExecution.
Na, it was just Compute is used further down :)
examples/hal/flat.rs, line 1 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
I think we can supply them in main crate.
But I have no strong opinion on this.
Main crate should be kept to minimal imho.
Comments from Reviewable
|
Review status: 73 of 80 files reviewed at latest revision, 73 unresolved discussions, some commit checks failed. amethyst_renderer/src/cam.rs, line 87 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Guarantee we use the same version for core::Transform and for renderer. amethyst_renderer/src/lib.rs, line 24 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Yeah, I don't really understand the use case for having the backend crates reexported. amethyst_renderer/src/mesh.rs, line 359 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Possibly, I just don't see it used very often amethyst_renderer/src/renderer.rs, line 30 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Hmm, ok. I just felt it should be kept close to the Window, because you can't pump events from winit without the Window. amethyst_renderer/src/system.rs, line 1 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Yeah, that would be optimal, but that also means we need to move amethyst_renderer/src/texture.rs, line 1 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Possibly. amethyst_renderer/src/command/mod.rs, line 17 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Na, it was just Compute is used further down :) examples/hal/flat.rs, line 1 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
Main crate should be kept to minimal imho. Comments from Reviewable |
omni-viral
changed the base branch from
develop
to
feature/hal-integration
Dec 17, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 1 of 33 files at r3, 5 of 39 files at r6, 2 of 31 files at r11, 7 of 107 files at r15, 7 of 36 files at r16.
Review status: 57 of 84 files reviewed at latest revision, 73 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 1 of 33 files at r3, 5 of 39 files at r6, 2 of 31 files at r11, 7 of 107 files at r15, 7 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 1 of 107 files at r15, 1 of 36 files at r16.
Review status: 58 of 84 files reviewed at latest revision, 73 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 1 of 107 files at r15, 1 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 1 of 64 files at r13, 2 of 107 files at r15, 11 of 36 files at r16.
Review status: 69 of 84 files reviewed at latest revision, 72 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 1 of 64 files at r13, 2 of 107 files at r15, 11 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 4 of 107 files at r15, 5 of 36 files at r16.
Review status: 74 of 84 files reviewed at latest revision, 72 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 4 of 107 files at r15, 5 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 1 of 107 files at r15, 2 of 36 files at r16.
Review status: 76 of 84 files reviewed at latest revision, 72 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 1 of 107 files at r15, 2 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 1 of 31 files at r11, 7 of 107 files at r15, 10 of 36 files at r16.
Review status: all files reviewed at latest revision, 71 unresolved discussions, some commit checks failed.
Comments from Reviewable
|
Reviewed 1 of 31 files at r11, 7 of 107 files at r15, 10 of 36 files at r16. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 17, 2017
Member
Reviewed 3 of 39 files at r6, 2 of 31 files at r11, 7 of 107 files at r15, 11 of 11 files at r17.
Review status: all files reviewed at latest revision, 72 unresolved discussions.
Cargo.toml, line 106 at r17 (raw file):
name = "pong_tutorial_02" path = "examples/pong_tutorial_02/main.rs" name = "hal"
This looks broken.
Comments from Reviewable
|
Reviewed 3 of 39 files at r6, 2 of 31 files at r11, 7 of 107 files at r15, 11 of 11 files at r17. Cargo.toml, line 106 at r17 (raw file):
This looks broken. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Dec 17, 2017
Member
Review status: 84 of 85 files reviewed at latest revision, 72 unresolved discussions.
Cargo.toml, line 106 at r17 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
This looks broken.
Done.
Comments from Reviewable
|
Review status: 84 of 85 files reviewed at latest revision, 72 unresolved discussions. Cargo.toml, line 106 at r17 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Done. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 19, 2017
Member
Reviewed 1 of 1 files at r18.
Review status: all files reviewed at latest revision, 71 unresolved discussions.
Comments from Reviewable
|
Reviewed 1 of 1 files at r18. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 21, 2017
Member
Reviewed 2 of 31 files at r11, 10 of 108 files at r15, 2 of 37 files at r16, 18 of 18 files at r19.
Review status: all files reviewed at latest revision, 75 unresolved discussions.
amethyst_renderer/src/cirque.rs, line 32 at r19 (raw file):
} pub fn get(&mut self, span: Range<Epoch>) -> Option<CirqueRef<T>> {
Some documentation would be good here, describing the invariants of this function. I'm unsure if the first check is correct.
amethyst_renderer/src/cirque.rs, line 49 at r19 (raw file):
} pub fn get_or_try_insert<F, E>(&mut self, span: Range<Epoch>, mut f: F) -> Result<CirqueRef<T>, E>
Same as above.
amethyst_renderer/src/epoch.rs, line 84 at r19 (raw file):
or >= ?
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file):
#[inline] pub unsafe fn get_unsafe<'a>(&self, until: Epoch) -> Option<&'a T> { if self.valid_until >= until {
This differs from the valid_until function above. Is that intentional?
Comments from Reviewable
|
Reviewed 2 of 31 files at r11, 10 of 108 files at r15, 2 of 37 files at r16, 18 of 18 files at r19. amethyst_renderer/src/cirque.rs, line 32 at r19 (raw file):
Some documentation would be good here, describing the invariants of this function. I'm unsure if the first check is correct. amethyst_renderer/src/cirque.rs, line 49 at r19 (raw file):
Same as above. amethyst_renderer/src/epoch.rs, line 84 at r19 (raw file):
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file):
This differs from the Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 29, 2017
Member
Reviewed 1 of 31 files at r11, 10 of 108 files at r15, 1 of 38 files at r16, 1 of 20 files at r19, 31 of 31 files at r20.
Review status: all files reviewed at latest revision, 74 unresolved discussions.
Comments from Reviewable
|
Reviewed 1 of 31 files at r11, 10 of 108 files at r15, 1 of 38 files at r16, 1 of 20 files at r19, 31 of 31 files at r20. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Dec 29, 2017
Member
Reviewed 2 of 33 files at r12, 1 of 108 files at r15, 3 of 31 files at r20.
Review status: all files reviewed at latest revision, 80 unresolved discussions.
Cargo.toml, line 46 at r20 (raw file):
[dev-dependencies] #amethyst_gltf = { path = "amethyst_gltf", version = "0.1" }
Just marking as unresolved, so we don't forget to fix it.
Cargo.toml, line 47 at r20 (raw file):
[dev-dependencies] #amethyst_gltf = { path = "amethyst_gltf", version = "0.1" } error-chain = "0.11"
Not too related to this PR, but maybe we should be using failure?
amethyst_renderer/src/cirque.rs, line 7 at r20 (raw file):
#[derive(Debug)] pub struct Cirque<T> {
Please add docs what this type is for.
amethyst_renderer/src/cirque.rs, line 18 at r20 (raw file):
} pub fn create<I>(iter: I) -> Self
Please rename to from_iter.
amethyst_renderer/src/cirque.rs, line 35 at r20 (raw file):
if self.values .front() .map(|&(until, _)| until >= span.start)
I also don't understand this check. Please add some comments or docs here.
amethyst_renderer/src/epoch.rs, line 167 at r15 (raw file):
Previously, omni-viral (Zakarum) wrote…
Nope. For
Ehit should beT: Send + Sync. ForEcit's ok.
I agree, please add a Send bound.
amethyst_renderer/src/epoch.rs, line 92 at r20 (raw file):
#[derive(Debug)] pub struct Ec<T> { ptr: *const T,
Cells should be invariant over T I think.
amethyst_renderer/src/epoch.rs, line 125 at r20 (raw file):
/// Returns `Some` if `Ec` hasn't expired yet /// (`CurrentEpoch::now()` is "earlier" than `self.valid_until()`). /// Returns `None` otherwise.
Ah, finally some docs. Nice!
amethyst_renderer/src/epoch.rs, line 141 at r20 (raw file):
/// Returns `None` otherwise. #[inline] pub unsafe fn get_span<'a>(&self, span: Range<Epoch>) -> Option<&'a T> {
This is marked as unsafe, thus needs to document what guarantees the user needs to uphold.
amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
} #[cfg(not(target_pointer_width = "64"))]
Is this a good idea? Can't we support 32-bit?
Comments from Reviewable
|
Reviewed 2 of 33 files at r12, 1 of 108 files at r15, 3 of 31 files at r20. Cargo.toml, line 46 at r20 (raw file):
Just marking as unresolved, so we don't forget to fix it. Cargo.toml, line 47 at r20 (raw file):
Not too related to this PR, but maybe we should be using amethyst_renderer/src/cirque.rs, line 7 at r20 (raw file):
Please add docs what this type is for. amethyst_renderer/src/cirque.rs, line 18 at r20 (raw file):
Please rename to amethyst_renderer/src/cirque.rs, line 35 at r20 (raw file):
I also don't understand this check. Please add some comments or docs here. amethyst_renderer/src/epoch.rs, line 167 at r15 (raw file): Previously, omni-viral (Zakarum) wrote…
I agree, please add a amethyst_renderer/src/epoch.rs, line 92 at r20 (raw file):
Cells should be invariant over amethyst_renderer/src/epoch.rs, line 125 at r20 (raw file):
Ah, finally some docs. Nice! amethyst_renderer/src/epoch.rs, line 141 at r20 (raw file):
This is marked as unsafe, thus needs to document what guarantees the user needs to uphold. amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
Is this a good idea? Can't we support 32-bit? Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Dec 29, 2017
Member
Forget about that note about variance, I just realized it's immutable only, so it should be correct.
|
Forget about that note about variance, I just realized it's immutable only, so it should be correct. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Dec 29, 2017
Member
Review status: all files reviewed at latest revision, 83 unresolved discussions.
amethyst_renderer/src/epoch.rs, line 212 at r20 (raw file):
#[inline] fn dispose(self, current: &CurrentEpoch) -> Result<T, Self> { if self.valid_until.epoch() <= current.now() {
This does not require an atomic operation.
amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file):
fn advance_to(&self, other: Epoch) { let value = other.0 as usize; if self.0.load(Ordering::Relaxed) < value {
Err..we need to acquire a lock here if I'm not completely mistaken. This line can lead to severe memory bugs.
amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file):
let value = other.0 as usize; if self.0.load(Ordering::Relaxed) < value { self.0.store(value as usize, Ordering::Relaxed); // TODO: Use `fetch_add`.
This isn't correct, it can cause a race condition.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 83 unresolved discussions. amethyst_renderer/src/epoch.rs, line 212 at r20 (raw file):
This does not require an atomic operation. amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file):
Err..we need to acquire a lock here if I'm not completely mistaken. This line can lead to severe memory bugs. amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file):
This isn't correct, it can cause a race condition. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Dec 29, 2017
Member
Review status: all files reviewed at latest revision, 83 unresolved discussions.
amethyst_renderer/src/epoch.rs, line 84 at r19 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
or >= ?
valid_until() returns first epoch when value may be invalidated.
Therefore it must be bigger then specified.
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
This differs from the
valid_untilfunction above. Is that intentional?
Yeap.
valid_until is the point in time when it may already be invalid.
span.end is the point in time when it won't be in use.
amethyst_renderer/src/epoch.rs, line 125 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Ah, finally some docs. Nice!
=^_^=
amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Is this a good idea? Can't we support 32-bit?
We should. But it requires AtomicU64 which is only available in nightly.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 83 unresolved discussions. amethyst_renderer/src/epoch.rs, line 84 at r19 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Yeap. amethyst_renderer/src/epoch.rs, line 125 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
=^_^= amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
We should. But it requires Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Dec 29, 2017
Member
Review status: all files reviewed at latest revision, 82 unresolved discussions.
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file):
Previously, omni-viral (Zakarum) wrote…
Yeap.
valid_untilis the point in time when it may already be invalid.
span.endis the point in time when it won't be in use.
Ah that makes sense. Please add this to the documentation above.
amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
Previously, omni-viral (Zakarum) wrote…
We should. But it requires
AtomicU64which is only available in nightly.
Just casting it to a u64 isn't an option? Using AtomicU64 can cause severe performance problems on 32-bit platforms.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 82 unresolved discussions. amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file): Previously, omni-viral (Zakarum) wrote…
Ah that makes sense. Please add this to the documentation above. amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file): Previously, omni-viral (Zakarum) wrote…
Just casting it to a Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 29, 2017
Member
Review status: 80 of 100 files reviewed at latest revision, 81 unresolved discussions.
Cargo.toml, line 47 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Not too related to this PR, but maybe we should be using
failure?
Let's take this as a separate discussion.
amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Ah that makes sense. Please add this to the documentation above.
I agree, documentation is enough then
Comments from Reviewable
|
Review status: 80 of 100 files reviewed at latest revision, 81 unresolved discussions. Cargo.toml, line 47 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Let's take this as a separate discussion. amethyst_renderer/src/epoch.rs, line 138 at r19 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
I agree, documentation is enough then Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 29, 2017
Member
Reviewed 5 of 108 files at r15, 2 of 31 files at r20, 18 of 20 files at r21.
Review status: 98 of 100 files reviewed at latest revision, 83 unresolved discussions.
amethyst_animation/Cargo.toml, line 25 at r21 (raw file):
minterpolate = "0.2" serde = { version = "1.0", features = ["derive"] } specs = { version = "0.10", git = "https://github.com/slide-rs/specs.git" }
Why use the git version?
amethyst_renderer/src/graph/pass.rs, line 114 at r21 (raw file):
/// /// * binding `DescriptorSet`s /// * recording `Graphics` commands to `CommandBuffer`
These docs are identical to draw_inline below, that doesn't seem right?
Comments from Reviewable
|
Reviewed 5 of 108 files at r15, 2 of 31 files at r20, 18 of 20 files at r21. amethyst_animation/Cargo.toml, line 25 at r21 (raw file):
Why use the git version? amethyst_renderer/src/graph/pass.rs, line 114 at r21 (raw file):
These docs are identical to draw_inline below, that doesn't seem right? Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Dec 29, 2017
Member
Reviewed 2 of 108 files at r15, 2 of 20 files at r21.
Review status: all files reviewed at latest revision, 83 unresolved discussions.
Comments from Reviewable
|
Reviewed 2 of 108 files at r15, 2 of 20 files at r21. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Dec 31, 2017
Member
Review status: all files reviewed at latest revision, 83 unresolved discussions.
amethyst_animation/Cargo.toml, line 25 at r21 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
Why use the git version?
Entry API.
amethyst_renderer/src/epoch.rs, line 212 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
This does not require an atomic operation.
This one doesn't
amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Err..we need to acquire a lock here if I'm not completely mistaken. This line can lead to severe memory bugs.
The whole point of using atomics here is to not acquire locks.
Current code works because all parallel advance_to are called with same other argument.
I don't know how to guarantee it yet.
amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
This isn't correct, it can cause a race condition.
It can in general.
amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Just casting it to a
u64isn't an option? UsingAtomicU64can cause severe performance problems on 32-bit platforms.
No. We need to store u64 in counter so that it wouldn't overflow in any reasonable time.
u32 will overflow in days.
u64 won't overflow in millennia.
And we need to perform atomic operations on it.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 83 unresolved discussions. amethyst_animation/Cargo.toml, line 25 at r21 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
Entry API. amethyst_renderer/src/epoch.rs, line 212 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
This one doesn't amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
The whole point of using atomics here is to not acquire locks. amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
It can in general. amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
No. We need to store Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Dec 31, 2017
Member
Review status: all files reviewed at latest revision, 83 unresolved discussions.
amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file):
Previously, omni-viral (Zakarum) wrote…
The whole point of using atomics here is to not acquire locks.
Current code works because all paralleladvance_toare called with sameotherargument.
I don't know how to guarantee it yet.
With locks I was talking about atomics, actually.
amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file):
Previously, omni-viral (Zakarum) wrote…
It can in general.
This doesn't establish any sort of happens-before relation, so how and why do you think it works?
amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file):
Previously, omni-viral (Zakarum) wrote…
No. We need to store
u64in counter so that it wouldn't overflow in any reasonable time.
u32will overflow in days.
u64won't overflow in millennia.
And we need to perform atomic operations on it.
Yeah, I know. Still, it's an alternative.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 83 unresolved discussions. amethyst_renderer/src/epoch.rs, line 315 at r20 (raw file): Previously, omni-viral (Zakarum) wrote…
With locks I was talking about atomics, actually. amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file): Previously, omni-viral (Zakarum) wrote…
This doesn't establish any sort of happens-before relation, so how and why do you think it works? amethyst_renderer/src/epoch.rs, line 325 at r20 (raw file): Previously, omni-viral (Zakarum) wrote…
Yeah, I know. Still, it's an alternative. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Jan 5, 2018
Member
Review status: all files reviewed at latest revision, 82 unresolved discussions.
amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
This doesn't establish any sort of happens-before relation, so how and why do you think it works?
Because Relaxed (Monotonic in LLVM) is enough here.
This atomic operations doesn't need to protect any other memory operation.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 82 unresolved discussions. amethyst_renderer/src/epoch.rs, line 316 at r20 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
Because Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Jan 10, 2018
Member
Reviewed 1 of 31 files at r11, 1 of 33 files at r12, 10 of 108 files at r15, 1 of 20 files at r19, 2 of 31 files at r20, 22 of 22 files at r22.
Review status: all files reviewed at latest revision, 83 unresolved discussions.
amethyst_renderer/src/cirque.rs, line 66 at r22 (raw file):
/// Get constant entry for `span`. /// If queue is not empty - marks the last item in queue to be in use until `span.end` /// and returns mutable reference to it.
I think this should say immutable?
Comments from Reviewable
|
Reviewed 1 of 31 files at r11, 1 of 33 files at r12, 10 of 108 files at r15, 1 of 20 files at r19, 2 of 31 files at r20, 22 of 22 files at r22. amethyst_renderer/src/cirque.rs, line 66 at r22 (raw file):
I think this should say immutable? Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Jan 17, 2018
Member
Reviewed 5 of 39 files at r6, 3 of 31 files at r11, 14 of 108 files at r15, 82 of 82 files at r23.
Review status: all files reviewed at latest revision, 82 unresolved discussions.
Comments from Reviewable
|
Reviewed 5 of 39 files at r6, 3 of 31 files at r11, 14 of 108 files at r15, 82 of 82 files at r23. Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Xaeroxe
Jan 18, 2018
Member
@omni-viral Looks like you have a lot of commits in here merged from prior PRs. Looks like this could use a rebase.
|
@omni-viral Looks like you have a lot of commits in here merged from prior PRs. Looks like this could use a rebase. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Jan 18, 2018
Member
@Xaeroxe indeed. But they aren't merged. I rebased to "develop". But this PR is created against "hal-integration"
|
@Xaeroxe indeed. But they aren't merged. I rebased to "develop". But this PR is created against "hal-integration" |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Jan 18, 2018
Member
Reviewed 2 of 83 files at r23, 2 of 39 files at r24, 2 of 21 files at r25.
Review status: 109 of 146 files reviewed at latest revision, 86 unresolved discussions.
amethyst_core/Cargo.toml, line 21 at r25 (raw file):
error-chain = "0.11" fnv = "1.0" hibitset = { version = "0.4.1" }
No need for an inline table.x
amethyst_core/src/events_pump.rs, line 3 at r25 (raw file):
use shrev::EventChannel;
Does this file belong into this PR? As I've requested before, could you please extract some parts from your PR and create a separate PR that we can merge right now? That would help reviewers of this PR by reducing the number of files and you don't have to rebase if we change files.
amethyst_renderer/Cargo.toml, line 33 at r24 (raw file):
fnv = "1.0" gfx-hal = { version = "0.1.0", features = ["mint", "serde"], path = "/Users/zakarum/pet/gfx/src/hal" } hibitset = { version = "0.4.1" }
No need for an inline table anymore.xxx
amethyst_renderer/Cargo.toml, line 43 at r24 (raw file):
shred = "0.5" specs = { version = "0.10", git = "https://github.com/slide-rs/specs.git" } thread_profiler = { version = "0.1" }
No need for an inline table.
amethyst_renderer/src/camera.rs, line 96 at r25 (raw file):
} impl From<Camera> for [[f32; 4]; 4] {
Why create a From implementation instead of a method?
Comments from Reviewable
|
Reviewed 2 of 83 files at r23, 2 of 39 files at r24, 2 of 21 files at r25. amethyst_core/Cargo.toml, line 21 at r25 (raw file):
No need for an inline table.x amethyst_core/src/events_pump.rs, line 3 at r25 (raw file):
Does this file belong into this PR? As I've requested before, could you please extract some parts from your PR and create a separate PR that we can merge right now? That would help reviewers of this PR by reducing the number of files and you don't have to rebase if we change files. amethyst_renderer/Cargo.toml, line 33 at r24 (raw file):
No need for an inline table anymore.xxx amethyst_renderer/Cargo.toml, line 43 at r24 (raw file):
No need for an inline table. amethyst_renderer/src/camera.rs, line 96 at r25 (raw file):
Why create a Comments from Reviewable |
omni-viral
changed the base branch from
feature/hal-integration
to
develop
Jan 18, 2018
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Jan 19, 2018
Member
Review status: 38 of 99 files reviewed at latest revision, 86 unresolved discussions, some commit checks failed.
amethyst_core/src/events_pump.rs, line 3 at r25 (raw file):
Previously, torkleyy (Thomas Schaller) wrote…
Does this file belong into this PR? As I've requested before, could you please extract some parts from your PR and create a separate PR that we can merge right now? That would help reviewers of this PR by reducing the number of files and you don't have to rebase if we change files.
That would require quite a bit of restructuring of the old renderer unfortunately
Comments from Reviewable
|
Review status: 38 of 99 files reviewed at latest revision, 86 unresolved discussions, some commit checks failed. amethyst_core/src/events_pump.rs, line 3 at r25 (raw file): Previously, torkleyy (Thomas Schaller) wrote…
That would require quite a bit of restructuring of the old renderer unfortunately Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Jan 19, 2018
Member
Reviewed 5 of 40 files at r6, 3 of 31 files at r11, 2 of 67 files at r13, 22 of 111 files at r15, 1 of 22 files at r19, 2 of 32 files at r20, 11 of 39 files at r24, 6 of 21 files at r25, 52 of 52 files at r26.
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed.
amethyst_renderer/src/upload.rs, line 53 at r26 (raw file):
offset: u64, data: D, ) -> Result<Self, ::failure::Error>
If possible, can we use imports instead?
Comments from Reviewable
|
Reviewed 5 of 40 files at r6, 3 of 31 files at r11, 2 of 67 files at r13, 22 of 111 files at r15, 1 of 22 files at r19, 2 of 32 files at r20, 11 of 39 files at r24, 6 of 21 files at r25, 52 of 52 files at r26. amethyst_renderer/src/upload.rs, line 53 at r26 (raw file):
If possible, can we use imports instead? Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Jan 19, 2018
Member
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed.
amethyst_renderer/src/upload.rs, line 53 at r26 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
If possible, can we use imports instead?
I'll try
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed. amethyst_renderer/src/upload.rs, line 53 at r26 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
I'll try Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
omni-viral
Jan 19, 2018
Member
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed.
amethyst_core/src/events_pump.rs, line 3 at r25 (raw file):
Previously, Rhuagh (Simon Rönnberg) wrote…
That would require quite a bit of restructuring of the old renderer unfortunately
You can just not use it with old renderer
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed. amethyst_core/src/events_pump.rs, line 3 at r25 (raw file): Previously, Rhuagh (Simon Rönnberg) wrote…
You can just not use it with old renderer Comments from Reviewable |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Jan 19, 2018
Member
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed.
amethyst_core/src/events_pump.rs, line 3 at r25 (raw file):
Previously, omni-viral (Zakarum) wrote…
You can just not use it with old renderer
😸
Or we use it from the inside the old renderer.
Comments from Reviewable
|
Review status: all files reviewed at latest revision, 87 unresolved discussions, some commit checks failed. amethyst_core/src/events_pump.rs, line 3 at r25 (raw file): Previously, omni-viral (Zakarum) wrote…
Or we use it from the inside the old renderer. Comments from Reviewable |
omni-viral commentedOct 27, 2017
•
edited by Rhuagh
Edited 10 times
-
Rhuagh
edited Jan 18, 2018 (most recent)
-
Rhuagh
edited Jan 18, 2018
-
omni-viral
edited Jan 18, 2018
-
torkleyy
edited Jan 18, 2018
-
omni-viral
edited Jan 18, 2018
-
Rhuagh
edited Nov 30, 2017
-
omni-viral
edited Nov 20, 2017
-
omni-viral
edited Oct 27, 2017
-
omni-viral
edited Oct 27, 2017
-
omni-viral
edited Oct 27, 2017
#Roadmap.
What's left:
This change is