On Thu, Oct 20, 2016 at 4:07 AM, Dave Airlie <airl...@gmail.com> wrote: > From: Dave Airlie <airl...@redhat.com> > > This fixes > dEQP-VK.pipeline.multisample.sampled_image* > > These all render to multisampled image, and then > sample from it, so we must transition it correctly. > > Cc: "13.0" <mesa-sta...@lists.freedesktop.org> > Signed-off-by: Dave Airlie <airl...@redhat.com> > --- > src/amd/vulkan/radv_cmd_buffer.c | 19 +++++++++++++++++++ > 1 file changed, 19 insertions(+) > > diff --git a/src/amd/vulkan/radv_cmd_buffer.c > b/src/amd/vulkan/radv_cmd_buffer.c > index 3f1a6f4..64a87ac 100644 > --- a/src/amd/vulkan/radv_cmd_buffer.c > +++ b/src/amd/vulkan/radv_cmd_buffer.c > @@ -2170,6 +2170,21 @@ static void radv_handle_cmask_image_transition(struct > radv_cmd_buffer *cmd_buffe > } > } > > +static void radv_handle_fmask_image_transition(struct radv_cmd_buffer > *cmd_buffer, > + struct radv_image *image, > + VkImageLayout src_layout, > + VkImageLayout dst_layout, > + VkImageSubresourceRange range, > + VkImageAspectFlags > pending_clears) > +{ > + /* fmask should be same conditions as cmask */ > + if (radv_layout_has_cmask(image, src_layout) && > + !radv_layout_has_cmask(image, dst_layout)) { > + > + radv_fast_clear_flush_image_inplace(cmd_buffer, image); > + } > +} > + > void radv_initialize_dcc(struct radv_cmd_buffer *cmd_buffer, > struct radv_image *image, uint32_t value) > { > @@ -2217,6 +2232,10 @@ static void radv_handle_image_transition(struct > radv_cmd_buffer *cmd_buffer, > radv_handle_cmask_image_transition(cmd_buffer, image, > src_layout, > dst_layout, range, > pending_clears); > > + if (image->fmask.size) > + radv_handle_fmask_image_transition(cmd_buffer, image, > src_layout, > + dst_layout, range, > pending_clears); > +
Can we not do this if there is a cmask, as the cmask transition should take case of it? I wonder in which case you got a fmask without cmask? > if (image->surface.dcc_size) > radv_handle_dcc_image_transition(cmd_buffer, image, > src_layout, > dst_layout, range, > pending_clears); > -- > 2.5.5 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev