From: Brian Paul Date: Fri, 13 Mar 2009 15:17:30 +0000 (-0600) Subject: i965: more register number assertions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d6478cfccf03c87f2b9daa541ae486dc24bb388;p=mesa.git i965: more register number assertions --- diff --git a/src/mesa/drivers/dri/i965/brw_eu.h b/src/mesa/drivers/dri/i965/brw_eu.h index b15e8403ccb..eb99c21711e 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;