Browse Source

zink: silence coverity error

Coverity doesn't know that we always have coordinates if we have lod. To
avoid annoying errors, let's just zero-initialize this.

CoverityID: 1455202
Reviewed-by: Dave Airlie <airlied@redhat.com>
master
Erik Faye-Lund 7 years ago
parent
commit
5fcb503c73
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c

+ 1
- 1
src/gallium/drivers/zink/nir_to_spirv/nir_to_spirv.c View File

@@ -1329,7 +1329,7 @@ emit_tex(struct ntv_context *ctx, nir_tex_instr *tex)
assert(tex->texture_index == tex->sampler_index);

SpvId coord = 0, proj = 0, bias = 0, lod = 0, dref = 0;
unsigned coord_components;
unsigned coord_components = 0;
for (unsigned i = 0; i < tex->num_srcs; i++) {
switch (tex->src[i].src_type) {
case nir_tex_src_coord:

Loading…
Cancel
Save