r300g: Check for bogus texture targets.

This commit is contained in:
Corbin Simpson
2010-01-17 01:13:45 -08:00
parent b62d339301
commit 945cea01d9
+6
View File
@@ -192,6 +192,12 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
uint32_t retval = 0;
boolean is_r500 = r300_screen(screen)->caps->is_r500;
if (target >= PIPE_MAX_TEXTURE_TYPES) {
debug_printf("r300: Implementation error: Received bogus texture "
"target %d in %s\n", target, __FUNCTION__);
return FALSE;
}
switch (format) {
/* Supported formats. */
/* Colorbuffer */