diff options
author | Vinson Lee <vlee@freedesktop.org> | 2016-10-03 14:34:23 -0700 |
---|---|---|
committer | Vinson Lee <vlee@freedesktop.org> | 2016-10-03 15:56:59 -0700 |
commit | 5a87c57f9ba6581f2c091d7065c3c2cc1b001f2a (patch) | |
tree | 09e19884d037a26ecb9230a75e36b65e9783f15f | |
parent | ad38b44dd01588ce3e6ce6592f65f45654502820 (diff) |
utils: Move DRM_FORMATS defines to piglit_drm_dma_buf.h.
This patch fixes this build error.
transcode-nv12-as-r8-gr88.c: In function ‘create_textures’:
transcode-nv12-as-r8-gr88.c:178:7: error: ‘DRM_FORMAT_R8’ undeclared (first use in this function)
DRM_FORMAT_R8, r8_pixels);
^
Fixes: 0222f5db00fd ("dmabuf: fix YUV tests for drivers other than intel")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97951
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
-rw-r--r-- | tests/util/piglit-framework-gl/piglit_drm_dma_buf.c | 15 | ||||
-rw-r--r-- | tests/util/piglit-framework-gl/piglit_drm_dma_buf.h | 17 |
2 files changed, 17 insertions, 15 deletions
diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c index a0a2fc42f..c3225c399 100644 --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.c @@ -40,21 +40,6 @@ #include <drm.h> #include <unistd.h> -/* These definitions were added in libdrm 2.4.68, since that's still pretty - * recent defined these to allow older libdrm to continue working. - */ -#ifndef DRM_FORMAT_R8 -#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') -#endif - -#ifndef DRM_FORMAT_RG88 -#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') -#endif - -#ifndef DRM_FORMAT_GR88 -#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') -#endif - #define ALIGN(value, alignment) (((value) + alignment - 1) & ~(alignment - 1)) struct piglit_drm_driver { diff --git a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h index 5872df93c..36777a835 100644 --- a/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h +++ b/tests/util/piglit-framework-gl/piglit_drm_dma_buf.h @@ -23,6 +23,23 @@ #ifndef PIGLIT_DRM_DMA_BUF_H #define PIGLIT_DRM_DMA_BUF_H +#include "drm_fourcc.h" + +/* These definitions were added in libdrm 2.4.68, since that's still pretty + * recent defined these to allow older libdrm to continue working. + */ +#ifndef DRM_FORMAT_R8 +#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') +#endif + +#ifndef DRM_FORMAT_RG88 +#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') +#endif + +#ifndef DRM_FORMAT_GR88 +#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') +#endif + struct piglit_dma_buf { unsigned w; unsigned h; |