i965: more register number assertions

This commit is contained in:
Brian Paul 2009-03-13 09:17:30 -06:00
parent a10ec13143
commit 7d6478cfcc

View file

@ -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;