Hi, On 21 February 2018 at 21:24, Jason Ekstrand <ja...@jlekstrand.net> wrote: > On Wed, Feb 21, 2018 at 1:22 PM, Jason Ekstrand <ja...@jlekstrand.net> > wrote: >>> + uint32_t n = 0; >>> + uint32_t counts[2]; >>> + uint64_t *modifiers[2]; >>> + >>> + if (mod_reply->num_drawable_modifiers) { >>> + counts[n] = mod_reply->num_drawable_modifiers; >>> + modifiers[n] = vk_alloc(pAllocator, >>> + counts[n] * sizeof(uint64_t), >>> + 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); >>> + if (!modifiers[n]) { >>> + free(mod_reply); >>> + goto out; >>> + } >>> + >>> + memcpy(modifiers[n], >>> + >>> xcb_dri3_get_supported_modifiers_drawable_modifiers(mod_reply), >> >> Did we ever get a solid answer on whether or not this memcpy is really >> needed? I doubt it is. > > I'm an idiot. It is needed because we free mod_reply at the end of the > function. We could probably restructure so it isn't needed but I doubt it's > really worth it.
Yeah, I couldn't see a way to cleanly plumb it through. Cheers, Daniel _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev