[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][xorg-team/lib/mesa-amber][debian-unstable] update amber.diff



Title: GitLab

Timo Aaltonen pushed to branch debian-unstable at X Strike Force / lib / Mesa Amber

Commits:

2 changed files:

Changes:

  • debian/patches/amber.diff
    1
    -From acabe7ab4528db94a5afecf1c95adfe57e8bbb54 Mon Sep 17 00:00:00 2001
    
    1
    +From a7acf7050bab2248edcc4c7636deff8503ba0279 Mon Sep 17 00:00:00 2001
    
    2 2
     From: Adam Jackson <ajax@redhat.com>
    
    3 3
     Date: Fri, 30 Apr 2021 14:01:26 -0400
    
    4 4
     Subject: [PATCH] meson: Add "amber" option for automatic LTS build
    
    5 5
      configuration
    
    6 6
     
    
    7
    -Setting amber to true will disable the gallium and vulkan drivers, and
    
    8
    -changes the default for prefer-iris to false. If glvnd is enabled then
    
    9
    -"amber" is used as the default vendor name (though you can still
    
    10
    -override it). Beyond that no attempt is made to use filenames different
    
    11
    -from main, so you will still need to configure your install paths
    
    12
    -appropriately so things don't collide.
    
    7
    +Setting amber to true changes these defaults:
    
    8
    +
    
    9
    +- glvnd defaults to enabled
    
    10
    +- the glvnd vendor name is set to "amber"
    
    11
    +- the gallium and vulkan drivers are disabled
    
    12
    +- prefer-iris defaults to false
    
    13
    +- eglQueryString(EGL_VENDOR) returns "Mesa Project (Amber)"
    
    14
    +
    
    15
    +The megadriver for the classic driver set will be installed to a file
    
    16
    +name unique from Mesa main. Beyond that no attempt is made to use
    
    17
    +filenames different from main - particularly not if glvnd is explicitly
    
    18
    +disabled - so you would still need to configure your install paths
    
    19
    +appropriately so things don't collide, if you want them to not collide.
    
    20
    +But if you have that problem, consider that glvnd already solves it.
    
    21
    +
    
    22
    +This has a quiet dependency on glapi and gbm's library API remaining
    
    23
    +stable. gbm you could fix by linking it statically, glapi is a little
    
    24
    +harder. I think the right move for glapi is to use glvnd's gldispatch
    
    25
    +more directly, but that's not public API at the moment.
    
    13 26
     
    
    14 27
     Reviewed-by: Emma Anholt <emma@anholt.net>
    
    28
    +Reviewed-by: Eric Engestrom <eric@engestrom.ch>
    
    15 29
     ---
    
    16
    - meson.build                      | 29 ++++++++++++++++++++++++++---
    
    17
    - meson_options.txt                | 18 +++++++++++++-----
    
    18
    - src/loader/meson.build           | 12 ++++++++++--
    
    30
    + meson.build                      | 38 ++++++++++++++++++++++++++++----
    
    31
    + meson_options.txt                | 23 +++++++++++++------
    
    32
    + src/egl/main/egldefines.h        |  4 ++++
    
    33
    + src/egl/meson.build              |  2 +-
    
    34
    + src/loader/meson.build           | 12 ++++++++--
    
    19 35
      src/mesa/drivers/dri/meson.build |  2 +-
    
    20
    - 4 files changed, 50 insertions(+), 11 deletions(-)
    
    36
    + 6 files changed, 66 insertions(+), 15 deletions(-)
    
    21 37
     
    
    38
    +diff --git a/meson.build b/meson.build
    
    39
    +index 0aea31260bb..07c77e17a65 100644
    
    22 40
     --- a/meson.build
    
    23 41
     +++ b/meson.build
    
    24 42
     @@ -39,6 +39,13 @@ if get_option('layout') != 'mirror'
    
    ... ... @@ -77,9 +95,18 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    77 95
            _vulkan_drivers = ['amd', 'intel', 'swrast']
    
    78 96
          elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
    
    79 97
            _vulkan_drivers = ['swrast']
    
    80
    -@@ -533,6 +549,13 @@ endif
    
    98
    +@@ -531,8 +547,22 @@ if with_glx != 'disabled'
    
    99
    +   endif
    
    100
    + endif
    
    81 101
      
    
    82
    - with_glvnd = get_option('glvnd')
    
    102
    +-with_glvnd = get_option('glvnd')
    
    103
    ++_glvnd = get_option('glvnd')
    
    104
    ++if _glvnd == 'true' or _glvnd == 'enabled' or (amber and _glvnd == 'auto')
    
    105
    ++  with_glvnd = true
    
    106
    ++else
    
    107
    ++  with_glvnd = false
    
    108
    ++endif
    
    109
    ++
    
    83 110
      glvnd_vendor_name = get_option('glvnd-vendor-name')
    
    84 111
     +if glvnd_vendor_name == 'auto'
    
    85 112
     +  if amber
    
    ... ... @@ -88,12 +115,27 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    88 115
     +    glvnd_vendor_name = 'mesa'
    
    89 116
     +  endif
    
    90 117
     +endif
    
    118
    ++
    
    91 119
      if with_glvnd
    
    92 120
        if with_platform_windows
    
    93 121
          error('glvnd cannot be used on Windows')
    
    122
    +diff --git a/meson_options.txt b/meson_options.txt
    
    123
    +index 32c7593ee8e..6889646594f 100644
    
    94 124
     --- a/meson_options.txt
    
    95 125
     +++ b/meson_options.txt
    
    96
    -@@ -321,7 +321,7 @@ option(
    
    126
    +@@ -302,8 +302,9 @@ option(
    
    127
    + )
    
    128
    + option(
    
    129
    +   'glvnd',
    
    130
    +-  type : 'boolean',
    
    131
    +-  value : false,
    
    132
    ++  type : 'combo',
    
    133
    ++  value : 'auto',
    
    134
    ++  choices : ['auto', 'true', 'false', 'enabled', 'disabled'],
    
    135
    +   description : 'Enable GLVND support.'
    
    136
    + )
    
    137
    + option(
    
    138
    +@@ -321,7 +322,7 @@ option(
    
    97 139
      option(
    
    98 140
        'glvnd-vendor-name',
    
    99 141
        type : 'string',
    
    ... ... @@ -102,7 +144,7 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    102 144
        description : 'Vendor name string to use for glvnd libraries'
    
    103 145
      )
    
    104 146
      option(
    
    105
    -@@ -457,14 +457,16 @@ option(
    
    147
    +@@ -457,14 +458,16 @@ option(
    
    106 148
      )
    
    107 149
      option(
    
    108 150
        'prefer-iris',
    
    ... ... @@ -123,16 +165,47 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    123 165
        description : 'Prefer new crocus driver over older i965 driver for gen4-7'
    
    124 166
      )
    
    125 167
      option('egl-lib-suffix',
    
    126
    -@@ -530,3 +532,9 @@ option(
    
    168
    +@@ -530,3 +533,9 @@ option(
    
    127 169
        value : false,
    
    128 170
        description : 'Build gallium VMware/svga driver with mksGuestStats instrumentation.'
    
    129 171
      )
    
    130 172
     +option(
    
    131 173
     +  'amber',
    
    132 174
     +  type : 'boolean',
    
    133
    -+  value : true,
    
    134
    -+  description : 'Configure LTS build to coexist with main branch Mesa > 21.2',
    
    175
    ++  value : false,
    
    176
    ++  description : 'Configure LTS build to coexist with Mesa >= 22.0'
    
    135 177
     +)
    
    178
    +diff --git a/src/egl/main/egldefines.h b/src/egl/main/egldefines.h
    
    179
    +index c925e0ca553..791f4435439 100644
    
    180
    +--- a/src/egl/main/egldefines.h
    
    181
    ++++ b/src/egl/main/egldefines.h
    
    182
    +@@ -46,7 +46,11 @@ extern "C" {
    
    183
    + #define _EGL_MAX_PBUFFER_WIDTH 4096
    
    184
    + #define _EGL_MAX_PBUFFER_HEIGHT 4096
    
    185
    + 
    
    186
    ++#ifdef AMBER
    
    187
    ++#define _EGL_VENDOR_STRING "Mesa Project (Amber)"
    
    188
    ++#else
    
    189
    + #define _EGL_VENDOR_STRING "Mesa Project"
    
    190
    ++#endif
    
    191
    + 
    
    192
    + #ifdef __cplusplus
    
    193
    + }
    
    194
    +diff --git a/src/egl/meson.build b/src/egl/meson.build
    
    195
    +index 65faf607705..b6f7d1cf3d4 100644
    
    196
    +--- a/src/egl/meson.build
    
    197
    ++++ b/src/egl/meson.build
    
    198
    +@@ -165,7 +165,7 @@ else
    
    199
    +   files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
    
    200
    +   files_egl += files('main/eglglvnd.c', 'main/egldispatchstubs.c')
    
    201
    +   glvnd_config = configuration_data()
    
    202
    +-  glvnd_config.set('glvnd_vendor_name', get_option('glvnd-vendor-name'))
    
    203
    ++  glvnd_config.set('glvnd_vendor_name', glvnd_vendor_name)
    
    204
    +   configure_file(
    
    205
    +     configuration: glvnd_config,
    
    206
    +     input : 'main/50_mesa.json',
    
    207
    +diff --git a/src/loader/meson.build b/src/loader/meson.build
    
    208
    +index 927f4af11f1..15818c070fa 100644
    
    136 209
     --- a/src/loader/meson.build
    
    137 210
     +++ b/src/loader/meson.build
    
    138 211
     @@ -41,11 +41,19 @@ loader_c_args = [
    
    ... ... @@ -157,6 +230,8 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    157 230
        loader_c_args += ['-DPREFER_CROCUS']
    
    158 231
      endif
    
    159 232
      
    
    233
    +diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build
    
    234
    +index 239ca962c2a..b4d22a61c3d 100644
    
    160 235
     --- a/src/mesa/drivers/dri/meson.build
    
    161 236
     +++ b/src/mesa/drivers/dri/meson.build
    
    162 237
     @@ -51,7 +51,7 @@ endif
    
    ... ... @@ -168,3 +243,6 @@ Reviewed-by: Emma Anholt <emma@anholt.net>
    168 243
          [],
    
    169 244
          link_whole : _dri_drivers,
    
    170 245
          link_with : [
    
    246
    +-- 
    
    247
    +GitLab
    
    248
    +

  • debian/rules
    ... ... @@ -78,7 +78,6 @@ confflags_EGL = -Dplatforms="$(EGL_PLATFORMS)"
    78 78
     
    
    79 79
     confflags += \
    
    80 80
     	-Damber=true \
    
    81
    -	-Dglvnd-vendor-name=amber \
    
    82 81
     	-Ddri-drivers="[$(DRI_DRIVERS_LIST)]" \
    
    83 82
     	-Ddri-drivers-path=/usr/lib/$(DEB_HOST_MULTIARCH)/dri \
    
    84 83
     	-Ddri-search-path='/usr/lib/$(DEB_HOST_MULTIARCH)/dri:\$$$${ORIGIN}/dri:/usr/lib/dri' \
    


  • Reply to: