Skip to content

Commit

Permalink
mesa 24.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mmozeiko committed Aug 15, 2024
1 parent 11630a5 commit e0ef4bd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 19 deletions.
29 changes: 19 additions & 10 deletions build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setlocal enabledelayedexpansion

set LLVM_VERSION=18.1.8
set MESA_VERSION=24.1.5
set MESA_VERSION=24.2.0

rem *** architectures ***

Expand Down Expand Up @@ -76,6 +76,14 @@ python -c "import mako" 2>nul || (
)
)

python -c "import yaml" 2>nul || (
pip install pyyaml
python -c "import yaml" 2>nul || (
echo ERROR: "yaml" module not found for python
exit /b 1
)
)

where /q git.exe || (
echo ERROR: "git.exe" not found
exit /b 1
Expand Down Expand Up @@ -262,7 +270,7 @@ rem *** extra libs ***

set LINK=version.lib

rem *** llvmpipe ***
rem *** llvmpipe, lavapipe, osmesa ***

rd /s /q mesa.build-%MESA_ARCH% 1>nul 2>nul
meson setup ^
Expand All @@ -280,9 +288,9 @@ meson setup ^
-Dvulkan-drivers=swrast ^
!MESON_CROSS! || exit /b 1
ninja -C mesa.build-%MESA_ARCH% install || exit /b 1
python mesa.src\src\vulkan\util\vk_icd_gen.py --api-version 1.1 --xml mesa.src\src\vulkan\registry\vk.xml --lib-path vulkan_lvp.dll --out mesa-llvmpipe-%MESA_ARCH%\bin\lvp_icd.!TARGET_ARCH_NAME!.json || exit /b 1
python mesa.src\src\vulkan\util\vk_icd_gen.py --api-version 1.3 --xml mesa.src\src\vulkan\registry\vk.xml --lib-path vulkan_lvp.dll --out mesa-llvmpipe-%MESA_ARCH%\bin\lvp_icd.!TARGET_ARCH_NAME!.json || exit /b 1

rem *** d3d12 & dzn ***
rem *** d3d12, dzn ***

rd /s /q mesa.build-%MESA_ARCH% 1>nul 2>nul
meson setup ^
Expand All @@ -301,6 +309,11 @@ meson setup ^
!MESON_CROSS! || exit /b 1
ninja -C mesa.build-%MESA_ARCH% install || exit /b 1
python mesa.src\src\vulkan\util\vk_icd_gen.py --api-version 1.1 --xml mesa.src\src\vulkan\registry\vk.xml --lib-path vulkan_dzn.dll --out mesa-d3d12-%MESA_ARCH%\bin\dzn_icd.!TARGET_ARCH_NAME!.json || exit /b 1
if exist "%ProgramFiles(x86)%\Windows Kits\10\Redist\D3D\%MESA_ARCH%\dxil.dll" (
copy /y "%ProgramFiles(x86)%\Windows Kits\10\Redist\D3D\%MESA_ARCH%\dxil.dll" mesa-d3d12-%MESA_ARCH%\bin\
) else if exist "%WindowsSdkVerBinPath%%MESA_ARCH%\dxil.dll" (
copy /y "%WindowsSdkVerBinPath%%MESA_ARCH%\dxil.dll" mesa-d3d12-%MESA_ARCH%\bin\
)

rem *** zink ***

Expand Down Expand Up @@ -349,11 +362,7 @@ if "%GITHUB_WORKFLOW%" neq "" (
mkdir archive-d3d12
pushd archive-d3d12
copy /y ..\mesa-d3d12-%MESA_ARCH%\bin\opengl32.dll .
if exist "%ProgramFiles(x86)%\Windows Kits\10\Redist\D3D\%MESA_ARCH%\dxil.dll" (
copy /y "%ProgramFiles(x86)%\Windows Kits\10\Redist\D3D\%MESA_ARCH%\dxil.dll" .
) else if exist "%WindowsSdkVerBinPath%%MESA_ARCH%\dxil.dll" (
copy /y "%WindowsSdkVerBinPath%%MESA_ARCH%\dxil.dll" .
)
copy /y ..\mesa-d3d12-%MESA_ARCH%\bin\dxil.dll .
%SZIP% a -mx=9 ..\mesa-d3d12-%MESA_ARCH%-%MESA_VERSION%.zip
popd

Expand All @@ -366,7 +375,7 @@ if "%GITHUB_WORKFLOW%" neq "" (
mkdir archive-dzn
pushd archive-dzn
copy /y ..\mesa-d3d12-%MESA_ARCH%\bin\vulkan_dzn.dll .
copy /y ..\archive-d3d12\dxil.dll .
copy /y ..\mesa-d3d12-%MESA_ARCH%\bin\dxil.dll .
copy /y ..\mesa-d3d12-%MESA_ARCH%\bin\dzn_icd.!TARGET_ARCH_NAME!.json .
%SZIP% a -mx=9 ..\mesa-dzn-%MESA_ARCH%-%MESA_VERSION%.zip
popd
Expand Down
18 changes: 9 additions & 9 deletions mesa.patch
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
diff --git meson.build meson.build
index 6b22930..4af29b1 100644
index 9fb4160..6f62a3f 100644
--- meson.build
+++ meson.build
@@ -582,7 +582,7 @@ if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
@@ -579,7 +579,7 @@ if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
endif

dep_dxheaders = null_dep
-if with_gallium_d3d12 or with_microsoft_clc or with_microsoft_vk
+if true or with_gallium_d3d12 or with_microsoft_clc or with_microsoft_vk
+if true
dep_dxheaders = dependency('directx-headers', required : false)
if not dep_dxheaders.found()
dep_dxheaders = dependency('DirectX-Headers',
@@ -944,9 +944,6 @@ except:
@@ -954,9 +954,6 @@ except:
import mako
assert Version(mako.__version__) >= Version("0.8.0")
''', check: false)
-if has_mako.returncode() != 0
- error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
-endif

if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
error('When using GCC, version 4.4.6 or later is required.')
@@ -1084,7 +1081,6 @@ if cc.get_argument_syntax() == 'msvc'
has_yaml = run_command(
prog_python, '-c',
@@ -1104,7 +1101,6 @@ if cc.get_argument_syntax() == 'msvc'
'/wd5105', # macro expansion producing 'defined' has undefined behavior (winbase.h, need Windows SDK upgrade)
'/we4020', # Error when passing the wrong number of parameters
'/we4024', # Error when passing different type of parameter
- '/we4189', # 'identifier' : local variable is initialized but not referenced
'/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line
]
c_args += cc.get_supported_arguments(_trial)
@@ -1519,7 +1515,7 @@ if cc.links('int main() { return 0; }',
@@ -1539,7 +1535,7 @@ if cc.links('int main() { return 0; }',
args : '-Wl,--dynamic-list=@0@'.format(
join_paths(meson.current_source_dir(), 'build-support/conftest.dyn')),
name : 'dynamic-list')
Expand All @@ -38,7 +38,7 @@ index 6b22930..4af29b1 100644
endif

ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
@@ -1716,7 +1712,7 @@ if dep_libudev.found()
@@ -1735,7 +1731,7 @@ if dep_libudev.found()
pre_args += '-DHAVE_LIBUDEV'
endif

Expand Down

0 comments on commit e0ef4bd

Please sign in to comment.