zink: standardize zero-init code style
quick grepping shows that the amount of {0} (there were 8) is higher than { 0 } (only 5), so {0} it is! Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11376>
This commit is contained in:
@@ -1404,7 +1404,7 @@ get_render_pass(struct zink_context *ctx)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
const struct pipe_framebuffer_state *fb = &ctx->fb_state;
|
||||
struct zink_render_pass_state state = { 0 };
|
||||
struct zink_render_pass_state state = {0};
|
||||
uint32_t clears = 0;
|
||||
state.swapchain_init = ctx->new_swapchain;
|
||||
|
||||
@@ -3461,7 +3461,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
|
||||
if (!ctx->program_cache || !ctx->compute_program_cache || !ctx->render_pass_cache)
|
||||
goto fail;
|
||||
|
||||
const uint8_t data[] = { 0 };
|
||||
const uint8_t data[] = {0};
|
||||
ctx->dummy_vertex_buffer = pipe_buffer_create_with_data(&ctx->base,
|
||||
PIPE_BIND_VERTEX_BUFFER | PIPE_BIND_SHADER_IMAGE, PIPE_USAGE_IMMUTABLE, sizeof(data), data);
|
||||
if (!ctx->dummy_vertex_buffer)
|
||||
|
@@ -115,10 +115,10 @@ VkInstance
|
||||
zink_create_instance(struct zink_instance_info *instance_info)
|
||||
{
|
||||
/* reserve one slot for MoltenVK */
|
||||
const char *layers[${len(layers) + 1}] = { 0 };
|
||||
const char *layers[${len(layers) + 1}] = {0};
|
||||
uint32_t num_layers = 0;
|
||||
|
||||
const char *extensions[${len(extensions) + 1}] = { 0 };
|
||||
const char *extensions[${len(extensions) + 1}] = {0};
|
||||
uint32_t num_extensions = 0;
|
||||
|
||||
%for ext in extensions:
|
||||
|
Reference in New Issue
Block a user