Hi, On 4 February 2017 at 05:29, Ben Widawsky <b...@bwidawsk.net> wrote: > On 17-01-31 11:33:39, Jason Ekstrand wrote: >> On Mon, Jan 23, 2017 at 10:19 PM, Ben Widawsky <b...@bwidawsk.net> wrote: >>> + /* Preserve legacy behavior if plane is 0 */ >>> + if (plane == 0) >>> + return _bo->stride; >> >> This implies that, for multi-planar images, you have to have the BO stride >> be the same as the image stride. Do we want this or do we only want to >> return bo->stride if we don't have enough DRI stuff (in the if below) to >> use the image? I think it's probably ok either way. >> > > The biggest problem is if I change it (see hunk below) is that it > potentially > doesn't match the old behavior, and I don't really have a great way to test > this > outside of our environment. I went with the path of least risk, however you > do > raise a good point. > > Daniel, do you have an opinion here?
I think Jason's suggestion is the right thing to do. The main case I worry about is dumb buffers, covered by !bo->image, which cannot be multi-planar. If we ever have a single-planar image where the stride doesn't match the DRIimage stride, that sounds like something to be fixed anyway. So, let's go with this and fix up anything which breaks, though I can't immediately see how that would happen. Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev