Commit 9252f947 authored by Jesse Natalie's avatar Jesse Natalie Committed by Marge Bot
Browse files

d3d12: Fix clang warnings from {0} in C++ code



There's no reason for the 0 here since C++ supports {},
and clang doesn't like it, so drop it.
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Part-of: <mesa/mesa!8248>
parent cda9d44b
......@@ -594,7 +594,7 @@ static struct pipe_resource *
create_tmp_resource(struct pipe_screen *screen,
const struct pipe_blit_info *info)
{
struct pipe_resource tpl = { 0 };
struct pipe_resource tpl = {};
tpl.width0 = info->dst.box.width;
tpl.height0 = info->dst.box.height;
tpl.depth0 = info->dst.box.depth;
......
......@@ -199,7 +199,7 @@ create_gfx_pipeline_state(struct d3d12_context *ctx)
struct d3d12_screen *screen = d3d12_screen(ctx->base.screen);
struct d3d12_gfx_pipeline_state *state = &ctx->gfx_pipeline_state;
enum pipe_prim_type reduced_prim = u_reduced_prim(state->prim_type);
D3D12_SO_DECLARATION_ENTRY entries[PIPE_MAX_SO_OUTPUTS] = { 0 };
D3D12_SO_DECLARATION_ENTRY entries[PIPE_MAX_SO_OUTPUTS] = {};
UINT strides[PIPE_MAX_SO_OUTPUTS] = { 0 };
UINT num_entries = 0, num_strides = 0;
......
......@@ -533,7 +533,7 @@ transfer_image_to_buf(struct d3d12_context *ctx,
struct pipe_resource tmpl = res->base;
tmpl.nr_samples = 0;
resolved_resource = d3d12_resource_create(ctx->base.screen, &tmpl);
struct pipe_blit_info resolve_info = {0};
struct pipe_blit_info resolve_info = {};
struct pipe_box box = {0,0,0, (int)res->base.width0, (int16_t)res->base.height0, (int16_t)res->base.depth0};
resolve_info.dst.resource = resolved_resource;
resolve_info.dst.box = box;
......
......@@ -274,7 +274,7 @@ d3d12_surface_destroy(struct pipe_context *pctx,
static void
blit_surface(struct d3d12_surface *surface, bool pre)
{
struct pipe_blit_info info = {0};
struct pipe_blit_info info = {};
info.src.resource = pre ? surface->base.texture : surface->rgba_texture;
info.dst.resource = pre ? surface->rgba_texture : surface->base.texture;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment