Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing depth_stencil on SimpleGraphicsPipelineDesc causes crashes #279

Open
btrepp opened this issue Jun 25, 2020 · 4 comments
Open

missing depth_stencil on SimpleGraphicsPipelineDesc causes crashes #279

btrepp opened this issue Jun 25, 2020 · 4 comments

Comments

@btrepp
Copy link

btrepp commented Jun 25, 2020

This took me awhile to figure out when copying the triangle example and working on it my own.

It seems if you omit

    fn depth_stencil(&self) -> Option<hal::pso::DepthStencilDesc> {
        None
    }

In the pipeline desc, you get a perplexing error

thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `true`,
 right: `false`',

Which even with full stack traces is hard to track down.

This is with rendy 0.5.1 (note: had to tweak winit code, as the triangle example on release-0.5.1 doesn't seem to compile)

@zakarumych
Copy link
Member

You have an assertion failed for good reason.
Removing this method override results in default one being called. As you can see default method implementation reports usage of depth buffer. Which means that you must provide one. But there is no depth-stencil attachment index in the subpass.

@zakarumych
Copy link
Member

Surely assertion should have a message that would explain this

@btrepp
Copy link
Author

btrepp commented Jun 25, 2020

Yeah makes sense that somehow I'm missing something, good enough ergonomics would just be a nicer panic message.
With that left/right assert, I struggle to even find where in the rendy source it's being thrown :).

@zakarumych
Copy link
Member

Yeap. I will leave this issue open to not forget improving this assert.

In any case you get exact file and line in the backtrace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants