Bugfix image layout transitions

This commit is contained in:
Pierre Krieger 2017-07-20 16:33:43 +02:00
parent c4d15c89d3
commit 78b6947451

View File

@ -448,7 +448,7 @@ impl<P> SyncCommandBufferBuilder<P> {
entry.access = access;
entry.exclusive_any = true;
entry.exclusive = exclusive;
if exclusive {
if exclusive || end_layout != ImageLayout::Undefined {
// Only modify the layout in case of a write, because buffer operations
// pass `Undefined` for the layout. While a buffer write *must* set the
// layout to `Undefined`, a buffer read must not touch it.