Skip to content

v3d: Fix Gallium trace driver

Icecream95 requested to merge icecream95/mesa:v3d-screen into main

Don't use the resource screen for BO allocation: this might be the screen for a wrapper driver (such as trace), in which case it is not a v3d_screen and cannot be used as one.

Fixes crashes with GALLIUM_TRACE=foo.gtrace.

I notice that vc4, Etnaviv and Freedreno all have similar bits of code where they use the resource from the screen. Fixing these should be trivial, but maybe it would be better to see if there is an easy way of fixing the problem in the trace driver.

If fixing it in the trace driver is too hard, then there should probably be some documentation that it is unsafe to assume that rsrc->screen points to a driver-specific screen object?

It's also possible that this affects objects other than pipe_resource as well.

Merge request reports