Fix GraphicsPipeline with the new render pass ref system

This commit is contained in:
Pierre Krieger 2016-12-19 12:03:19 +01:00
parent 19b346471f
commit 6153220f76
2 changed files with 6 additions and 6 deletions

View File

@ -473,10 +473,10 @@ unsafe impl<R: ?Sized> RenderPassClearValues<Vec<ClearValue>> for R where R: Ren
}
}
/// Extension trait for `RenderPassRef` that checks whether a subpass of this render pass accepts
/// Extension trait for `RenderPassDesc` that checks whether a subpass of this render pass accepts
/// the output of a fragment shader.
///
/// The trait is automatically implemented for all type that implement `RenderPassRef` and
/// The trait is automatically implemented for all type that implement `RenderPassDesc` and
/// `RenderPassDesc`.
// TODO: once specialization lands, this trait can be specialized for pairs that are known to
// always be compatible

View File

@ -171,7 +171,7 @@ impl<Vdef, Rp> GraphicsPipeline<Vdef, (), Rp>
Fi: ShaderInterfaceDefMatch<Vo>,
Fo: ShaderInterfaceDef,
Vo: ShaderInterfaceDef,
Rp: RenderPassSubpassInterface<Fo>,
Rp::Desc: RenderPassSubpassInterface<Fo>,
{
if let Err(err) = params.fragment_shader.input().matches(params.vertex_shader.output()) {
return Err(GraphicsPipelineCreationError::VertexFragmentStagesMismatch(err));
@ -307,7 +307,7 @@ impl<Vdef, L, Rp> GraphicsPipeline<Vdef, L, Rp>
Gl: PipelineLayoutDescNames,
Tcl: PipelineLayoutDescNames,
Tel: PipelineLayoutDescNames,
Rp: RenderPassSubpassInterface<Fo>,
Rp::Desc: RenderPassSubpassInterface<Fo>,
{
let vk = device.pointers();
@ -344,8 +344,8 @@ impl<Vdef, L, Rp> GraphicsPipeline<Vdef, L, Rp>
}
// Check that the subpass can accept the output of the fragment shader.
if !params.render_pass.render_pass().is_compatible_with(params.render_pass.index(),
params.fragment_shader.output())
if !params.render_pass.render_pass().inner().desc().is_compatible_with(params.render_pass.index(),
params.fragment_shader.output())
{
return Err(GraphicsPipelineCreationError::FragmentShaderRenderPassIncompatible);
}