!stfp->variants->key.bitmap) {
shader = stfp->variants->driver_shader;
} else {
- struct st_fp_variant_key key = {0};
+ struct st_fp_variant_key key;
+
+ /* use memset, not an initializer to be sure all memory is zeroed */
+ memset(&key, 0, sizeof(key));
key.st = st->has_shareable_shaders ? NULL : st;
stvp->variants->key.passthrough_edgeflags == st->vertdata_edgeflags) {
st->vp_variant = stvp->variants;
} else {
- struct st_vp_variant_key key = {0};
+ struct st_vp_variant_key key;
+
+ memset(&key, 0, sizeof(key));
key.st = st->has_shareable_shaders ? NULL : st;
{
struct pipe_context *pipe = st->pipe;
struct st_basic_variant *v;
- struct st_basic_variant_key key = {0};
+ struct st_basic_variant_key key;
+
+ /* use memset, not an initializer to be sure all memory is zeroed */
+ memset(&key, 0, sizeof(key));
key.st = st->has_shareable_shaders ? NULL : st;
switch (prog->Target) {
case GL_VERTEX_PROGRAM_ARB: {
struct st_vertex_program *p = (struct st_vertex_program *)prog;
- struct st_vp_variant_key key = {0};
+ struct st_vp_variant_key key;
+
+ memset(&key, 0, sizeof(key));
key.st = st->has_shareable_shaders ? NULL : st;
st_get_vp_variant(st, p, &key);
case GL_FRAGMENT_PROGRAM_ARB: {
struct st_fragment_program *p = (struct st_fragment_program *)prog;
- struct st_fp_variant_key key = {0};
+ struct st_fp_variant_key key;
+
+ memset(&key, 0, sizeof(key));
key.st = st->has_shareable_shaders ? NULL : st;
st_get_fp_variant(st, p, &key);