Skip to content

Commit fbe1667

Browse files
flibitijibibomisyltoad
authored andcommitted
rendervulkan: Only define 32-bit float DRM_FORMATs if necessary.
Newer versions of the libdrm headers define this for us.
1 parent c3cc9b8 commit fbe1667

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/rendervulkan.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,11 +191,19 @@ struct wsi_memory_allocate_info {
191191
bool implicit_sync;
192192
};
193193

194-
// DRM doesn't have 32bit floating point formats, so add our own
194+
// DRM doesn't always have 32bit floating point formats, so add our own if necessary
195+
196+
#ifndef DRM_FORMAT_ABGR32323232F
195197
#define DRM_FORMAT_ABGR32323232F fourcc_code('A', 'B', '8', 'F')
198+
#endif
196199

200+
#ifndef DRM_FORMAT_R16F
197201
#define DRM_FORMAT_R16F fourcc_code('R', '1', '6', 'F')
202+
#endif
203+
204+
#ifndef DRM_FORMAT_R32F
198205
#define DRM_FORMAT_R32F fourcc_code('R', '3', '2', 'F')
206+
#endif
199207

200208
struct {
201209
uint32_t DRMFormat;

0 commit comments

Comments
 (0)