Mesa (master): v3d: Fix -Wmaybe-uninitialized compiler warning in the v33 code.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jun 29 17:00:13 UTC 2020
Module: Mesa
Branch: master
Commit: 08c39a8a2931e587e4715d2ed12b2fe1990aa4c3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=08c39a8a2931e587e4715d2ed12b2fe1990aa4c3
Author: Eric Anholt <eric at anholt.net>
Date: Fri Jun 26 16:31:55 2020 -0700
v3d: Fix -Wmaybe-uninitialized compiler warning in the v33 code.
We weren't initializing the VCM bits in the !gs path, but v33 doesn't have
GS so we can just mark it unreachable.
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2952>
---
src/gallium/drivers/v3d/v3dx_draw.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index f4377e79d4a..9a5da07ec80 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -706,8 +706,8 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
vpm_cfg.Ve = 0;
vpm_cfg.Vc = v3d->prog.vs->prog_data.vs->vcm_cache_size;
}
-#if V3D_VERSION >= 41
else {
+#if V3D_VERSION >= 41
v3d_emit_gs_state_record(v3d->job,
v3d->prog.gs_bin, gs_bin_uniforms,
v3d->prog.gs, gs_uniforms);
@@ -738,8 +738,10 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
vpm_cfg.gs_width,
vpm_cfg.Gd,
vpm_cfg.Gv);
- }
+#else
+ unreachable("No GS support pre-4.1");
#endif
+ }
cl_emit(&job->indirect, GL_SHADER_STATE_RECORD, shader) {
shader.enable_clipping = true;
More information about the mesa-commit
mailing list