util: use memset() to initialize surface, sampler_view templates
authorBrian Paul <brianp@vmware.com>
Tue, 10 Jan 2012 18:35:57 +0000 (11:35 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 10 Jan 2012 19:37:38 +0000 (12:37 -0700)
commit2e87660ca6deba9ba866a8012cf82f41374b5adb
tree11bbffc83023ff97e947af33381a2e2ae30ea293
parent6bf5daf331f13ec9503615a2578247e72b7d2cbb
util: use memset() to initialize surface, sampler_view templates

These initialization functions weren't initializing all the fields so
some had undefined values.  The callers of these functions sometimes use
a structure assignment to initialize new objects from these templates
so we'd just propagate the undefined values.  That made for some confusing
info when debugging, plus it could lead to bugs.

v2: fix surf pointer mix-up: "&surf" -> "surf"

Jakob Bornecrantz <jakob@vmware.com>
src/gallium/auxiliary/util/u_sampler.c
src/gallium/auxiliary/util/u_surface.c