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@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8248>
This commit is contained in:
parent
cda9d44bae
commit
9252f947e5
|
@ -594,7 +594,7 @@ static struct pipe_resource *
|
||||||
create_tmp_resource(struct pipe_screen *screen,
|
create_tmp_resource(struct pipe_screen *screen,
|
||||||
const struct pipe_blit_info *info)
|
const struct pipe_blit_info *info)
|
||||||
{
|
{
|
||||||
struct pipe_resource tpl = { 0 };
|
struct pipe_resource tpl = {};
|
||||||
tpl.width0 = info->dst.box.width;
|
tpl.width0 = info->dst.box.width;
|
||||||
tpl.height0 = info->dst.box.height;
|
tpl.height0 = info->dst.box.height;
|
||||||
tpl.depth0 = info->dst.box.depth;
|
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_screen *screen = d3d12_screen(ctx->base.screen);
|
||||||
struct d3d12_gfx_pipeline_state *state = &ctx->gfx_pipeline_state;
|
struct d3d12_gfx_pipeline_state *state = &ctx->gfx_pipeline_state;
|
||||||
enum pipe_prim_type reduced_prim = u_reduced_prim(state->prim_type);
|
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 strides[PIPE_MAX_SO_OUTPUTS] = { 0 };
|
||||||
UINT num_entries = 0, num_strides = 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;
|
struct pipe_resource tmpl = res->base;
|
||||||
tmpl.nr_samples = 0;
|
tmpl.nr_samples = 0;
|
||||||
resolved_resource = d3d12_resource_create(ctx->base.screen, &tmpl);
|
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};
|
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.resource = resolved_resource;
|
||||||
resolve_info.dst.box = box;
|
resolve_info.dst.box = box;
|
||||||
|
|
|
@ -274,7 +274,7 @@ d3d12_surface_destroy(struct pipe_context *pctx,
|
||||||
static void
|
static void
|
||||||
blit_surface(struct d3d12_surface *surface, bool pre)
|
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.src.resource = pre ? surface->base.texture : surface->rgba_texture;
|
||||||
info.dst.resource = pre ? surface->rgba_texture : surface->base.texture;
|
info.dst.resource = pre ? surface->rgba_texture : surface->base.texture;
|
||||||
|
|
Loading…
Reference in New Issue