Mesa (master): d3d12: Fix clang warnings from {0} in C++ code
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Jan 3 23:24:44 UTC 2021
Module: Mesa
Branch: master
Commit: 9252f947e572ee9235b061ca6908561f61ea28a8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9252f947e572ee9235b061ca6908561f61ea28a8
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Mon Dec 28 10:50:40 2020 -0800
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 <ajax at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
---
src/gallium/drivers/d3d12/d3d12_blit.cpp | 2 +-
src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp | 2 +-
src/gallium/drivers/d3d12/d3d12_resource.cpp | 2 +-
src/gallium/drivers/d3d12/d3d12_surface.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/d3d12/d3d12_blit.cpp b/src/gallium/drivers/d3d12/d3d12_blit.cpp
index 5d04579652c..bb7d2ace765 100644
--- a/src/gallium/drivers/d3d12/d3d12_blit.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_blit.cpp
@@ -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;
diff --git a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
index 6743f618a7c..10edfdcdf17 100644
--- a/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_pipeline_state.cpp
@@ -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;
diff --git a/src/gallium/drivers/d3d12/d3d12_resource.cpp b/src/gallium/drivers/d3d12/d3d12_resource.cpp
index 5ef1b014bde..852b395206d 100644
--- a/src/gallium/drivers/d3d12/d3d12_resource.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_resource.cpp
@@ -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;
diff --git a/src/gallium/drivers/d3d12/d3d12_surface.cpp b/src/gallium/drivers/d3d12/d3d12_surface.cpp
index 48f4818e69f..d7f85a20b4b 100644
--- a/src/gallium/drivers/d3d12/d3d12_surface.cpp
+++ b/src/gallium/drivers/d3d12/d3d12_surface.cpp
@@ -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;
More information about the mesa-commit
mailing list