diff options
author | Jakob Bornecrantz <[email protected]> | 2008-09-16 16:16:54 +0200 |
---|---|---|
committer | Jakob Bornecrantz <[email protected]> | 2008-09-16 16:20:19 +0200 |
commit | ad16ecbbe4fe8c1bcb18ed8fbbd672c68a0b17fa (patch) | |
tree | 5c0b647bf2243f83bb48c3122d6dd7f5d60b8865 /src/gallium/auxiliary/tgsi/tgsi_sanity.c | |
parent | eef2edadf33cdb4ce033565ebc5b6aaf56e9288f (diff) |
tgsi: Make tgsi_sanity.c compile with make
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_sanity.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_sanity.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_sanity.c b/src/gallium/auxiliary/tgsi/tgsi_sanity.c index c6590272969..20b32477be3 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_sanity.c +++ b/src/gallium/auxiliary/tgsi/tgsi_sanity.c @@ -152,6 +152,12 @@ check_register_usage( { if (!check_file_name( ctx, file )) return FALSE; + + if (index < 0 || index > MAX_REGISTERS) { + report_error( ctx, "%s[%i]: Invalid index %s", file_names[file], index, name ); + return FALSE; + } + if (indirect_access) { if (!is_any_register_declared( ctx, file )) report_error( ctx, "%s: Undeclared %s register", file_names[file], name ); |