missing depth_stencil on SimpleGraphicsPipelineDesc causes crashes
btrepp opened this issue · 4 comments
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)
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.
Surely assertion should have a message that would explain this
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 :).
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.