Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/i965_format_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,27 @@ static void i965_GuessExpectedFourCC(int format, int *fourcc)
#ifndef DRM_FORMAT_GR1616
#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2')
#endif
#ifndef DRM_FORMAT_XYUV8888
#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V')
#endif
#ifndef DRM_FORMAT_Y210
#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0')
#endif
#ifndef DRM_FORMAT_Y216
#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6')
#endif
#ifndef DRM_FORMAT_Y410
#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0')
#endif
#ifndef DRM_FORMAT_Y416
#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6')
#endif
#ifndef DRM_FORMAT_P010
#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0')
#endif
#ifndef DRM_FORMAT_P016
#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6')
#endif

static uint32_t drm_format_of_separate_plane(uint32_t fourcc, int plane)
{
Expand Down
8 changes: 7 additions & 1 deletion src/intel_compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
/**
* FALLTHROUGH macro
*/
#if defined(__has_attribute)
# define HAS_GCC_FALLTHROUGH __has_attribute(fallthrough)
#else
# define HAS_GCC_FALLTHROUGH 0
#endif

#if defined(__has_cpp_attribute) && defined(__clang__)
/* We do not do the same trick as __has_attribute because parsing
* clang::fallthrough in the preprocessor fails in GCC. */
Expand All @@ -52,7 +58,7 @@
#elif HAS_CLANG_FALLTHROUGH
/* Clang++ specific */
#define FALLTHROUGH [[clang::fallthrough]]
#elif __has_attribute(fallthrough)
#elif HAS_GCC_FALLTHROUGH
/* Non-standard but supported by at least gcc and clang */
#define FALLTHROUGH __attribute__((fallthrough))
#else
Expand Down