From 7d2d450ea6d8082db14cd3f86c6c25442bf771c5 Mon Sep 17 00:00:00 2001 From: Christoph Bumiller Date: Sat, 19 Jan 2013 20:53:22 +0100 Subject: nouveau: fix undefined behaviour when testing sample_count NOTE: This is a candidate for the 9.0 branch. --- src/gallium/drivers/nv30/nv30_screen.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gallium/drivers/nv30/nv30_screen.c') diff --git a/src/gallium/drivers/nv30/nv30_screen.c b/src/gallium/drivers/nv30/nv30_screen.c index 06f7c42bbe5..f3faf8ad18a 100644 --- a/src/gallium/drivers/nv30/nv30_screen.c +++ b/src/gallium/drivers/nv30/nv30_screen.c @@ -244,6 +244,8 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen, unsigned sample_count, unsigned bindings) { + if (sample_count > 4) + return FALSE; if (!(0x00000017 & (1 << sample_count))) return FALSE; -- cgit v1.2.3