On Tue, Sep 6, 2016 at 4:53 PM, Kristian Høgsberg <[email protected]> wrote: > On Tue, Sep 6, 2016 at 1:32 PM, Rob Clark <[email protected]> wrote: >> On Tue, Sep 6, 2016 at 4:23 PM, Rob Clark <[email protected]> wrote: >>>>> @@ -212,28 +247,65 @@ piglit_gbm_buf_create(unsigned w, unsigned h, >>>>> unsigned cpp, >>>>> void *dst_data; >>>>> void *map_data = NULL; >>>>> enum gbm_bo_format format; >>>>> + unsigned cpp = 0, src_stride; >>>>> + unsigned buf_w = w; >>>>> + unsigned buf_h = h; >>>>> >>>>> - if (!gbm || h % 2) >>>>> + if (!gbm || h % 2 || w % 2) >>>>> return false; >>>>> >>>>> - /* It would be nice if we took in a fourcc instead of a cpp */ >>>>> - switch (cpp) { >>>> >>>> Can we just switch over to always taking a fourcc? This cpp_or_fourcc is >>>> messy. >>> >>> I think it made a bit more sense when I started (and thought that this >>> would be a smaller patch) to avoid extra churn.. >>> >>> Maybe in the end since you have the U/V interleaved by row, we might >>> not end up needing my patch. But otherwise, at this point it wouldn't >>> make the patch that much larger to fix up the handful of rgb tests >> >> >> oh, no, spoke too soon, we still have an issue for UV plane when hw >> has alignment restriction in pixels instead of bytes.. > > We can just rearrange the input data for the yuv test to not be laid > out like that. There was no specific reason that I did it that way.
So, fwiw, I was trying a less intrusive patch to keep the layout the same, but use cpp=2 and w/=2 for allocating in the NV12 case. But the problem with the row-interleaved YV12/YU12 cases is that the 2nd plane start position isn't aligned to the required pitch. So I think I am back to the original idea of passing fourcc all the way down to the dmabuf allocator (and re-arranging things so U/V planes are not row-interleaved). I'll go ahead and push the mesa patch that adds the additional GBM formats that the original patch depended on, and then clean things up to use fourcc everywhere (instead of cpp_or_fourcc) and then resend. BR, -R _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
