[Mesa-dev] [PATCH] gallium/drivers: initialize pipe_resource::next to NULL

Michel Dänzer michel at daenzer.net
Tue Oct 4 01:16:16 UTC 2016

On 04/10/16 01:53 AM, Roland Scheidegger wrote:
> In an ideal world everybody would zero-intialize the template I suppose
> - then it would easily survive such interface changes.

As long as there are no fields where 0 isn't a safe value...

What's needed is an explicit definition of whether it's the caller's or
callee's responsibility to initialize the next field (in particular, and
any other fields in general). Are there any cases where the
resource_create caller needs to pass in a non-NULL next field value?

Note that with the original problem I fixed in radeon, the caller wasn't
in state tracker code but in driver internal code.

Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer

More information about the mesa-dev mailing list