[Mesa-dev] [PATCH 1/3] i965: Put an assertion to check valid varying_to_slot[varying]

Anuj Phogat anuj.phogat at gmail.com
Mon Apr 14 16:23:35 PDT 2014


Cc: <mesa-stable at lists.freedesktop.org>
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
 src/mesa/drivers/dri/i965/gen7_sol_state.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 1b58efb..06a4cdf 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -132,6 +132,7 @@ gen7_upload_3dstate_so_decl_list(struct brw_context *brw,
       buffer_mask |= 1 << buffer;
 
       decl |= buffer << SO_DECL_OUTPUT_BUFFER_SLOT_SHIFT;
+      assert(vue_map->varying_to_slot[varying] >= 0);
       decl |= vue_map->varying_to_slot[varying] <<
 	 SO_DECL_REGISTER_INDEX_SHIFT;
       decl |= component_mask << SO_DECL_COMPONENT_MASK_SHIFT;
-- 
1.8.3.1



More information about the mesa-dev mailing list