panfrost: Fix gnu-empty-initializer errors.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3473
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6551>
This commit is contained in:
Vinson Lee
2020-09-01 16:21:47 -07:00
parent 3cf6325e72
commit bb80ed8873
4 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ panfrost_shader_compile(struct panfrost_context *ctx,
s->info.stage = stage;
/* Call out to Midgard compiler given the above NIR */
panfrost_program program = {};
panfrost_program program = {0};
memcpy(program.rt_formats, state->rt_formats, sizeof(program.rt_formats));
if (dev->quirks & IS_BIFROST) {
+1 -1
View File
@@ -296,7 +296,7 @@ panfrost_emit_blend(struct panfrost_batch *batch, void *rts,
}
for (unsigned i = 0; i < rt_count; ++i) {
struct mali_blend_flags_packed flags = {};
struct mali_blend_flags_packed flags = {0};
pan_pack(&flags, BLEND_FLAGS, cfg) {
if (blend[i].no_colour) {
+2 -2
View File
@@ -730,7 +730,7 @@ static void
pan_blit_from_staging(struct pipe_context *pctx, struct panfrost_gtransfer *trans)
{
struct pipe_resource *dst = trans->base.resource;
struct pipe_blit_info blit = {};
struct pipe_blit_info blit = {0};
blit.dst.resource = dst;
blit.dst.format = dst->format;
@@ -750,7 +750,7 @@ static void
pan_blit_to_staging(struct pipe_context *pctx, struct panfrost_gtransfer *trans)
{
struct pipe_resource *src = trans->base.resource;
struct pipe_blit_info blit = {};
struct pipe_blit_info blit = {0};
blit.src.resource = src;
blit.src.format = src->format;
+4 -1
View File
@@ -584,7 +584,10 @@ class Parser(object):
default_fields.append(" .{} = {{ {}_header }}".format(field.name, self.gen_prefix(safe_name(field.type.upper()))))
print('#define %-40s\\' % (name + '_header'))
print(", \\\n".join(default_fields))
if default_fields:
print(", \\\n".join(default_fields))
else:
print(' 0')
print('')
def emit_template_struct(self, name, group, opaque_structs):