mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 13:20:14 +01:00
mesa/st: Use memset to zero out struct
This is a non-stop source of warnings and build breakage. memset works everywhere. src/mesa/state_tracker/st_tgsi_lower_depth_clamp.c:354:45: warning: suggest braces around initialization of subobject [-Wmissing-braces] Reviewed-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5174>
This commit is contained in:
parent
12653beacb
commit
c26317ebd6
1 changed files with 2 additions and 1 deletions
|
|
@ -351,10 +351,11 @@ st_tgsi_lower_depth_clamp(const struct tgsi_token *tokens,
|
|||
int depth_range_const,
|
||||
bool clip_negative_one_to_one)
|
||||
{
|
||||
struct tgsi_depth_clamp_transform ctx = {0};
|
||||
struct tgsi_depth_clamp_transform ctx;
|
||||
struct tgsi_token *newtoks;
|
||||
int newlen;
|
||||
|
||||
memset(&ctx, 0, sizeof(ctx));
|
||||
tgsi_scan_shader(tokens, &ctx.info);
|
||||
|
||||
/* we only want to do this for the fragment shader, and the shader-stage
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue