From 7d6478cfccf03c87f2b9daa541ae486dc24bb388 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 13 Mar 2009 09:17:30 -0600 Subject: i965: more register number assertions --- src/mesa/drivers/dri/i965/brw_eu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index b15e8403cc..eb99c21711 100644 --- a/src/mesa/drivers/dri/i965/brw_eu.h +++ b/src/mesa/drivers/dri/i965/brw_eu.h @@ -170,6 +170,13 @@ static INLINE struct brw_reg brw_reg( GLuint file, GLuint writemask ) { struct brw_reg reg; + if (type == BRW_GENERAL_REGISTER_FILE) + assert(nr < 128); + else if (type == BRW_MESSAGE_REGISTER_FILE) + assert(nr < 9); + else if (type == BRW_ARCHITECTURE_REGISTER_FILE) + assert(nr <= BRW_ARF_IP); + reg.type = type; reg.file = file; reg.nr = nr; -- cgit v1.2.3