On Tue 07 Nov 2017, Lionel Landwerlin wrote: > On 07/11/17 14:47, Chad Versace wrote: > > Make it a stand-alone function. Pre-patch, for some formats the function > > returned incorrect VkFormatFeatureFlags which were cleaned up by the > > caller. > > > > This prepares for a cleaner implementation of > > VK_EXT_image_drm_format_modifier. > > > > Reviewed-by: Jason Ekstrand <ja...@jlekstrand.net> > > --- > > src/intel/vulkan/anv_formats.c | 44 > > ++++++++++++++++++++++++++++-------------- > > 1 file changed, 29 insertions(+), 15 deletions(-) > > > > diff --git a/src/intel/vulkan/anv_formats.c b/src/intel/vulkan/anv_formats.c > > index b8c9cacb422..ebc6a8351c6 100644 > > --- a/src/intel/vulkan/anv_formats.c > > +++ b/src/intel/vulkan/anv_formats.c > > @@ -514,23 +514,39 @@ get_image_format_properties(const struct > > gen_device_info *devinfo, > > static VkFormatFeatureFlags > > get_buffer_format_properties(const struct gen_device_info *devinfo, > > - enum isl_format format) > > + VkFormat vk_format, > > + const struct anv_format *anv_format) > > {
> > + if (anv_format->can_ycbcr) > > + return 0; > > There a couple of ycbcr formats with a single plane. > Is there a line in the spec that says ycbcr formats cannot be access through > buffer views? (I couldn't find it) > Might be worth leaving a comment. I was also unable to find restriction in the spec. You know the ycbcr spec much better than me, so I would feel safer if you added the comment. Just to be clear, the rejection of ycbcr in this patch... if (anv_format->can_ycbcr) return 0 ... preserves the pre-patch behavior, which rejected ycbcr like this: if (format->can_ycbcr) { ... buffer = 0; } _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev