Mesa/python36-buildfix1.patch
Stefan Dirsch b0e644cf2d Accepting request 1180929 from home:sndirsch:branches:X11:XOrg
- Update to new feature release 24.1.0
  --> https://docs.mesa3d.org/relnotes/24.1.0
- Some interesting highlights include:
  * NVIDIA Vulkan driver NVK is now considered ready for prime time.
    Distro packagers are now recommended to include `nouveau` in the
    `vulkan-drivers` list so that their users can have the option of using it
    instead of the proprietary NVIDIA driver.
  * Intel Vulkan driver Anv switched to truly asynchronous VM bind, and Xe
    support for error dump to debug GPU hangs was added.
  * Apple OpenGL driver Asahi has reached OpenGL 4.6 and OpenGL ES 3.2
    support.
  * Broadcom Vulkan driver V3DV gained support for VK_KHR_dynamic_rendering.
  * Arm Mali OpenGL driver Panfrost was prepared for Gen10 (Gxxx), and
    Vulkan driver PanVK was modernised for better Midgard (Txxx) and
    Bifrost (Gxxx) support.
  * All Vulkan drivers have gained support for explicit synchronisation on
    Wayland and X11.
- adjusted patches:
  * n_stop-iris-flicker.patch
  * python36-buildfix1.patch
- supersedes patches:
  * 0001-loader-delete-unused-param-from-pipe_loader_sw_probe.patch
  * 0002-glx-fix-some-indentation.patch
  * 0003-glx-add-an-implicit-param-to-createScreen.patch
  * 0004-glx-pass-implicit-load-param-through-allocation.patch
  * 0005-dri-plumb-a-implicit-param-through-createNewScreen-i.patch
  * 0006-gbm-plumb-an-implicit-param-through-device-creation.patch
  * 0007-frontends-dri-plumb-an-implicit-param-through-screen.patch
  * 0008-pipe-loader-plumb-a-flag-for-implicit-driver-load-th.patch
  * 0009-zink-don-t-print-error-messages-when-failing-an-impl.patch
  * 0010-glx-silence-more-implicit-load-zink-errors.patch
- added libvdpau_d3d12 package
- small cleanup in specfile

OBS-URL: https://build.opensuse.org/request/show/1180929
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=1295
2024-06-14 13:57:58 +00:00

68 lines
2.5 KiB
Diff

Index: mesa-24.1.0/src/nouveau/headers/class_parser.py
===================================================================
--- mesa-24.1.0.orig/src/nouveau/headers/class_parser.py
+++ mesa-24.1.0/src/nouveau/headers/class_parser.py
@@ -9,6 +9,16 @@ import sys
from mako.template import Template
+def removeprefix(s, prefix):
+ if s.startswith(prefix):
+ return s[len(prefix):]
+ return s
+
+def removesuffix(s, suffix):
+ if s.endswith(suffix):
+ return s[:-len(suffix)]
+ return s
+
METHOD_ARRAY_SIZES = {
'BIND_GROUP_CONSTANT_BUFFER' : 16,
'CALL_MME_DATA' : 256,
@@ -293,7 +303,7 @@ def parse_header(nvcl, f):
if ":" in list[2]:
state = 1
elif teststr in list[1]:
- curmthd.field_defs[curfield][list[1].removeprefix(teststr)] = list[2]
+ curmthd.field_defs[curfield][removeprefix(list[1], teststr)] = list[2]
else:
state = 1
@@ -303,7 +313,7 @@ def parse_header(nvcl, f):
if ("0x" in list[2]):
state = 1
else:
- field = list[1].removeprefix(teststr)
+ field = removeprefix(list[1], teststr)
bitfield = list[2].split(":")
curmthd.field_name_start[field] = bitfield[1]
curmthd.field_name_end[field] = bitfield[0]
@@ -324,13 +334,13 @@ def parse_header(nvcl, f):
is_array = 0
if (':' in list[2]):
continue
- name = list[1].removeprefix(teststr)
+ name = removeprefix(list[1], teststr)
if name.endswith("(i)"):
is_array = 1
- name = name.removesuffix("(i)")
+ name = removesuffix(name, "(i)")
if name.endswith("(j)"):
is_array = 1
- name = name.removesuffix("(j)")
+ name = removesuffix(name, "(j)")
x = method()
x.name = name
x.addr = list[2]
@@ -357,8 +367,8 @@ def main():
clheader = os.path.basename(args.in_h)
nvcl = clheader
- nvcl = nvcl.removeprefix("cl")
- nvcl = nvcl.removesuffix(".h")
+ nvcl = removeprefix(nvcl, "cl")
+ nvcl = removesuffix(nvcl, ".h")
nvcl = nvcl.upper()
nvcl = "NV" + nvcl