anv: Fix a harmless overflow warning
authorChad Versace <chad.versace@intel.com>
Tue, 14 Jun 2016 23:20:07 +0000 (16:20 -0700)
committerChad Versace <chad.versace@intel.com>
Wed, 15 Jun 2016 22:34:13 +0000 (15:34 -0700)
anv_pipeline_binding::index is a uint8_t, but some code assigned to it
UINT16_MAX.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewd-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_pipeline.c

index 60b7c6b312deee4f73c32f0ff552de90bd33c538..b41e11e5dcac9eb33dc3af92297c6f13c63ebc47 100644 (file)
@@ -664,7 +664,7 @@ anv_pipeline_compile_fs(struct anv_pipeline *pipeline,
          rt_bindings[0] = (struct anv_pipeline_binding) {
             .set = ANV_DESCRIPTOR_SET_COLOR_ATTACHMENTS,
             .binding = 0,
-            .index = UINT16_MAX,
+            .index = UINT8_MAX,
          };
          num_rts = 1;
       }