Compare commits
2 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 5b0e7605d5 | |||
| 8ffae0ade9 |
84
0001-egl-gbm-add-FP16-DRM-format.patch
Normal file
84
0001-egl-gbm-add-FP16-DRM-format.patch
Normal file
@@ -0,0 +1,84 @@
|
||||
From 4e0d15931611de7b4d4cb95a52b8661a6d5a0540 Mon Sep 17 00:00:00 2001
|
||||
From: Austin Shafer <ashafer@badland.io>
|
||||
Date: Fri, 21 Nov 2025 11:04:45 -0500
|
||||
Subject: [PATCH] egl-gbm: add FP16 DRM format
|
||||
|
||||
---
|
||||
src/gbm-display.c | 47 +++++++++++++++++++++++++++++++++--------------
|
||||
1 file changed, 33 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/gbm-display.c b/src/gbm-display.c
|
||||
index 28f33e9..f3cc607 100644
|
||||
--- a/src/gbm-display.c
|
||||
+++ b/src/gbm-display.c
|
||||
@@ -378,7 +378,7 @@ done:
|
||||
static uint32_t ConfigToDrmFourCC(GbmDisplay* display, EGLConfig config)
|
||||
{
|
||||
EGLDisplay dpy = display->devDpy;
|
||||
- EGLint r, g, b, a;
|
||||
+ EGLint r, g, b, a, componentType;
|
||||
EGLBoolean ret = EGL_TRUE;
|
||||
|
||||
ret &= display->data->egl.GetConfigAttrib(dpy,
|
||||
@@ -397,6 +397,10 @@ static uint32_t ConfigToDrmFourCC(GbmDisplay* display, EGLConfig config)
|
||||
config,
|
||||
EGL_ALPHA_SIZE,
|
||||
&a);
|
||||
+ ret &= display->data->egl.GetConfigAttrib(dpy,
|
||||
+ config,
|
||||
+ EGL_COLOR_COMPONENT_TYPE_EXT,
|
||||
+ &componentType);
|
||||
|
||||
if (!ret) {
|
||||
/*
|
||||
@@ -414,19 +418,34 @@ static uint32_t ConfigToDrmFourCC(GbmDisplay* display, EGLConfig config)
|
||||
#define PACK_CONFIG(r_, g_, b_, a_) \
|
||||
(((r_) << 24ULL) | ((g_) << 16ULL) | ((b_) << 8ULL) | (a_))
|
||||
|
||||
- switch (PACK_CONFIG(r, g, b, a)) {
|
||||
- case PACK_CONFIG(8, 8, 8, 0):
|
||||
- return DRM_FORMAT_XRGB8888;
|
||||
- case PACK_CONFIG(8, 8, 8, 8):
|
||||
- return DRM_FORMAT_ARGB8888;
|
||||
- case PACK_CONFIG(5, 6, 5, 0):
|
||||
- return DRM_FORMAT_RGB565;
|
||||
- case PACK_CONFIG(10, 10, 10, 0):
|
||||
- return DRM_FORMAT_XRGB2101010;
|
||||
- case PACK_CONFIG(10, 10, 10, 2):
|
||||
- return DRM_FORMAT_ARGB2101010;
|
||||
- default:
|
||||
- return 0; /* DRM_FORMAT_INVALID */
|
||||
+ if (componentType == EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT) {
|
||||
+ switch (PACK_CONFIG(r, g, b, a)) {
|
||||
+ case PACK_CONFIG(16, 16, 16, 0):
|
||||
+ return DRM_FORMAT_XBGR16161616F;
|
||||
+ case PACK_CONFIG(16, 16, 16, 16):
|
||||
+ return DRM_FORMAT_ABGR16161616F;
|
||||
+ default:
|
||||
+ return 0; /* DRM_FORMAT_INVALID */
|
||||
+ }
|
||||
+ } else {
|
||||
+ switch (PACK_CONFIG(r, g, b, a)) {
|
||||
+ case PACK_CONFIG(8, 8, 8, 0):
|
||||
+ return DRM_FORMAT_XRGB8888;
|
||||
+ case PACK_CONFIG(8, 8, 8, 8):
|
||||
+ return DRM_FORMAT_ARGB8888;
|
||||
+ case PACK_CONFIG(5, 6, 5, 0):
|
||||
+ return DRM_FORMAT_RGB565;
|
||||
+ case PACK_CONFIG(10, 10, 10, 0):
|
||||
+ return DRM_FORMAT_XRGB2101010;
|
||||
+ case PACK_CONFIG(10, 10, 10, 2):
|
||||
+ return DRM_FORMAT_ARGB2101010;
|
||||
+ case PACK_CONFIG(16, 16, 16, 0):
|
||||
+ return DRM_FORMAT_XBGR16161616;
|
||||
+ case PACK_CONFIG(16, 16, 16, 16):
|
||||
+ return DRM_FORMAT_ABGR16161616;
|
||||
+ default:
|
||||
+ return 0; /* DRM_FORMAT_INVALID */
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.51.0
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
From fe861e3d83d893fd5239b7fba4439d22dc62602c Mon Sep 17 00:00:00 2001
|
||||
From: Simone Caronni <scaronni@nvidia.com>
|
||||
Date: Thu, 19 Sep 2024 16:04:01 +0200
|
||||
Subject: [PATCH] Add ICD json file
|
||||
|
||||
---
|
||||
src/15_nvidia_gbm.json | 6 ++++++
|
||||
src/meson.build | 3 +++
|
||||
2 files changed, 9 insertions(+)
|
||||
create mode 100644 src/15_nvidia_gbm.json
|
||||
|
||||
diff --git a/src/15_nvidia_gbm.json b/src/15_nvidia_gbm.json
|
||||
new file mode 100644
|
||||
index 0000000..5c2aa9b
|
||||
--- /dev/null
|
||||
+++ b/src/15_nvidia_gbm.json
|
||||
@@ -0,0 +1,6 @@
|
||||
+{
|
||||
+ "file_format_version" : "1.0.0",
|
||||
+ "ICD" : {
|
||||
+ "library_path" : "libnvidia-egl-gbm.so.1"
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/meson.build b/src/meson.build
|
||||
index a8fff2c..916ca28 100644
|
||||
--- a/src/meson.build
|
||||
+++ b/src/meson.build
|
||||
@@ -35,3 +35,6 @@ egl_gbm = library('nvidia-egl-gbm',
|
||||
version : meson.project_version(),
|
||||
install : true,
|
||||
)
|
||||
+
|
||||
+install_data('15_nvidia_gbm.json',
|
||||
+ install_dir: '@0@/egl/egl_external_platform.d'.format(get_option('datadir')))
|
||||
--
|
||||
2.43.0
|
||||
|
||||
3
egl-gbm-1.1.2.1.tar.gz
Normal file
3
egl-gbm-1.1.2.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7485553525b4212842230098b12671469bddb3c37063a89383f31865aea63aef
|
||||
size 18048
|
||||
BIN
egl-gbm-1.1.2.tar.gz
LFS
BIN
egl-gbm-1.1.2.tar.gz
LFS
Binary file not shown.
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 22 14:57:58 UTC 2025 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
- Update to version 1.1.2.1
|
||||
- supersedes U_Add-ICD-json-file.patch
|
||||
- 0001-egl-gbm-add-FP16-DRM-format.patch
|
||||
* add FP16 DRM format
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 7 13:24:46 UTC 2024 - Stefan Dirsch <sndirsch@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libnvidia-egl-gbm
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
# Copyright (c) 2025 SUSE LLC and contributors
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -20,7 +20,7 @@
|
||||
%define lname libnvidia-egl-gbm%{so_ver}
|
||||
%define rname egl-gbm
|
||||
Name: libnvidia-egl-gbm
|
||||
Version: 1.1.2
|
||||
Version: 1.1.2.1
|
||||
Release: 0
|
||||
Summary: The GBM EGL external platform library
|
||||
License: MIT
|
||||
@@ -28,7 +28,7 @@ Group: Development/Libraries/C and C++
|
||||
URL: https://github.com/NVIDIA/egl-gbm
|
||||
Source0: https://github.com/NVIDIA/egl-gbm/archive/%{version}/%{rname}-%{version}.tar.gz
|
||||
Source1: baselibs.conf
|
||||
Patch0: U_Add-ICD-json-file.patch
|
||||
Patch0: 0001-egl-gbm-add-FP16-DRM-format.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: meson
|
||||
BuildRequires: ninja
|
||||
|
||||
Reference in New Issue
Block a user