Mesa (master): anv: Fix a harmless overflow warning

Chad Versace chadversary at kemper.freedesktop.org
Wed Jun 15 22:38:05 UTC 2016


Module: Mesa
Branch: master
Commit: c99a0a8bcece2870f3e93328ab520efc2c9f7983
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c99a0a8bcece2870f3e93328ab520efc2c9f7983

Author: Chad Versace <chad.versace at intel.com>
Date:   Tue Jun 14 16:20:07 2016 -0700

anv: Fix a harmless overflow warning

anv_pipeline_binding::index is a uint8_t, but some code assigned to it
UINT16_MAX.

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewd-by: Jason Ekstrand <jason at jlekstrand.net>

---

 src/intel/vulkan/anv_pipeline.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 60b7c6b..b41e11e 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -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;
       }




More information about the mesa-commit mailing list