format: Generate endian-independent format aliases
Instead of having a hardcoded list of endian-independent format aliases in the header, generate them from the format definitions. Signed-off-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29649>
This commit is contained in:
@@ -8,7 +8,7 @@ prog_asahi_clc = executable(
|
||||
include_directories : [inc_include, inc_src],
|
||||
c_args : [pre_args, no_override_init_args],
|
||||
link_args : [ld_args_build_id],
|
||||
dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_nir],
|
||||
dependencies : [idep_mesaclc, dep_llvm, dep_spirv_tools, idep_nir, idep_mesautil],
|
||||
# If we can run host binaries directly, just build asahi_clc for the host.
|
||||
# Most commonly this happens when doing a cross compile from an x86_64 build
|
||||
# machine to an x86 host
|
||||
|
@@ -92,7 +92,7 @@ idep_agx_builder_h = declare_dependency(
|
||||
libasahi_compiler = static_library(
|
||||
'asahi_compiler',
|
||||
[libasahi_agx_files, agx_opcodes_c, agx_nir_algebraic_c],
|
||||
dependencies: [idep_nir, idep_agx_opcodes_h, idep_agx_builder_h],
|
||||
dependencies: [idep_nir, idep_agx_opcodes_h, idep_agx_builder_h, idep_mesautil],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
@@ -114,7 +114,7 @@ if with_tests
|
||||
),
|
||||
c_args : [c_msvc_compat_args, no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies: [idep_gtest, idep_nir, idep_agx_opcodes_h, idep_agx_builder_h],
|
||||
dependencies: [idep_gtest, idep_nir, idep_agx_opcodes_h, idep_agx_builder_h, idep_mesautil],
|
||||
link_with : [libasahi_compiler],
|
||||
),
|
||||
suite : ['asahi'],
|
||||
|
@@ -10,6 +10,7 @@ libasahi_layout = static_library(
|
||||
'asahi_layout',
|
||||
[libasahi_layout_files],
|
||||
include_directories : [inc_include, inc_src],
|
||||
dependencies: idep_mesautil,
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
|
@@ -92,7 +92,7 @@ libasahi_lib = static_library(
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with: [libasahi_decode, libvdrm],
|
||||
dependencies: [dep_libdrm, dep_valgrind, idep_nir],
|
||||
dependencies: [dep_libdrm, dep_valgrind, idep_nir, idep_mesautil],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
|
@@ -44,7 +44,7 @@ libbroadcom_compiler = static_library(
|
||||
include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_broadcom],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers, idep_mesautil],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
|
@@ -48,7 +48,7 @@ libv3d_neon = static_library(
|
||||
],
|
||||
c_args : [v3d_args, v3d_neon_c_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers],
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_nir_headers, idep_mesautil],
|
||||
)
|
||||
|
||||
libbroadcom_v3d = static_library(
|
||||
@@ -63,7 +63,7 @@ libbroadcom_v3d = static_library(
|
||||
link_whole : v3d_libs + per_version_libs,
|
||||
link_with: [libv3d_neon],
|
||||
build_by_default : false,
|
||||
dependencies: [dep_valgrind, dep_thread],
|
||||
dependencies: [dep_valgrind, dep_thread, idep_mesautil],
|
||||
)
|
||||
|
||||
if with_broadcom_vk
|
||||
|
@@ -71,6 +71,7 @@ v3dv_deps = [
|
||||
idep_vulkan_util,
|
||||
idep_vulkan_runtime,
|
||||
idep_vulkan_wsi,
|
||||
idep_mesautil,
|
||||
]
|
||||
|
||||
if with_platform_x11
|
||||
|
@@ -5,7 +5,7 @@ libglsl_util = static_library(
|
||||
'glsl_util',
|
||||
glsl_util_files,
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies : dep_valgrind,
|
||||
dependencies : [dep_valgrind, idep_mesautil],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
)
|
||||
@@ -229,7 +229,7 @@ libglsl = static_library(
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
link_with : libglcpp,
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies : idep_nir,
|
||||
dependencies : [idep_nir, idep_mesautil],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
|
@@ -11,6 +11,7 @@ builtin_types_h = custom_target(
|
||||
output : 'builtin_types.h',
|
||||
command : [prog_python, '@INPUT@', '@OUTPUT@'],
|
||||
depend_files : files('builtin_types.py'),
|
||||
depends : u_format_gen_h,
|
||||
)
|
||||
|
||||
builtin_types_c = custom_target(
|
||||
|
@@ -313,7 +313,7 @@ _libnir = static_library(
|
||||
include_directories : [inc_include, inc_src],
|
||||
c_args : [c_msvc_compat_args, no_override_init_args, no_misleading_indentation],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_compiler, dep_valgrind],
|
||||
dependencies : [idep_compiler, dep_valgrind, idep_mesautil],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
|
@@ -26,6 +26,7 @@ libetnaviv_drm = static_library(
|
||||
dependencies : [
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
idep_mesautil,
|
||||
idep_etna_common,
|
||||
],
|
||||
link_with : [
|
||||
|
@@ -533,7 +533,7 @@ if with_tests
|
||||
'util/u_surface_test.cpp',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
link_with: libgallium,
|
||||
dependencies : [idep_gtest],
|
||||
dependencies : [idep_gtest, idep_mesautil],
|
||||
),
|
||||
suite: 'gallium',
|
||||
protocol : 'gtest',
|
||||
|
@@ -47,7 +47,7 @@ foreach v : ['40', '45', '50', '60', '70', '75', '80']
|
||||
'-DGFX_VERx10=@0@'.format(v),
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_genxml, idep_nir_headers, idep_intel_dev, idep_intel_blorp_elk],
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_mesautil, idep_genxml, idep_nir_headers, idep_intel_dev, idep_intel_blorp_elk],
|
||||
)
|
||||
endforeach
|
||||
|
||||
@@ -64,7 +64,7 @@ libcrocus = static_library(
|
||||
cpp_args : [sse2_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [
|
||||
dep_libdrm, dep_valgrind, idep_genxml,
|
||||
dep_libdrm, dep_valgrind, idep_genxml, idep_mesautil,
|
||||
idep_libintel_common, idep_nir_headers,
|
||||
idep_intel_dev, idep_intel_blorp_elk, idep_intel_decoder_elk,
|
||||
idep_intel_compiler_elk,
|
||||
|
@@ -129,7 +129,7 @@ libd3d12 = static_library(
|
||||
[files_libd3d12, sha1_h],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies: [idep_nir_headers, idep_libdxil_compiler, dep_dxheaders],
|
||||
dependencies: [idep_nir_headers, idep_libdxil_compiler, dep_dxheaders, idep_mesautil],
|
||||
c_args: libd3d12_compiler_args,
|
||||
cpp_args: libd3d12_compiler_args,
|
||||
)
|
||||
|
@@ -112,7 +112,7 @@ if with_tests
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_gallium],
|
||||
link_with : [libetnaviv],
|
||||
dependencies : [idep_gtest, idep_nir],
|
||||
dependencies : [idep_gtest, idep_nir, idep_mesautil],
|
||||
),
|
||||
suite : ['compiler', 'etnaviv'],
|
||||
protocol : 'gtest',
|
||||
|
@@ -50,7 +50,7 @@ libi915 = static_library(
|
||||
files_i915,
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_gallium, inc_gallium_aux],
|
||||
dependencies : idep_nir,
|
||||
dependencies : [idep_nir, idep_mesautil],
|
||||
)
|
||||
|
||||
driver_i915 = declare_dependency(
|
||||
|
@@ -66,7 +66,7 @@ foreach v : ['80', '90', '110', '120', '125', '200']
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, dep_valgrind, idep_genxml, idep_nir_headers,
|
||||
idep_intel_driver_ds_headers, idep_intel_shaders,
|
||||
idep_intel_blorp],
|
||||
idep_intel_blorp, idep_mesautil],
|
||||
)
|
||||
endforeach
|
||||
|
||||
@@ -86,7 +86,8 @@ libiris = static_library(
|
||||
idep_libintel_common, idep_intel_driver_ds, idep_intel_dev,
|
||||
idep_intel_blorp_elk, idep_intel_decoder_elk,
|
||||
idep_intel_blorp, idep_intel_decoder_brw,
|
||||
idep_intel_compiler_elk, idep_intel_compiler_brw],
|
||||
idep_intel_compiler_elk, idep_intel_compiler_brw,
|
||||
idep_mesautil],
|
||||
link_with : [
|
||||
iris_per_hw_ver_libs, libisl,
|
||||
libintel_perf
|
||||
|
@@ -5,7 +5,7 @@ liblima_noop_drm_shim = shared_library(
|
||||
'lima_noop_drm_shim',
|
||||
'lima_noop.c',
|
||||
include_directories: [inc_include, inc_src],
|
||||
dependencies: dep_drm_shim,
|
||||
dependencies: [dep_drm_shim, idep_mesautil],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
install : true,
|
||||
)
|
||||
|
@@ -56,7 +56,7 @@ foreach ver : panfrost_versions
|
||||
include_directories : panfrost_includes,
|
||||
c_args : ['-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_pan_packers, idep_nir, dep_libdrm],
|
||||
dependencies : [idep_pan_packers, idep_nir, dep_libdrm, idep_mesautil],
|
||||
)
|
||||
endforeach
|
||||
|
||||
|
@@ -168,7 +168,7 @@ libr600 = static_library(
|
||||
inc_src, inc_mapi, inc_mesa, inc_include, inc_gallium, inc_gallium_aux, inc_amd_common,
|
||||
inc_gallium_drivers,
|
||||
],
|
||||
dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers],
|
||||
dependencies: [dep_libdrm_radeon, dep_elf, dep_llvm, idep_nir, idep_nir_headers, idep_mesautil],
|
||||
)
|
||||
|
||||
driver_r600 = declare_dependency(
|
||||
|
@@ -5,7 +5,7 @@ r600_test_lib = static_library('r600_test', 'sfn_test_shaders.cpp',
|
||||
inc_gallium, inc_gallium_aux, inc_amd_common,
|
||||
inc_gallium_drivers, ],
|
||||
dependencies : [idep_gtest, dep_thread, dep_llvm, idep_nir,
|
||||
idep_nir_headers],
|
||||
idep_nir_headers, idep_mesautil],
|
||||
|
||||
)
|
||||
|
||||
@@ -15,7 +15,7 @@ r600_test_dep = declare_dependency(
|
||||
inc_gallium_drivers, ],
|
||||
link_with : [ libr600, libmesa, libgalliumvl, libgallium, libradeonwinsys, r600_test_lib],
|
||||
dependencies : [idep_gtest, dep_thread, dep_llvm, idep_nir,
|
||||
idep_nir_headers]
|
||||
idep_nir_headers, idep_mesautil]
|
||||
)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ if with_tests
|
||||
t,
|
||||
executable('test-@0@-r600-sfn'.format(t),
|
||||
['sfn_@0@_test.cpp'.format(t)],
|
||||
dependencies : [r600_test_dep],
|
||||
dependencies : [r600_test_dep, idep_mesautil],
|
||||
),
|
||||
suite : ['r600']
|
||||
)
|
||||
|
@@ -64,7 +64,7 @@ libsoftpipe = static_library(
|
||||
include_directories : [inc_gallium_aux, inc_gallium, inc_include, inc_src],
|
||||
c_args : [c_msvc_compat_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : idep_nir,
|
||||
dependencies : [idep_nir, idep_mesautil],
|
||||
)
|
||||
|
||||
driver_softpipe = declare_dependency(
|
||||
|
@@ -55,7 +55,7 @@ foreach ver : v3d_versions
|
||||
],
|
||||
c_args : [v3d_args, '-DV3D_VERSION=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_v3d_hw, dep_libdrm, dep_valgrind, idep_nir_headers],
|
||||
dependencies : [dep_v3d_hw, dep_libdrm, dep_valgrind, idep_nir_headers, idep_mesautil],
|
||||
)
|
||||
|
||||
endforeach
|
||||
|
@@ -22,7 +22,7 @@ libgallium_d3d10 = shared_library(
|
||||
libgallium, libwsgdi
|
||||
],
|
||||
dependencies : [
|
||||
dep_ws2_32, idep_nir, driver_swrast
|
||||
dep_ws2_32, idep_nir, driver_swrast, idep_mesautil
|
||||
],
|
||||
name_prefix: '',
|
||||
install : true,
|
||||
|
@@ -13,7 +13,7 @@ libvulkan_lvp = shared_library(
|
||||
# The linker still expects a definition for weak symbols at build time, just not at runtime.
|
||||
# We have to forcibly ignore undefined symbols, which unfortunately applies to all symbols.
|
||||
override_options : ['b_lundef=@0@'.format(host_machine.system() == 'darwin' ? 'false' : get_option('b_lundef').to_string())],
|
||||
dependencies : driver_llvmpipe,
|
||||
dependencies : [driver_llvmpipe, idep_mesautil],
|
||||
name_prefix : host_machine.system() == 'windows' ? '' : [],
|
||||
install : true,
|
||||
)
|
||||
|
@@ -32,7 +32,7 @@ libgl = shared_library(
|
||||
libgalliumvl_stub, libws_xlib,
|
||||
libgallium, libmesa, gallium_xlib_link_with,
|
||||
],
|
||||
dependencies : [dep_x11, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_virgl, driver_asahi],
|
||||
dependencies : [dep_x11, idep_mesautil, dep_thread, dep_clock, dep_unwind, driver_swrast, driver_virgl, driver_asahi],
|
||||
install : true,
|
||||
version : '1.5.0',
|
||||
darwin_versions: '4.0.0',
|
||||
|
@@ -38,7 +38,7 @@ libosmesa = shared_library(
|
||||
libmesa, libgallium, libws_null, osmesa_link_with,
|
||||
],
|
||||
dependencies : [
|
||||
dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind, driver_swrast
|
||||
dep_ws2_32, dep_selinux, dep_thread, dep_clock, dep_unwind, driver_swrast, idep_mesautil,
|
||||
],
|
||||
name_prefix : host_machine.system() == 'windows' ? '' : [], # otherwise mingw will create libosmesa.dll
|
||||
soversion : host_machine.system() == 'windows' ? '' : '8',
|
||||
@@ -74,7 +74,7 @@ if with_tests
|
||||
'test-render.cpp',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
link_with: libosmesa,
|
||||
dependencies : [idep_gtest],
|
||||
dependencies : [idep_gtest, idep_mesautil],
|
||||
),
|
||||
suite: 'gallium',
|
||||
protocol : 'gtest',
|
||||
|
@@ -44,6 +44,7 @@ librusticl = shared_library(
|
||||
driver_zink,
|
||||
idep_nir,
|
||||
idep_vtn,
|
||||
idep_mesautil,
|
||||
],
|
||||
link_args : [
|
||||
ld_args_build_id,
|
||||
|
@@ -9,6 +9,7 @@ libteflon = shared_library(
|
||||
dependencies : [
|
||||
driver_etnaviv,
|
||||
idep_nir,
|
||||
idep_mesautil,
|
||||
],
|
||||
install : true,
|
||||
)
|
||||
@@ -44,4 +45,4 @@ if with_tests
|
||||
link_with : [ tensorflow_lite ],
|
||||
include_directories : [ inc_include ],
|
||||
)
|
||||
endif
|
||||
endif
|
||||
|
@@ -9,5 +9,5 @@ libcrocuswinsys = static_library(
|
||||
inc_gallium, inc_gallium_aux, inc_gallium_drivers,
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_valgrind, idep_intel_dev],
|
||||
dependencies : [dep_valgrind, idep_intel_dev, idep_mesautil],
|
||||
)
|
||||
|
@@ -12,7 +12,7 @@ libd3d12winsys = static_library(
|
||||
'd3d12winsys',
|
||||
files_libd3d12winsys,
|
||||
include_directories : [inc_src, inc_wgl, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers],
|
||||
dependencies : [dep_dxheaders, idep_nir_headers, idep_libdxil_compiler],
|
||||
dependencies : [dep_dxheaders, idep_nir_headers, idep_libdxil_compiler, idep_mesautil],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
|
||||
|
@@ -9,5 +9,5 @@ libetnavivdrm = static_library(
|
||||
inc_etnaviv,
|
||||
],
|
||||
link_with: libetnaviv_drm,
|
||||
dependencies : [dep_libdrm, idep_nir_headers, idep_mesautil, idep_etna_common],
|
||||
dependencies : [dep_libdrm, idep_nir_headers, idep_mesautil, idep_etna_common, idep_mesautil],
|
||||
)
|
||||
|
@@ -11,5 +11,5 @@ libi915drm = static_library(
|
||||
inc_include, inc_src, inc_gallium, inc_gallium_aux, inc_gallium_drivers
|
||||
],
|
||||
link_with : [libintel_common],
|
||||
dependencies : [dep_libdrm, dep_libdrm_intel, idep_intel_dev_wa],
|
||||
dependencies : [dep_libdrm, dep_libdrm_intel, idep_intel_dev_wa, idep_mesautil],
|
||||
)
|
||||
|
@@ -9,4 +9,5 @@ libiriswinsys = static_library(
|
||||
inc_gallium, inc_gallium_aux, inc_gallium_drivers,
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies: idep_mesautil,
|
||||
)
|
||||
|
@@ -7,4 +7,5 @@ libwsgdi = static_library(
|
||||
include_directories : [
|
||||
inc_src, inc_include, inc_gallium, inc_gallium_aux, inc_gallium_drivers, inc_frontends
|
||||
],
|
||||
dependencies: idep_mesautil,
|
||||
)
|
||||
|
@@ -8,5 +8,6 @@ libswhgl = static_library(
|
||||
include_directories : [inc_gallium, inc_include, inc_src, inc_gallium_aux,
|
||||
include_directories('../../../frontends/hgl')
|
||||
],
|
||||
dependencies: idep_mesautil,
|
||||
build_by_default : false,
|
||||
)
|
||||
|
@@ -6,5 +6,5 @@ libws_xlib = static_library(
|
||||
files('xlib_sw_winsys.c'),
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux],
|
||||
dependencies : [dep_x11, dep_xext, dep_xcb],
|
||||
dependencies : [dep_x11, dep_xext, dep_xcb, idep_mesautil],
|
||||
)
|
||||
|
@@ -6,6 +6,7 @@ libvirglcommon = static_library(
|
||||
'virgl_resource_cache.c',
|
||||
include_directories : [inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_gallium_drivers],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies: idep_mesautil,
|
||||
)
|
||||
|
||||
dep_libvirglcommon = declare_dependency(
|
||||
|
@@ -151,6 +151,7 @@ idep_intel_compiler_brw = declare_dependency(
|
||||
link_with : [libintel_compiler_brw],
|
||||
dependencies : [
|
||||
idep_nir,
|
||||
idep_mesautil,
|
||||
],
|
||||
)
|
||||
|
||||
|
@@ -52,7 +52,7 @@ libintel_dev = static_library(
|
||||
|
||||
idep_intel_dev = declare_dependency(
|
||||
link_with : libintel_dev,
|
||||
dependencies : [idep_intel_dev_wa, idep_intel_dev_info_gen],
|
||||
dependencies : [idep_intel_dev_wa, idep_intel_dev_info_gen, idep_mesautil],
|
||||
sources : [intel_dev_info_gen_src, intel_dev_wa_src[0]],
|
||||
)
|
||||
|
||||
|
@@ -179,7 +179,7 @@ if with_tests
|
||||
executable(
|
||||
'isl_tile_std_y_test',
|
||||
'tests/isl_tile_std_y_test.c',
|
||||
dependencies : dep_m,
|
||||
dependencies : [dep_m, idep_mesautil],
|
||||
include_directories : [inc_include, inc_src, inc_intel],
|
||||
link_with : [libisl, libintel_dev],
|
||||
),
|
||||
|
@@ -114,8 +114,9 @@ foreach _gfx_ver : ['90', '110', '120', '125', '200']
|
||||
dependencies : [
|
||||
dep_libdrm, dep_valgrind, idep_nir_headers, idep_genxml,
|
||||
idep_vulkan_util_headers, idep_vulkan_wsi_headers,
|
||||
idep_vulkan_runtime_headers, idep_intel_driver_ds_headers,
|
||||
idep_grl, idep_intel_shaders, idep_intel_blorp,
|
||||
idep_vulkan_runtime_headers, idep_mesautil,
|
||||
idep_intel_driver_ds_headers, idep_grl,
|
||||
idep_intel_shaders, idep_intel_blorp,
|
||||
],
|
||||
)
|
||||
endforeach
|
||||
@@ -187,6 +188,7 @@ anv_deps = [
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
idep_genxml,
|
||||
idep_mesautil,
|
||||
idep_nir_headers,
|
||||
idep_vulkan_util_headers,
|
||||
idep_vulkan_runtime_headers,
|
||||
|
@@ -79,7 +79,7 @@ foreach g : [['70', ['gfx7_cmd_buffer.c']],
|
||||
dep_libdrm, dep_valgrind, idep_nir_headers, idep_genxml,
|
||||
idep_vulkan_util_headers, idep_vulkan_wsi_headers,
|
||||
idep_vulkan_runtime_headers, idep_intel_driver_ds_headers,
|
||||
idep_intel_blorp_elk,
|
||||
idep_intel_blorp_elk, idep_mesautil,
|
||||
],
|
||||
)
|
||||
endforeach
|
||||
@@ -119,6 +119,7 @@ anv_deps = [
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
idep_genxml,
|
||||
idep_mesautil,
|
||||
idep_nir_headers,
|
||||
idep_vulkan_util_headers,
|
||||
idep_vulkan_runtime_headers,
|
||||
|
@@ -27,6 +27,7 @@ if with_platform_wayland
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_gallium],
|
||||
dependencies : [
|
||||
idep_mesautil,
|
||||
dep_wayland_client,
|
||||
],
|
||||
build_by_default : false,
|
||||
@@ -45,6 +46,6 @@ libloader = static_library(
|
||||
c_args : loader_c_args,
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_util, inc_gallium],
|
||||
dependencies : [dep_libdrm, dep_thread, dep_xcb, dep_xcb_xrandr],
|
||||
dependencies : [idep_mesautil, dep_libdrm, dep_thread, dep_xcb, dep_xcb_xrandr],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
@@ -36,6 +36,7 @@ dzn_deps = [
|
||||
idep_vulkan_util,
|
||||
idep_vulkan_runtime,
|
||||
idep_vulkan_wsi,
|
||||
idep_mesautil,
|
||||
dep_dxheaders,
|
||||
]
|
||||
|
||||
|
@@ -29,6 +29,7 @@ _nil_format_table = custom_target(
|
||||
'nil_format_table',
|
||||
input : files('nil_format_table_gen.py', 'nil_formats.csv'),
|
||||
output : ['nil_format_table.h', 'nil_format_table.c'],
|
||||
depends: u_format_gen_h,
|
||||
command : [
|
||||
prog_python, '@INPUT0@', '--csv', '@INPUT1@',
|
||||
'--out-h', '@OUTPUT0@', '--out-c', '@OUTPUT1@',
|
||||
@@ -39,7 +40,7 @@ _libnil_format_table = static_library(
|
||||
'libnil_format_table',
|
||||
_nil_format_table,
|
||||
include_directories : [inc_include, inc_src],
|
||||
dependencies : idep_nvidia_headers,
|
||||
dependencies : [idep_nvidia_headers, idep_mesautil],
|
||||
gnu_symbol_visibility: 'hidden',
|
||||
)
|
||||
|
||||
|
@@ -84,6 +84,7 @@ nvk_deps = [
|
||||
idep_nak,
|
||||
idep_nil,
|
||||
idep_nir,
|
||||
idep_mesautil,
|
||||
idep_nouveau_mme,
|
||||
idep_nouveau_ws,
|
||||
idep_nvidia_headers,
|
||||
|
@@ -25,7 +25,7 @@ foreach ver : ['4', '5', '6', '7', '9', '10']
|
||||
'pandecode-arch-v' + ver,
|
||||
['decode.c', 'decode_jm.c', 'decode_csf.c', pan_packers],
|
||||
include_directories : [inc_include, inc_src, inc_panfrost],
|
||||
dependencies : [dep_libdrm, idep_pan_packers, idep_nir],
|
||||
dependencies : [dep_libdrm, idep_pan_packers, idep_nir, idep_mesautil],
|
||||
c_args : [no_override_init_args, '-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
|
@@ -8,6 +8,8 @@ subdir('kmod')
|
||||
pixel_format_versions = ['5', '6', '7', '9', '10']
|
||||
libpanfrost_pixel_format = []
|
||||
|
||||
deps_for_libpanfrost = [dep_libdrm, idep_pan_packers, idep_mesautil]
|
||||
|
||||
foreach ver : pixel_format_versions
|
||||
libpanfrost_pixel_format += static_library(
|
||||
'pan-format-v' + ver,
|
||||
@@ -17,7 +19,7 @@ foreach ver : pixel_format_versions
|
||||
],
|
||||
c_args : ['-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_pan_packers, dep_libdrm, dep_valgrind],
|
||||
dependencies : [deps_for_libpanfrost, dep_valgrind],
|
||||
)
|
||||
endforeach
|
||||
|
||||
@@ -36,7 +38,7 @@ foreach ver : ['4', '5', '6', '7', '9', '10']
|
||||
include_directories : [inc_include, inc_src, inc_panfrost_hw],
|
||||
c_args : ['-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, idep_pan_packers, idep_nir],
|
||||
dependencies : [deps_for_libpanfrost, idep_nir],
|
||||
)
|
||||
endforeach
|
||||
|
||||
@@ -47,7 +49,7 @@ foreach ver : ['7']
|
||||
include_directories : [inc_include, inc_src, inc_panfrost_hw],
|
||||
c_args : ['-DPAN_ARCH=' + ver],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [dep_libdrm, idep_pan_packers, idep_nir],
|
||||
dependencies : [deps_for_libpanfrost, idep_nir],
|
||||
)
|
||||
endforeach
|
||||
|
||||
@@ -82,7 +84,7 @@ libpanfrost_lib = static_library(
|
||||
libpanfrost_dep = declare_dependency(
|
||||
link_with: [libpanfrost_lib, libpanfrost_decode, libpanfrost_midgard, libpanfrost_bifrost, libpanfrost_pixel_format, libpanfrost_per_arch],
|
||||
include_directories: [inc_include, inc_src, inc_panfrost_hw, inc_panfrost],
|
||||
dependencies: [dep_libdrm, libpankmod_dep, idep_nir, idep_pan_packers],
|
||||
dependencies: [deps_for_libpanfrost, libpankmod_dep, idep_nir],
|
||||
)
|
||||
|
||||
if with_tests
|
||||
|
@@ -60,7 +60,8 @@ libpanfrost_midgard = static_library(
|
||||
inc_panfrost_hw,
|
||||
],
|
||||
dependencies: [
|
||||
idep_nir
|
||||
idep_nir,
|
||||
idep_mesautil,
|
||||
],
|
||||
link_with: [libpanfrost_util, libpanfrost_midgard_disasm],
|
||||
c_args : [no_override_init_args],
|
||||
|
@@ -31,7 +31,7 @@ if with_tests
|
||||
c_args : [c_msvc_compat_args, no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
include_directories : [inc_include, inc_src, inc_panfrost],
|
||||
dependencies: [idep_gtest],
|
||||
dependencies: [idep_gtest, idep_mesautil],
|
||||
link_with : [libpanfrost_shared],
|
||||
),
|
||||
suite : ['panfrost'],
|
||||
|
@@ -23,7 +23,7 @@ libpanfrost_util = static_library(
|
||||
'panfrost_util',
|
||||
[libpanfrost_util_files],
|
||||
include_directories : [inc_include, inc_src, inc_panfrost_hw],
|
||||
dependencies: [idep_nir],
|
||||
dependencies: [idep_nir, idep_mesautil],
|
||||
c_args : [no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
build_by_default : false,
|
||||
|
@@ -118,6 +118,7 @@ foreach arch : [6, 7, 9, 10]
|
||||
idep_vulkan_util_headers,
|
||||
idep_vulkan_runtime_headers,
|
||||
idep_vulkan_wsi_headers,
|
||||
idep_mesautil,
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
],
|
||||
|
@@ -16,6 +16,15 @@ files_mesa_format = files(
|
||||
'u_format_zs.c',
|
||||
)
|
||||
|
||||
u_format_gen_h = custom_target(
|
||||
'u_format_gen.h',
|
||||
input : ['u_format_table.py', 'u_format.yaml'],
|
||||
output : 'u_format_gen.h',
|
||||
command : [prog_python, '@INPUT@', '--enums'],
|
||||
depend_files : files('u_format_pack.py', 'u_format_parse.py'),
|
||||
capture : true,
|
||||
)
|
||||
|
||||
u_format_pack_h = custom_target(
|
||||
'u_format_pack.h',
|
||||
input : ['u_format_table.py', 'u_format.yaml'],
|
||||
@@ -34,4 +43,6 @@ u_format_table_c = custom_target(
|
||||
capture : true,
|
||||
)
|
||||
|
||||
files_mesa_format += [u_format_pack_h, u_format_table_c]
|
||||
idep_mesautilformat = declare_dependency(sources: u_format_gen_h)
|
||||
|
||||
files_mesa_format += [u_format_gen_h, u_format_pack_h, u_format_table_c]
|
||||
|
@@ -54,12 +54,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [Z, Y, X, W]
|
||||
little_endian:
|
||||
alias: BGRA8888_UNORM
|
||||
big_endian:
|
||||
alias: ARGB8888_UNORM
|
||||
- name: B8G8R8X8_UNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, X8]
|
||||
swizzles: [Z, Y, X, 1]
|
||||
little_endian:
|
||||
alias: BGRX8888_UNORM
|
||||
big_endian:
|
||||
alias: XRGB8888_UNORM
|
||||
- name: B8G8R8X8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -84,6 +92,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [Y, Z, W, X]
|
||||
little_endian:
|
||||
alias: ARGB8888_UNORM
|
||||
big_endian:
|
||||
alias: BGRA8888_UNORM
|
||||
- name: A8R8G8B8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -102,6 +114,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [X8, UN8, UN8, UN8]
|
||||
swizzles: [Y, Z, W, 1]
|
||||
little_endian:
|
||||
alias: XRGB8888_UNORM
|
||||
big_endian:
|
||||
alias: BGRX8888_UNORM
|
||||
- name: X8R8G8B8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -120,12 +136,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
little_endian:
|
||||
alias: ABGR8888_UNORM
|
||||
big_endian:
|
||||
alias: RGBA8888_UNORM
|
||||
- name: X8B8G8R8_UNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [X8, UN8, UN8, UN8]
|
||||
swizzles: [W, Z, Y, 1]
|
||||
little_endian:
|
||||
alias: XBGR8888_UNORM
|
||||
big_endian:
|
||||
alias: RGBX8888_UNORM
|
||||
# PIPE_FORMAT_R8G8B8A8_UNORM is below
|
||||
- name: R8G8B8X8_UNORM
|
||||
layout: plain
|
||||
@@ -133,6 +157,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, X8]
|
||||
swizzles: [X, Y, Z, 1]
|
||||
little_endian:
|
||||
alias: RGBX8888_UNORM
|
||||
big_endian:
|
||||
alias: XBGR8888_UNORM
|
||||
- name: R5G5B5A1_UNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -469,42 +497,70 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_SRGB
|
||||
big_endian:
|
||||
alias: ABGR8888_SRGB
|
||||
- name: A8B8G8R8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
little_endian:
|
||||
alias: ABGR8888_SRGB
|
||||
big_endian:
|
||||
alias: RGBA8888_SRGB
|
||||
- name: X8B8G8R8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [X8, UN8, UN8, UN8]
|
||||
swizzles: [W, Z, Y, 1]
|
||||
little_endian:
|
||||
alias: XBGR8888_SRGB
|
||||
big_endian:
|
||||
alias: RGBX8888_SRGB
|
||||
- name: B8G8R8A8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [Z, Y, X, W]
|
||||
little_endian:
|
||||
alias: BGRA8888_SRGB
|
||||
big_endian:
|
||||
alias: ARGB8888_SRGB
|
||||
- name: B8G8R8X8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, X8]
|
||||
swizzles: [Z, Y, X, 1]
|
||||
little_endian:
|
||||
alias: BGRX8888_SRGB
|
||||
big_endian:
|
||||
alias: XRGB8888_SRGB
|
||||
- name: A8R8G8B8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [Y, Z, W, X]
|
||||
little_endian:
|
||||
alias: ARGB8888_SRGB
|
||||
big_endian:
|
||||
alias: BGRA8888_SRGB
|
||||
- name: X8R8G8B8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [X8, UN8, UN8, UN8]
|
||||
swizzles: [Y, Z, W, 1]
|
||||
little_endian:
|
||||
alias: XRGB8888_SRGB
|
||||
big_endian:
|
||||
alias: BGRX8888_SRGB
|
||||
|
||||
|
||||
# Mixed-sign formats (typically used for bump map textures)
|
||||
@@ -1470,6 +1526,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN16, UN16]
|
||||
swizzles: [X, Y, 0, 1]
|
||||
little_endian:
|
||||
alias: RG1616_UNORM
|
||||
big_endian:
|
||||
alias: GR1616_UNORM
|
||||
- name: R16G16B16_UNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1518,6 +1578,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN16, SN16]
|
||||
swizzles: [X, Y, 0, 1]
|
||||
little_endian:
|
||||
alias: RG1616_SNORM
|
||||
big_endian:
|
||||
alias: GR1616_SNORM
|
||||
- name: R16G16B16_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1566,6 +1630,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8]
|
||||
swizzles: [X, Y, 0, 1]
|
||||
little_endian:
|
||||
alias: RG88_UNORM
|
||||
big_endian:
|
||||
alias: GR88_UNORM
|
||||
- name: R8G8B8_UNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1584,6 +1652,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, UN8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_UNORM
|
||||
big_endian:
|
||||
alias: ABGR8888_UNORM
|
||||
- name: R8_USCALED
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1614,6 +1686,8 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [U8, U8, U8, U8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_USCALED
|
||||
- name: B8G8R8A8_USCALED
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1626,6 +1700,8 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [U8, U8, U8, U8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
big_endian:
|
||||
alias: RGBA8888_USCALED
|
||||
- name: R8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1638,6 +1714,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN8, SN8]
|
||||
swizzles: [X, Y, 0, 1]
|
||||
little_endian:
|
||||
alias: RG88_SNORM
|
||||
big_endian:
|
||||
alias: GR88_SNORM
|
||||
- name: R8G8B8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1656,6 +1736,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN8, SN8, SN8, SN8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_SNORM
|
||||
big_endian:
|
||||
alias: ABGR8888_SNORM
|
||||
- name: B8G8R8A8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1692,6 +1776,8 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [S8, S8, S8, S8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_SSCALED
|
||||
- name: B8G8R8A8_SSCALED
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -1704,6 +1790,8 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [S8, S8, S8, S8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
big_endian:
|
||||
alias: RGBA8888_SSCALED
|
||||
|
||||
|
||||
# GL-specific vertex buffer element formats
|
||||
@@ -2059,6 +2147,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UP8, UP8, UP8, UP8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_UINT
|
||||
big_endian:
|
||||
alias: ABGR8888_UINT
|
||||
|
||||
|
||||
- name: R8_SINT
|
||||
@@ -2085,6 +2177,8 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SP8, SP8, SP8, SP8]
|
||||
swizzles: [X, Y, Z, W]
|
||||
little_endian:
|
||||
alias: RGBA8888_SINT
|
||||
|
||||
|
||||
- name: R16_UINT
|
||||
@@ -2410,6 +2504,10 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UP8, UP8, UP8, UP8]
|
||||
swizzles: [Z, Y, X, W]
|
||||
little_endian:
|
||||
alias: BGRA8888_UINT
|
||||
big_endian:
|
||||
alias: ARGB8888_UINT
|
||||
|
||||
|
||||
- name: B8G8R8_SINT
|
||||
@@ -2432,12 +2530,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UP8, UP8, UP8, UP8]
|
||||
swizzles: [Y, Z, W, X]
|
||||
little_endian:
|
||||
alias: ARGB8888_UINT
|
||||
big_endian:
|
||||
alias: BGRA8888_UINT
|
||||
- name: A8B8G8R8_UINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UP8, UP8, UP8, UP8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
little_endian:
|
||||
alias: ABGR8888_UINT
|
||||
big_endian:
|
||||
alias: RGBA8888_UINT
|
||||
- name: A2R10G10B10_UINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -2542,12 +2648,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN8, SN8, SN8, X8]
|
||||
swizzles: [X, Y, Z, 1]
|
||||
little_endian:
|
||||
alias: RGBX8888_SNORM
|
||||
big_endian:
|
||||
alias: XBGR8888_SNORM
|
||||
- name: R8G8B8X8_SRGB
|
||||
layout: plain
|
||||
colorspace: SRGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8, UN8, X8]
|
||||
swizzles: [X, Y, Z, 1]
|
||||
little_endian:
|
||||
alias: RGBX8888_SRGB
|
||||
big_endian:
|
||||
alias: XBGR8888_SRGB
|
||||
- name: R8G8B8X8_UINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -2728,12 +2842,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN8, UN8]
|
||||
swizzles: [Y, X, 0, 1]
|
||||
little_endian:
|
||||
alias: GR88_UNORM
|
||||
big_endian:
|
||||
alias: RG88_UNORM
|
||||
- name: G8R8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN8, SN8]
|
||||
swizzles: [Y, X, 0, 1]
|
||||
little_endian:
|
||||
alias: GR88_SNORM
|
||||
big_endian:
|
||||
alias: RG88_SNORM
|
||||
- name: G8R8_SINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -2746,12 +2868,20 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [UN16, UN16]
|
||||
swizzles: [Y, X, 0, 1]
|
||||
little_endian:
|
||||
alias: GR1616_UNORM
|
||||
big_endian:
|
||||
alias: RG1616_UNORM
|
||||
- name: G16R16_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN16, SN16]
|
||||
swizzles: [Y, X, 0, 1]
|
||||
little_endian:
|
||||
alias: GR1616_SNORM
|
||||
big_endian:
|
||||
alias: RG1616_SNORM
|
||||
- name: G16R16_SINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
@@ -2766,18 +2896,28 @@
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SN8, SN8, SN8, SN8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
little_endian:
|
||||
alias: ABGR8888_SNORM
|
||||
big_endian:
|
||||
alias: RGBA8888_SNORM
|
||||
- name: A8B8G8R8_SINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [SP8, SP8, SP8, SP8]
|
||||
swizzles: [W, Z, Y, X]
|
||||
big_endian:
|
||||
alias: RGBA8888_SINT
|
||||
- name: X8B8G8R8_SNORM
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
block: {width: 1, height: 1, depth: 1}
|
||||
channels: [X8, SN8, SN8, SN8]
|
||||
swizzles: [W, Z, Y, 1]
|
||||
little_endian:
|
||||
alias: XBGR8888_SNORM
|
||||
big_endian:
|
||||
alias: RGBX8888_SNORM
|
||||
- name: X8B8G8R8_SINT
|
||||
layout: plain
|
||||
colorspace: RGB
|
||||
|
@@ -260,9 +260,15 @@ class Format:
|
||||
if self.is_bitmask():
|
||||
raise RuntimeError("Bitmask format {self.name} must not define endian-specific swizzles")
|
||||
|
||||
self.le_alias = None
|
||||
self.be_alias = None
|
||||
if 'little_endian' in source:
|
||||
if 'alias' in source['little_endian']:
|
||||
self.le_alias = f"PIPE_FORMAT_{consume_str(self, source, 'little_endian', 'alias')}"
|
||||
consumed(self, source, 'little_endian')
|
||||
if 'big_endian' in source:
|
||||
if 'alias' in source['big_endian']:
|
||||
self.be_alias = f"PIPE_FORMAT_{consume_str(self, source, 'big_endian', 'alias')}"
|
||||
consumed(self, source, 'big_endian')
|
||||
|
||||
consumed(self, source)
|
||||
|
@@ -138,10 +138,21 @@ def write_format_table_header(file):
|
||||
# This will print the copyright message on the top of this file
|
||||
print(CopyRight.strip(), file=file)
|
||||
print(file=file)
|
||||
print('#include "util/format/u_format.h"', file=file)
|
||||
|
||||
def write_format_aliases(formats):
|
||||
print("#if UTIL_ARCH_LITTLE_ENDIAN", file=sys.stdout3)
|
||||
for f in formats:
|
||||
if f.le_alias:
|
||||
print("#define %s %s" % (f.le_alias, f.name), file=sys.stdout3)
|
||||
print("#elif UTIL_ARCH_BIG_ENDIAN", file=sys.stdout3)
|
||||
for f in formats:
|
||||
if f.be_alias:
|
||||
print("#define %s %s" % (f.be_alias, f.name), file=sys.stdout3)
|
||||
print("#endif", file=sys.stdout3)
|
||||
|
||||
def write_format_table(formats):
|
||||
write_format_table_header(sys.stdout)
|
||||
print('#include "util/format/u_format.h"')
|
||||
print('#include "u_format_bptc.h"')
|
||||
print('#include "u_format_fxt1.h"')
|
||||
print('#include "u_format_s3tc.h"')
|
||||
@@ -155,6 +166,7 @@ def write_format_table(formats):
|
||||
print('#ifdef __cplusplus', file=sys.stdout2)
|
||||
print('extern "C" {', file=sys.stdout2)
|
||||
print('#endif', file=sys.stdout2)
|
||||
print('#include "util/format/u_format.h"', file=sys.stdout2)
|
||||
print(file=sys.stdout2)
|
||||
|
||||
u_format_pack.generate(formats)
|
||||
@@ -163,6 +175,20 @@ def write_format_table(formats):
|
||||
print('} /* extern "C" */', file=sys.stdout2)
|
||||
print('#endif', file=sys.stdout2)
|
||||
|
||||
|
||||
write_format_table_header(sys.stdout3)
|
||||
|
||||
print('#ifdef __cplusplus', file=sys.stdout3)
|
||||
print('extern "C" {', file=sys.stdout3)
|
||||
print('#endif', file=sys.stdout3)
|
||||
print(file=sys.stdout3)
|
||||
|
||||
write_format_aliases(formats)
|
||||
|
||||
print('#ifdef __cplusplus', file=sys.stdout3)
|
||||
print('} /* extern "C" */', file=sys.stdout3)
|
||||
print('#endif', file=sys.stdout3)
|
||||
|
||||
def do_channel_array(channels, swizzles):
|
||||
print(" {")
|
||||
for i in range(4):
|
||||
@@ -327,11 +353,18 @@ def main():
|
||||
formats = {}
|
||||
|
||||
sys.stdout2 = open(os.devnull, "w")
|
||||
sys.stdout3 = open(os.devnull, "w")
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
if arg == '--header':
|
||||
sys.stdout2 = sys.stdout
|
||||
sys.stdout = open(os.devnull, "w")
|
||||
sys.stdout3 = sys.stdout
|
||||
continue
|
||||
elif arg == '--enums':
|
||||
sys.stdout3 = sys.stdout
|
||||
sys.stdout = open(os.devnull, "w")
|
||||
sys.stdout2 = sys.stdout
|
||||
continue
|
||||
|
||||
to_add = parse(arg)
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#define U_FORMATS_H_
|
||||
|
||||
#include "util/detect.h"
|
||||
#include "util/format/u_format_gen.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -541,80 +542,6 @@ enum pipe_format {
|
||||
PIPE_FORMAT_COUNT
|
||||
};
|
||||
|
||||
#if UTIL_ARCH_LITTLE_ENDIAN
|
||||
#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
|
||||
#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
|
||||
#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
|
||||
#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
|
||||
#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
|
||||
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
|
||||
#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
|
||||
#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
|
||||
#define PIPE_FORMAT_RGBA8888_SNORM PIPE_FORMAT_R8G8B8A8_SNORM
|
||||
#define PIPE_FORMAT_RGBX8888_SNORM PIPE_FORMAT_R8G8B8X8_SNORM
|
||||
#define PIPE_FORMAT_ABGR8888_SNORM PIPE_FORMAT_A8B8G8R8_SNORM
|
||||
#define PIPE_FORMAT_XBGR8888_SNORM PIPE_FORMAT_X8B8G8R8_SNORM
|
||||
#define PIPE_FORMAT_RGBA8888_SRGB PIPE_FORMAT_R8G8B8A8_SRGB
|
||||
#define PIPE_FORMAT_RGBX8888_SRGB PIPE_FORMAT_R8G8B8X8_SRGB
|
||||
#define PIPE_FORMAT_BGRA8888_SRGB PIPE_FORMAT_B8G8R8A8_SRGB
|
||||
#define PIPE_FORMAT_BGRX8888_SRGB PIPE_FORMAT_B8G8R8X8_SRGB
|
||||
#define PIPE_FORMAT_ARGB8888_SRGB PIPE_FORMAT_A8R8G8B8_SRGB
|
||||
#define PIPE_FORMAT_XRGB8888_SRGB PIPE_FORMAT_X8R8G8B8_SRGB
|
||||
#define PIPE_FORMAT_ABGR8888_SRGB PIPE_FORMAT_A8B8G8R8_SRGB
|
||||
#define PIPE_FORMAT_XBGR8888_SRGB PIPE_FORMAT_X8B8G8R8_SRGB
|
||||
#define PIPE_FORMAT_RGBA8888_USCALED PIPE_FORMAT_R8G8B8A8_USCALED
|
||||
#define PIPE_FORMAT_RGBA8888_SSCALED PIPE_FORMAT_R8G8B8A8_SSCALED
|
||||
#define PIPE_FORMAT_RGBA8888_UINT PIPE_FORMAT_R8G8B8A8_UINT
|
||||
#define PIPE_FORMAT_BGRA8888_UINT PIPE_FORMAT_B8G8R8A8_UINT
|
||||
#define PIPE_FORMAT_ARGB8888_UINT PIPE_FORMAT_A8R8G8B8_UINT
|
||||
#define PIPE_FORMAT_ABGR8888_UINT PIPE_FORMAT_A8B8G8R8_UINT
|
||||
#define PIPE_FORMAT_RGBA8888_SINT PIPE_FORMAT_R8G8B8A8_SINT
|
||||
#define PIPE_FORMAT_RG88_UNORM PIPE_FORMAT_R8G8_UNORM
|
||||
#define PIPE_FORMAT_GR88_UNORM PIPE_FORMAT_G8R8_UNORM
|
||||
#define PIPE_FORMAT_RG88_SNORM PIPE_FORMAT_R8G8_SNORM
|
||||
#define PIPE_FORMAT_GR88_SNORM PIPE_FORMAT_G8R8_SNORM
|
||||
#define PIPE_FORMAT_RG1616_UNORM PIPE_FORMAT_R16G16_UNORM
|
||||
#define PIPE_FORMAT_GR1616_UNORM PIPE_FORMAT_G16R16_UNORM
|
||||
#define PIPE_FORMAT_RG1616_SNORM PIPE_FORMAT_R16G16_SNORM
|
||||
#define PIPE_FORMAT_GR1616_SNORM PIPE_FORMAT_G16R16_SNORM
|
||||
#elif UTIL_ARCH_BIG_ENDIAN
|
||||
#define PIPE_FORMAT_ABGR8888_UNORM PIPE_FORMAT_R8G8B8A8_UNORM
|
||||
#define PIPE_FORMAT_XBGR8888_UNORM PIPE_FORMAT_R8G8B8X8_UNORM
|
||||
#define PIPE_FORMAT_ARGB8888_UNORM PIPE_FORMAT_B8G8R8A8_UNORM
|
||||
#define PIPE_FORMAT_XRGB8888_UNORM PIPE_FORMAT_B8G8R8X8_UNORM
|
||||
#define PIPE_FORMAT_BGRA8888_UNORM PIPE_FORMAT_A8R8G8B8_UNORM
|
||||
#define PIPE_FORMAT_BGRX8888_UNORM PIPE_FORMAT_X8R8G8B8_UNORM
|
||||
#define PIPE_FORMAT_RGBA8888_UNORM PIPE_FORMAT_A8B8G8R8_UNORM
|
||||
#define PIPE_FORMAT_RGBX8888_UNORM PIPE_FORMAT_X8B8G8R8_UNORM
|
||||
#define PIPE_FORMAT_ABGR8888_SNORM PIPE_FORMAT_R8G8B8A8_SNORM
|
||||
#define PIPE_FORMAT_XBGR8888_SNORM PIPE_FORMAT_R8G8B8X8_SNORM
|
||||
#define PIPE_FORMAT_RGBA8888_SNORM PIPE_FORMAT_A8B8G8R8_SNORM
|
||||
#define PIPE_FORMAT_RGBX8888_SNORM PIPE_FORMAT_X8B8G8R8_SNORM
|
||||
#define PIPE_FORMAT_ABGR8888_SRGB PIPE_FORMAT_R8G8B8A8_SRGB
|
||||
#define PIPE_FORMAT_XBGR8888_SRGB PIPE_FORMAT_R8G8B8X8_SRGB
|
||||
#define PIPE_FORMAT_ARGB8888_SRGB PIPE_FORMAT_B8G8R8A8_SRGB
|
||||
#define PIPE_FORMAT_XRGB8888_SRGB PIPE_FORMAT_B8G8R8X8_SRGB
|
||||
#define PIPE_FORMAT_BGRA8888_SRGB PIPE_FORMAT_A8R8G8B8_SRGB
|
||||
#define PIPE_FORMAT_BGRX8888_SRGB PIPE_FORMAT_X8R8G8B8_SRGB
|
||||
#define PIPE_FORMAT_RGBA8888_SRGB PIPE_FORMAT_A8B8G8R8_SRGB
|
||||
#define PIPE_FORMAT_RGBX8888_SRGB PIPE_FORMAT_X8B8G8R8_SRGB
|
||||
#define PIPE_FORMAT_RGBA8888_USCALED PIPE_FORMAT_A8B8G8R8_USCALED
|
||||
#define PIPE_FORMAT_RGBA8888_SSCALED PIPE_FORMAT_A8B8G8R8_SSCALED
|
||||
#define PIPE_FORMAT_RGBA8888_UINT PIPE_FORMAT_A8B8G8R8_UINT
|
||||
#define PIPE_FORMAT_BGRA8888_UINT PIPE_FORMAT_A8R8G8B8_UINT
|
||||
#define PIPE_FORMAT_ARGB8888_UINT PIPE_FORMAT_B8G8R8A8_UINT
|
||||
#define PIPE_FORMAT_ABGR8888_UINT PIPE_FORMAT_R8G8B8A8_UINT
|
||||
#define PIPE_FORMAT_RGBA8888_SINT PIPE_FORMAT_A8B8G8R8_SINT
|
||||
#define PIPE_FORMAT_RG88_UNORM PIPE_FORMAT_G8R8_UNORM
|
||||
#define PIPE_FORMAT_GR88_UNORM PIPE_FORMAT_R8G8_UNORM
|
||||
#define PIPE_FORMAT_RG88_SNORM PIPE_FORMAT_G8R8_SNORM
|
||||
#define PIPE_FORMAT_GR88_SNORM PIPE_FORMAT_R8G8_SNORM
|
||||
#define PIPE_FORMAT_RG1616_UNORM PIPE_FORMAT_G16R16_UNORM
|
||||
#define PIPE_FORMAT_GR1616_UNORM PIPE_FORMAT_R16G16_UNORM
|
||||
#define PIPE_FORMAT_RG1616_SNORM PIPE_FORMAT_G16R16_SNORM
|
||||
#define PIPE_FORMAT_GR1616_SNORM PIPE_FORMAT_R16G16_SNORM
|
||||
#endif
|
||||
|
||||
enum pipe_video_chroma_format
|
||||
{
|
||||
PIPE_VIDEO_CHROMA_FORMAT_400,
|
||||
|
@@ -206,6 +206,10 @@ format_srgb = custom_target(
|
||||
capture : true,
|
||||
)
|
||||
|
||||
# subdir format provide files_mesa_format
|
||||
subdir('format')
|
||||
files_mesa_util += files_mesa_format
|
||||
|
||||
deps_for_libmesa_util = [
|
||||
dep_zlib,
|
||||
dep_clock,
|
||||
@@ -218,7 +222,8 @@ deps_for_libmesa_util = [
|
||||
dep_unwind,
|
||||
dep_futex,
|
||||
idep_blake3,
|
||||
idep_mesautilc11
|
||||
idep_mesautilc11,
|
||||
idep_mesautilformat,
|
||||
]
|
||||
|
||||
if with_platform_android
|
||||
@@ -263,10 +268,6 @@ libmesa_util_sse41 = static_library(
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
|
||||
# subdir format provide files_mesa_format
|
||||
subdir('format')
|
||||
files_mesa_util += files_mesa_format
|
||||
|
||||
_libmesa_util = static_library(
|
||||
'mesa_util',
|
||||
[files_mesa_util, files_debug_stack, format_srgb],
|
||||
|
@@ -18,6 +18,7 @@ libvdrm = static_library(
|
||||
dependencies: [
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
idep_mesautil,
|
||||
],
|
||||
link_with: [
|
||||
_libmesa_util,
|
||||
|
@@ -138,5 +138,5 @@ idep_vulkan_util_headers = declare_dependency(
|
||||
|
||||
idep_vulkan_util = declare_dependency(
|
||||
link_with : libvulkan_util,
|
||||
dependencies : idep_vulkan_util_headers
|
||||
dependencies : [idep_vulkan_util_headers, idep_mesautil],
|
||||
)
|
||||
|
Reference in New Issue
Block a user