diff options
author | Gert Wollny <gert.wollny@collabora.com> | 2022-11-08 15:08:54 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-11-10 07:03:02 +0000 |
commit | 048ba4d4eb475d2dea1e869197b99cf4035ff829 (patch) | |
tree | a46b64b5c1d8e180ad318cd8ee589564c8f9da24 | |
parent | 0a4e3bc737314e75748dfed8f97e670c2820cd5e (diff) | |
download | virglrenderer-048ba4d4eb475d2dea1e869197b99cf4035ff829.tar.gz |
decode: initialize all members of the sampler state
The value is actually not used, but to be in sync with the
Gallium structure definition we don't want to remove the
value.
Fixes Coverity ID: 1527209 "Uninitialized scalar variable"
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/975>
-rw-r--r-- | src/vrend_decode.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/vrend_decode.c b/src/vrend_decode.c index b1440796..e480545e 100644 --- a/src/vrend_decode.c +++ b/src/vrend_decode.c @@ -672,6 +672,7 @@ static int vrend_decode_create_sampler_state(struct vrend_context *ctx, const ui state.compare_func = (tmp >> 16) & 0x7; state.seamless_cube_map = (tmp >> 19) & 0x1; state.max_anisotropy = (float)((tmp >> 20) & 0x3f); + state.normalized_coords = 0; state.lod_bias = uif(get_buf_entry(buf, VIRGL_OBJ_SAMPLER_STATE_LOD_BIAS)); state.min_lod = uif(get_buf_entry(buf, VIRGL_OBJ_SAMPLER_STATE_MIN_LOD)); |