mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 22:10:10 +01:00
dri/nouveau: replace assert with unreachable
I don't know why removing imports.h suddenly makes clang realize that this function can not return in a non-debug build, but it does. Unreachable is better because it doesn't have this problem. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3024>
This commit is contained in:
parent
c3db0936ef
commit
289f02d1d5
1 changed files with 3 additions and 1 deletions
|
|
@ -41,6 +41,8 @@
|
||||||
#include "util/u_memory.h"
|
#include "util/u_memory.h"
|
||||||
#include "drivers/common/meta.h"
|
#include "drivers/common/meta.h"
|
||||||
#include "swrast/s_texfetch.h"
|
#include "swrast/s_texfetch.h"
|
||||||
|
#include "util/macros.h"
|
||||||
|
|
||||||
|
|
||||||
static struct gl_texture_object *
|
static struct gl_texture_object *
|
||||||
nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target)
|
nouveau_texture_new(struct gl_context *ctx, GLuint name, GLenum target)
|
||||||
|
|
@ -246,7 +248,7 @@ nouveau_choose_tex_format(struct gl_context *ctx, GLenum target,
|
||||||
return MESA_FORMAT_RGBA_DXT5;
|
return MESA_FORMAT_RGBA_DXT5;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
assert(0);
|
unreachable("Unknown format");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue