mesa: add fallthrough comments to COPY_SZ_4V()

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>
This commit is contained in:
Timothy Arceri 2020-07-01 15:10:34 +10:00 committed by Marge Bot
parent dbf016e259
commit 5c4d9816ac

View file

@ -304,14 +304,14 @@ COPY_4UBV(GLubyte dst[4], const GLubyte src[4])
}
/** Copy \p SZ elements into a 4-element vector */
#define COPY_SZ_4V(DST, SZ, SRC) \
do { \
switch (SZ) { \
case 4: (DST)[3] = (SRC)[3]; \
case 3: (DST)[2] = (SRC)[2]; \
case 2: (DST)[1] = (SRC)[1]; \
case 1: (DST)[0] = (SRC)[0]; \
} \
#define COPY_SZ_4V(DST, SZ, SRC) \
do { \
switch (SZ) { \
case 4: (DST)[3] = (SRC)[3]; /* fallthrough */ \
case 3: (DST)[2] = (SRC)[2]; /* fallthrough */ \
case 2: (DST)[1] = (SRC)[1]; /* fallthrough */ \
case 1: (DST)[0] = (SRC)[0]; /* fallthrough */ \
} \
} while(0)
/** Copy \p SZ elements into a homegeneous (4-element) vector, giving