diff options
author | Denis Pauk <[email protected]> | 2017-09-12 23:38:45 +0300 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-09-14 00:59:24 +0200 |
commit | 74d2456491fbd96eb3fb99cf8dd3595b223c2065 (patch) | |
tree | 433aa22af9f3f372987d703e89ac5d193d445597 /src/gallium/auxiliary | |
parent | edfd8d42a9ac870a6ebc5a56fc003f60f86b702c (diff) |
gallium/{r600, radeonsi}: Fix segfault with color format (v2)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102552
v2: Patch cleanup proposed by Nicolai Hähnle.
* deleted changes in si_translate_texformat.
Cc: Nicolai Hähnle <[email protected]>
Cc: Ilia Mirkin <[email protected]>
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/util/u_format.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c index 3d281905ce7..a6d42a428dc 100644 --- a/src/gallium/auxiliary/util/u_format.c +++ b/src/gallium/auxiliary/util/u_format.c @@ -238,6 +238,10 @@ util_format_is_subsampled_422(enum pipe_format format) boolean util_format_is_supported(enum pipe_format format, unsigned bind) { + if (format >= PIPE_FORMAT_COUNT) { + return FALSE; + } + if (util_format_is_s3tc(format) && !util_format_s3tc_enabled) { return FALSE; } |