mesa: update to version 24.0.1

Supported Gallium drivers are iris (Intel), lima (PinePhone), etnaviv
(i.MX8).

issue #5224
This commit is contained in:
Sebastian Sumpf 2024-02-28 10:24:41 +01:00 committed by Christian Helmuth
parent dca3b12109
commit d71b6ca305
54 changed files with 3195 additions and 2963 deletions

View File

@ -5,11 +5,15 @@ include $(REP_DIR)/lib/mk/mesa-common.inc
INC_DIR += $(MESA_SRC_DIR)/src/egl/main \
$(MESA_SRC_DIR)/src/egl/drivers/dri2 \
$(MESA_SRC_DIR)/src/loader
$(MESA_SRC_DIR)/src/gallium/auxiliary \
$(MESA_SRC_DIR)/src/gallium/frontends/dri \
$(MESA_SRC_DIR)/src/loader \
$(MESA_SRC_DIR)/src/mesa
SRC_C = main/eglapi.c \
main/eglarray.c \
main/eglconfig.c \
main/eglconfigdebug.c \
main/eglcontext.c \
main/eglcurrent.c \
main/egldevice.c \
@ -20,7 +24,6 @@ SRC_C = main/eglapi.c \
main/eglsurface.c \
main/eglsync.c \
drivers/dri2/egl_dri2.c \
drivers/dri2/platform_device.c \
platform.c
SRC_CC = genode_interface.cc

View File

@ -3,14 +3,15 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
INC_DIR += $(MESA_GEN_DIR)/src/mapi
INC_DIR += $(MESA_GEN_DIR)/src/mapi \
$(MESA_SRC_DIR)/src/mapi \
$(MESA_SRC_DIR)/src/mapi/shared-glapi
SRC_C = mapi/entry.c \
mapi/mapi_glapi.c \
mapi/stub.c \
mapi/table.c \
mapi/shared-glapi/glapi.c \
mapi/shared-glapi/stub.c \
mapi/shared-glapi/table.c \
mapi/u_current.c \
mapi/u_execmem.c
CC_OPT += -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" -DMAPI_MODE_GLAPI

View File

@ -12,6 +12,8 @@ INC_DIR += $(MESA_GEN_DIR)/src/compiler/nir \
CC_OPT += -DGALLIUM_IRIS
CC_C_OPT += -Wno-unused-function
SRC_C = gallium/drivers/iris/iris_query.c \
gallium/drivers/iris/iris_state.c \
gallium/drivers/iris/iris_blorp.c

View File

@ -5,7 +5,8 @@ include $(REP_DIR)/lib/mk/mesa-common.inc
INC_DIR += $(MESA_GEN_DIR)/src/intel \
$(MESA_SRC_DIR)/src/intel
SRC_C = intel/isl/isl_emit_depth_stencil.c \
SRC_C = intel/isl/isl_emit_cpb.c \
intel/isl/isl_emit_depth_stencil.c \
intel/isl/isl_surface_state.c
vpath %.c $(MESA_SRC_DIR)/src

View File

@ -7,10 +7,18 @@ INC_DIR += $(LIB_DIR)/include \
$(MESA_PORT_DIR)/include \
$(MESA_SRC_DIR)/src/gallium/include \
$(MESA_SRC_DIR)/src \
$(MESA_GEN_DIR)/src
$(MESA_GEN_DIR)/src \
$(MESA_GEN_DIR)/src/compiler
CC_OPT += -D__GENODE__ -DGALLIUM_SOFTPIPE
#
# Otherwise TLS init function calls will be created, for example, for
# 'glapi_tls_Context' in >C++11 code. This requires support in the dynamic
# linker which we don't have.
#
CC_CXX_OPT += -fno-extern-tls-init
#
# C++20 warnings disable on update
#
@ -37,6 +45,8 @@ CC_OPT += -DENABLE_ST_OMX_BELLAGIO=0 \
-DHAVE_DLADDR \
-DHAVE_DLFCN_H \
-DHAVE_DL_ITERATE_PHDR \
-DHAVE_DRI \
-DHAVE_DRI2 \
-DHAVE_EXECINFO_H \
-DHAVE_FLOCK \
-DHAVE_FUNC_ATTRIBUTE_ALIAS \
@ -54,6 +64,9 @@ CC_OPT += -DENABLE_ST_OMX_BELLAGIO=0 \
-DHAVE_FUNC_ATTRIBUTE_WEAK \
-DHAVE_GETRANDOM \
-DHAVE_MKOSTEMP \
-DHAVE_OPENGL=1 \
-DHAVE_OPENGL_ES_1=1 \
-DHAVE_OPENGL_ES_2=1 \
-DHAVE_PIPE_LOADER_DRI \
-DHAVE_POSIX_MEMALIGN \
-DHAVE_PTHREAD \
@ -61,10 +74,11 @@ CC_OPT += -DENABLE_ST_OMX_BELLAGIO=0 \
-DHAVE_RANDOM_R \
-DHAVE_STRTOF \
-DHAVE_STRTOK_R \
-DHAVE_STRUCT_TIMESPEC \
-DHAVE_TIMESPEC_GET \
-DHAVE_ZLIB \
-DPACKAGE_BUGREPORT='"https://gitlab.freedesktop.org/mesa/mesa/-/issues"' \
-DPACKAGE_VERSION='"21.0.0"' \
-DPACKAGE_VERSION='"24.0.1"' \
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
-D__STDC_LIMIT_MACROS \

View File

@ -1,5 +1,5 @@
SHARED_LIB := yes
LIBS += libc stdcxx zlib expat glapi softpipe mesa_api libdrm
LIBS += libc stdcxx zlib expat glapi softpipe mesa_api libdrm format
include $(REP_DIR)/lib/mk/mesa-common.inc
@ -9,9 +9,12 @@ INC_DIR += $(MESA_GEN_DIR)/src/compiler \
$(MESA_GEN_DIR)/src/compiler/glsl \
$(MESA_GEN_DIR)/src/compiler/nir \
$(MESA_GEN_DIR)/src/compiler/spirv \
$(MESA_GEN_DIR)/src/gallium/auxiliary \
$(MESA_GEN_DIR)/src/mapi \
$(MESA_GEN_DIR)/src/mapi/glapi/gen \
$(MESA_GEN_DIR)/src/mesa \
$(MESA_GEN_DIR)/src/mesa/main \
$(MESA_GEN_DIR)/src/util \
$(MESA_GEN_DIR)/src/util/format \
$(MESA_SRC_DIR)/src \
$(MESA_SRC_DIR)/src/compiler \
@ -25,18 +28,13 @@ INC_DIR += $(MESA_GEN_DIR)/src/compiler \
$(MESA_SRC_DIR)/src/gallium/winsys \
$(MESA_SRC_DIR)/src/loader \
$(MESA_SRC_DIR)/src/mapi \
$(MESA_SRC_DIR)/src/mapi/shared-glapi \
$(MESA_SRC_DIR)/src/mesa \
$(MESA_SRC_DIR)/src/mesa/drivers/dri/common \
$(MESA_SRC_DIR)/src/mesa/main \
$(MESA_SRC_DIR)/src/util \
$(MESA_SRC_DIR)/src/util/format
# C++ generated
SRC_CC += compiler/glsl/glsl_lexer.cpp \
compiler/glsl/glsl_parser.cpp
# C++
SRC_CC += compiler/glsl/ast_array_index.cpp \
compiler/glsl/ast_expr.cpp \
compiler/glsl/ast_function.cpp \
@ -45,81 +43,44 @@ SRC_CC += compiler/glsl/ast_array_index.cpp \
compiler/glsl/builtin_functions.cpp \
compiler/glsl/builtin_types.cpp \
compiler/glsl/builtin_variables.cpp \
compiler/glsl/generate_ir.cpp \
compiler/glsl/glsl_parser_extras.cpp \
compiler/glsl/glsl_symbol_table.cpp \
compiler/glsl/glsl_to_nir.cpp \
compiler/glsl/hir_field_selection.cpp \
compiler/glsl/ir.cpp \
compiler/glsl/ir_array_refcount.cpp \
compiler/glsl/ir_basic_block.cpp \
compiler/glsl/ir_builder.cpp \
compiler/glsl/ir_clone.cpp \
compiler/glsl/ir_constant_expression.cpp \
compiler/glsl/ir.cpp \
compiler/glsl/ir_equals.cpp \
compiler/glsl/ir_expression_flattening.cpp \
compiler/glsl/ir_function_can_inline.cpp \
compiler/glsl/ir_function.cpp \
compiler/glsl/ir_function_can_inline.cpp \
compiler/glsl/ir_function_detect_recursion.cpp \
compiler/glsl/ir_hierarchical_visitor.cpp \
compiler/glsl/ir_hv_accept.cpp \
compiler/glsl/ir_print_visitor.cpp \
compiler/glsl/ir_reader.cpp \
compiler/glsl/ir_rvalue_visitor.cpp \
compiler/glsl/ir_set_program_inouts.cpp \
compiler/glsl/ir_validate.cpp \
compiler/glsl/ir_variable_refcount.cpp \
compiler/glsl/link_atomics.cpp \
compiler/glsl/linker.cpp \
compiler/glsl/linker_util.cpp \
compiler/glsl/link_functions.cpp \
compiler/glsl/link_interface_blocks.cpp \
compiler/glsl/link_uniform_block_active_visitor.cpp \
compiler/glsl/link_uniform_blocks.cpp \
compiler/glsl/link_uniform_initializers.cpp \
compiler/glsl/link_uniforms.cpp \
compiler/glsl/link_varyings.cpp \
compiler/glsl/loop_analysis.cpp \
compiler/glsl/loop_unroll.cpp \
compiler/glsl/lower_blend_equation_advanced.cpp \
compiler/glsl/lower_buffer_access.cpp \
compiler/glsl/linker.cpp \
compiler/glsl/linker_util.cpp \
compiler/glsl/lower_builtins.cpp \
compiler/glsl/lower_const_arrays_to_uniforms.cpp \
compiler/glsl/lower_cs_derived.cpp \
compiler/glsl/lower_discard.cpp \
compiler/glsl/lower_discard_flow.cpp \
compiler/glsl/lower_distance.cpp \
compiler/glsl/lower_if_to_cond_assign.cpp \
compiler/glsl/lower_instructions.cpp \
compiler/glsl/lower_int64.cpp \
compiler/glsl/lower_jumps.cpp \
compiler/glsl/lower_mat_op_to_vec.cpp \
compiler/glsl/lower_named_interface_blocks.cpp \
compiler/glsl/lower_offset_array.cpp \
compiler/glsl/lower_output_reads.cpp \
compiler/glsl/lower_packed_varyings.cpp \
compiler/glsl/lower_packing_builtins.cpp \
compiler/glsl/lower_precision.cpp \
compiler/glsl/lower_shared_reference.cpp \
compiler/glsl/lower_subroutine.cpp \
compiler/glsl/lower_tess_level.cpp \
compiler/glsl/lower_ubo_reference.cpp \
compiler/glsl/lower_variable_index_to_cond_assign.cpp \
compiler/glsl/lower_vec_index_to_cond_assign.cpp \
compiler/glsl/lower_vec_index_to_swizzle.cpp \
compiler/glsl/lower_vector.cpp \
compiler/glsl/lower_vector_derefs.cpp \
compiler/glsl/lower_vector_insert.cpp \
compiler/glsl/lower_vertex_id.cpp \
compiler/glsl/lower_xfb_varying.cpp \
compiler/glsl/opt_algebraic.cpp \
compiler/glsl/opt_array_splitting.cpp \
compiler/glsl/opt_conditional_discard.cpp \
compiler/glsl/opt_constant_folding.cpp \
compiler/glsl/opt_constant_propagation.cpp \
compiler/glsl/opt_constant_variable.cpp \
compiler/glsl/opt_copy_propagation_elements.cpp \
compiler/glsl/opt_dead_builtin_variables.cpp \
compiler/glsl/opt_dead_builtin_varyings.cpp \
compiler/glsl/opt_dead_code.cpp \
compiler/glsl/opt_dead_code_local.cpp \
compiler/glsl/opt_dead_functions.cpp \
@ -129,126 +90,122 @@ SRC_CC += compiler/glsl/ast_array_index.cpp \
compiler/glsl/opt_if_simplification.cpp \
compiler/glsl/opt_minmax.cpp \
compiler/glsl/opt_rebalance_tree.cpp \
compiler/glsl/opt_redundant_jumps.cpp \
compiler/glsl/opt_structure_splitting.cpp \
compiler/glsl/opt_swizzle.cpp \
compiler/glsl/opt_tree_grafting.cpp \
compiler/glsl/opt_vectorize.cpp \
compiler/glsl/propagate_invariance.cpp \
compiler/glsl/s_expression.cpp \
compiler/glsl/serialize.cpp \
compiler/glsl/shader_cache.cpp \
compiler/glsl/string_to_uint_map.cpp \
compiler/glsl_types.cpp \
compiler/nir_types.cpp \
gallium/auxiliary/tessellator/p_tessellator.cpp \
gallium/auxiliary/tessellator/tessellator.cpp \
mesa/main/ff_fragment_shader.cpp \
mesa/main/shader_query.cpp \
mesa/main/texcompress_astc.cpp \
mesa/main/uniform_query.cpp \
mesa/program/ir_to_mesa.cpp \
mesa/state_tracker/st_glsl_to_ir.cpp \
mesa/state_tracker/st_atom_array.cpp \
mesa/state_tracker/st_glsl_to_nir.cpp \
mesa/state_tracker/st_glsl_to_tgsi_array_merge.cpp \
mesa/state_tracker/st_glsl_to_tgsi.cpp \
mesa/state_tracker/st_glsl_to_tgsi_private.cpp \
mesa/state_tracker/st_glsl_to_tgsi_temprename.cpp \
util/u_printf.cpp
util/u_qsort.cpp
# C generated
SRC_C += \
compiler/glsl/glcpp/glcpp-parse.c \
compiler/glsl/glcpp/glcpp-lex.c \
compiler/nir/nir_constant_expressions.c \
compiler/nir/nir_intrinsics.c \
compiler/nir/nir_opt_algebraic.c \
compiler/nir/nir_opcodes.c \
compiler/spirv/spirv_info.c \
compiler/spirv/vtn_gather_types.c \
mapi/glapi/gen/api_exec.c \
mapi/glapi/gen/enums.c \
mapi/glapi/gen/marshal_generated0.c \
mapi/glapi/gen/marshal_generated1.c \
mapi/glapi/gen/marshal_generated2.c \
mapi/glapi/gen/marshal_generated3.c \
mapi/glapi/gen/marshal_generated4.c \
mapi/glapi/gen/marshal_generated5.c \
mapi/glapi/gen/marshal_generated6.c \
mapi/glapi/gen/marshal_generated7.c \
mesa/format_fallback.c \
mesa/format_pack.c \
mesa/format_unpack.c \
mesa/program/lex.yy.c \
mesa/program/program_parse.tab.c \
util/format_srgb.c \
util/format/u_format_table.c
# C
SRC_C += compiler/glsl/glcpp/pp.c \
SRC_C += c11/impl/threads_posix.c \
c11/impl/time.c \
compiler/glsl/gl_nir_link_atomics.c \
compiler/glsl/gl_nir_linker.c \
compiler/glsl/gl_nir_link_uniform_blocks.c \
compiler/glsl/gl_nir_link_uniform_initializers.c \
compiler/glsl/gl_nir_link_uniforms.c \
compiler/glsl/gl_nir_link_varyings.c \
compiler/glsl/gl_nir_link_xfb.c \
compiler/glsl/gl_nir_linker.c \
compiler/glsl/gl_nir_lower_atomics.c \
compiler/glsl/gl_nir_lower_blend_equation_advanced.c \
compiler/glsl/gl_nir_lower_buffers.c \
compiler/glsl/gl_nir_lower_images.c \
compiler/glsl/gl_nir_lower_samplers_as_deref.c \
compiler/glsl/gl_nir_lower_named_interface_blocks.c \
compiler/glsl/gl_nir_lower_packed_varyings.c \
compiler/glsl/gl_nir_lower_samplers.c \
compiler/nir/nir_builtin_builder.c \
compiler/glsl/gl_nir_lower_samplers_as_deref.c \
compiler/glsl/gl_nir_lower_xfb_varying.c \
compiler/glsl/gl_nir_opt_dead_builtin_varyings.c \
compiler/glsl/glcpp/pp.c \
compiler/glsl_types.c \
compiler/nir/nir.c \
compiler/nir/nir_builder.c \
compiler/nir/nir_builtin_builder.c \
compiler/nir/nir_clone.c \
compiler/nir/nir_control_flow.c \
compiler/nir/nir_deref.c \
compiler/nir/nir_divergence_analysis.c \
compiler/nir/nir_dominance.c \
compiler/nir/nir_from_ssa.c \
compiler/nir/nir_functions.c \
compiler/nir/nir_gather_info.c \
compiler/nir/nir_gather_ssa_types.c \
compiler/nir/nir_gather_types.c \
compiler/nir/nir_gather_xfb_info.c \
compiler/nir/nir_group_loads.c \
compiler/nir/nir_gs_count_vertices.c \
compiler/nir/nir_inline_functions.c \
compiler/nir/nir_inline_uniforms.c \
compiler/nir/nir_instr_set.c \
compiler/nir/nir_legacy.c \
compiler/nir/nir_linking_helpers.c \
compiler/nir/nir_liveness.c \
compiler/nir/nir_loop_analyze.c \
compiler/nir/nir_lower_alpha_test.c \
compiler/nir/nir_lower_alu.c \
compiler/nir/nir_lower_alu_to_scalar.c \
compiler/nir/nir_lower_alu_width.c \
compiler/nir/nir_lower_amul.c \
compiler/nir/nir_lower_array_deref_of_vec.c \
compiler/nir/nir_lower_atomics_to_ssbo.c \
compiler/nir/nir_lower_bitmap.c \
compiler/nir/nir_lower_bool_to_bitsize.c \
compiler/nir/nir_lower_bit_size.c \
compiler/nir/nir_lower_bitmap.c \
compiler/nir/nir_lower_blend.c \
compiler/nir/nir_lower_bool_to_bitsize.c \
compiler/nir/nir_lower_bool_to_float.c \
compiler/nir/nir_lower_bool_to_int32.c \
compiler/nir/nir_lower_cl_images.c \
compiler/nir/nir_lower_clamp_color_outputs.c \
compiler/nir/nir_lower_clip.c \
compiler/nir/nir_lower_clip_cull_distance_arrays.c \
compiler/nir/nir_lower_clip_disable.c \
compiler/nir/nir_lower_clip_halfz.c \
compiler/nir/nir_lower_const_arrays_to_uniforms.c \
compiler/nir/nir_lower_continue_constructs.c \
compiler/nir/nir_lower_convert_alu_types.c \
compiler/nir/nir_lower_discard_if.c \
compiler/nir/nir_lower_discard_or_demote.c \
compiler/nir/nir_lower_double_ops.c \
compiler/nir/nir_lower_drawpixels.c \
compiler/nir/nir_lower_fb_read.c \
compiler/nir/nir_lower_flatshade.c \
compiler/nir/nir_lower_flrp.c \
compiler/nir/nir_lower_fp16_conv.c \
compiler/nir/nir_lower_frag_coord_to_pixel_coord.c \
compiler/nir/nir_lower_fragcolor.c \
compiler/nir/nir_lower_fragcoord_wtrans.c \
compiler/nir/nir_lower_frexp.c \
compiler/nir/nir_lower_global_vars_to_local.c \
compiler/nir/nir_lower_goto_ifs.c \
compiler/nir/nir_lower_gs_intrinsics.c \
compiler/nir/nir_lower_helper_writes.c \
compiler/nir/nir_lower_idiv.c \
compiler/nir/nir_lower_image.c \
compiler/nir/nir_lower_image_atomics_to_global.c \
compiler/nir/nir_lower_indirect_derefs.c \
compiler/nir/nir_lower_input_attachments.c \
compiler/nir/nir_lower_int64.c \
compiler/nir/nir_lower_interpolation.c \
compiler/nir/nir_lower_int_to_float.c \
compiler/nir/nir_lower_io_arrays_to_elements.c \
compiler/nir/nir_lower_interpolation.c \
compiler/nir/nir_lower_io.c \
compiler/nir/nir_lower_io_arrays_to_elements.c \
compiler/nir/nir_lower_io_to_scalar.c \
compiler/nir/nir_lower_io_to_temporaries.c \
compiler/nir/nir_lower_io_to_vector.c \
compiler/nir/nir_lower_is_helper_invocation.c \
compiler/nir/nir_lower_load_const_to_scalar.c \
compiler/nir/nir_lower_locals_to_regs.c \
compiler/nir/nir_lower_mediump.c \
compiler/nir/nir_lower_mem_access_bit_sizes.c \
compiler/nir/nir_lower_memcpy.c \
compiler/nir/nir_lower_memory_model.c \
compiler/nir/nir_lower_multiview.c \
compiler/nir/nir_lower_non_uniform_access.c \
compiler/nir/nir_lower_packing.c \
compiler/nir/nir_lower_passthrough_edgeflags.c \
compiler/nir/nir_lower_patch_vertices.c \
@ -256,23 +213,42 @@ SRC_C += compiler/glsl/glcpp/pp.c \
compiler/nir/nir_lower_pntc_ytransform.c \
compiler/nir/nir_lower_point_size.c \
compiler/nir/nir_lower_point_size_mov.c \
compiler/nir/nir_lower_regs_to_ssa.c \
compiler/nir/nir_lower_point_smooth.c \
compiler/nir/nir_lower_poly_line_smooth.c \
compiler/nir/nir_lower_printf.c \
compiler/nir/nir_lower_readonly_images_to_tex.c \
compiler/nir/nir_lower_reg_intrinsics_to_ssa.c \
compiler/nir/nir_lower_returns.c \
compiler/nir/nir_lower_robust_access.c \
compiler/nir/nir_lower_samplers.c \
compiler/nir/nir_lower_scratch.c \
compiler/nir/nir_lower_shader_calls.c \
compiler/nir/nir_lower_single_sampled.c \
compiler/nir/nir_lower_ssbo.c \
compiler/nir/nir_lower_subgroups.c \
compiler/nir/nir_lower_system_values.c \
compiler/nir/nir_lower_sysvals_to_varyings.c \
compiler/nir/nir_lower_task_shader.c \
compiler/nir/nir_lower_tess_coord_z.c \
compiler/nir/nir_lower_tex.c \
compiler/nir/nir_lower_to_source_mods.c \
compiler/nir/nir_lower_tex_shadow.c \
compiler/nir/nir_lower_texcoord_replace.c \
compiler/nir/nir_lower_texcoord_replace_late.c \
compiler/nir/nir_lower_two_sided_color.c \
compiler/nir/nir_lower_ubo_vec4.c \
compiler/nir/nir_lower_undef_to_zero.c \
compiler/nir/nir_lower_uniforms_to_ubo.c \
compiler/nir/nir_lower_var_copies.c \
compiler/nir/nir_lower_variable_initializers.c \
compiler/nir/nir_lower_vars_to_ssa.c \
compiler/nir/nir_lower_vec_to_movs.c \
compiler/nir/nir_lower_vec3_to_vec4.c \
compiler/nir/nir_lower_vec_to_regs.c \
compiler/nir/nir_lower_viewport_transform.c \
compiler/nir/nir_lower_wpos_center.c \
compiler/nir/nir_lower_wpos_ytransform.c \
compiler/nir/nir_lower_wrmasks.c \
compiler/nir/nir_metadata.c \
compiler/nir/nir_mod_analysis.c \
compiler/nir/nir_move_vec_src_uses_to_dest.c \
compiler/nir/nir_normalize_cubemap_coords.c \
compiler/nir/nir_opt_access.c \
@ -281,41 +257,61 @@ SRC_C += compiler/glsl/glcpp/pp.c \
compiler/nir/nir_opt_comparison_pre.c \
compiler/nir/nir_opt_conditional_discard.c \
compiler/nir/nir_opt_constant_folding.c \
compiler/nir/nir_opt_copy_propagate.c \
compiler/nir/nir_opt_copy_prop_vars.c \
compiler/nir/nir_opt_copy_propagate.c \
compiler/nir/nir_opt_cse.c \
compiler/nir/nir_opt_dce.c \
compiler/nir/nir_opt_dead_cf.c \
compiler/nir/nir_opt_dead_write_vars.c \
compiler/nir/nir_opt_find_array_copies.c \
compiler/nir/nir_opt_fragdepth.c \
compiler/nir/nir_opt_gcm.c \
compiler/nir/nir_opt_idiv_const.c \
compiler/nir/nir_opt_if.c \
compiler/nir/nir_opt_intrinsics.c \
compiler/nir/nir_opt_large_constants.c \
compiler/nir/nir_opt_load_store_vectorize.c \
compiler/nir/nir_opt_loop.c \
compiler/nir/nir_opt_loop_unroll.c \
compiler/nir/nir_opt_memcpy.c \
compiler/nir/nir_opt_move.c \
compiler/nir/nir_opt_move_discards_to_top.c \
compiler/nir/nir_opt_non_uniform_access.c \
compiler/nir/nir_opt_offsets.c \
compiler/nir/nir_opt_peephole_select.c \
compiler/nir/nir_opt_phi_precision.c \
compiler/nir/nir_opt_preamble.c \
compiler/nir/nir_opt_ray_queries.c \
compiler/nir/nir_opt_reassociate_bfi.c \
compiler/nir/nir_opt_rematerialize_compares.c \
compiler/nir/nir_opt_remove_phis.c \
compiler/nir/nir_opt_reuse_constants.c \
compiler/nir/nir_opt_shrink_stores.c \
compiler/nir/nir_opt_shrink_vectors.c \
compiler/nir/nir_opt_sink.c \
compiler/nir/nir_opt_trivial_continues.c \
compiler/nir/nir_opt_undef.c \
compiler/nir/nir_opt_uniform_atomics.c \
compiler/nir/nir_opt_vectorize.c \
compiler/nir/nir_passthrough_gs.c \
compiler/nir/nir_passthrough_tcs.c \
compiler/nir/nir_phi_builder.c \
compiler/nir/nir_print.c \
compiler/nir/nir_propagate_invariant.c \
compiler/nir/nir_range_analysis.c \
compiler/nir/nir_remove_dead_variables.c \
compiler/nir/nir_remove_tex_shadow.c \
compiler/nir/nir_repair_ssa.c \
compiler/nir/nir_scale_fdiv.c \
compiler/nir/nir_schedule.c \
compiler/nir/nir_search.c \
compiler/nir/nir_serialize.c \
compiler/nir/nir_split_64bit_vec3_and_vec4.c \
compiler/nir/nir_split_per_member_structs.c \
compiler/nir/nir_split_var_copies.c \
compiler/nir/nir_split_vars.c \
compiler/nir/nir_sweep.c \
compiler/nir/nir_to_lcssa.c \
compiler/nir/nir_trivialize_registers.c \
compiler/nir/nir_validate.c \
compiler/nir/nir_worklist.c \
compiler/shader_enums.c \
@ -334,9 +330,11 @@ SRC_C += compiler/glsl/glcpp/pp.c \
gallium/auxiliary/draw/draw_context.c \
gallium/auxiliary/draw/draw_fs.c \
gallium/auxiliary/draw/draw_gs.c \
gallium/auxiliary/draw/draw_mesh.c \
gallium/auxiliary/draw/draw_mesh_prim.c \
gallium/auxiliary/draw/draw_pipe.c \
gallium/auxiliary/draw/draw_pipe_aaline.c \
gallium/auxiliary/draw/draw_pipe_aapoint.c \
gallium/auxiliary/draw/draw_pipe.c \
gallium/auxiliary/draw/draw_pipe_clip.c \
gallium/auxiliary/draw/draw_pipe_cull.c \
gallium/auxiliary/draw/draw_pipe_flatshade.c \
@ -355,9 +353,9 @@ SRC_C += compiler/glsl/glcpp/pp.c \
gallium/auxiliary/draw/draw_pt.c \
gallium/auxiliary/draw/draw_pt_emit.c \
gallium/auxiliary/draw/draw_pt_fetch.c \
gallium/auxiliary/draw/draw_pt_fetch_emit.c \
gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c \
gallium/auxiliary/draw/draw_pt_fetch_shade_pipeline.c \
gallium/auxiliary/draw/draw_pt_mesh_pipeline.c \
gallium/auxiliary/draw/draw_pt_post_vs.c \
gallium/auxiliary/draw/draw_pt_so_emit.c \
gallium/auxiliary/draw/draw_pt_util.c \
@ -372,10 +370,6 @@ SRC_C += compiler/glsl/glcpp/pp.c \
gallium/auxiliary/driver_ddebug/dd_screen.c \
gallium/auxiliary/driver_noop/noop_pipe.c \
gallium/auxiliary/driver_noop/noop_state.c \
gallium/auxiliary/driver_rbug/rbug_context.c \
gallium/auxiliary/driver_rbug/rbug_core.c \
gallium/auxiliary/driver_rbug/rbug_objects.c \
gallium/auxiliary/driver_rbug/rbug_screen.c \
gallium/auxiliary/driver_trace/tr_context.c \
gallium/auxiliary/driver_trace/tr_dump.c \
gallium/auxiliary/driver_trace/tr_dump_state.c \
@ -386,98 +380,105 @@ SRC_C += compiler/glsl/glcpp/pp.c \
gallium/auxiliary/hud/hud_cpu.c \
gallium/auxiliary/hud/hud_driver_query.c \
gallium/auxiliary/hud/hud_fps.c \
gallium/auxiliary/indices/u_indices_gen.c \
gallium/auxiliary/indices/u_primconvert.c \
gallium/auxiliary/nir/nir_draw_helpers.c \
gallium/auxiliary/nir/nir_to_tgsi.c \
gallium/auxiliary/nir/tgsi_to_nir.c \
gallium/auxiliary/os/os_process.c \
gallium/auxiliary/pipe-loader/pipe_loader.c \
gallium/auxiliary/pipe-loader/pipe_loader_drm.c \
gallium/auxiliary/pipe-loader/pipe_loader_sw.c \
gallium/auxiliary/pipebuffer/pb_slab.c \
gallium/auxiliary/postprocess/pp_celshade.c \
gallium/auxiliary/postprocess/pp_colors.c \
gallium/auxiliary/postprocess/pp_init.c \
gallium/auxiliary/postprocess/pp_mlaa.c \
gallium/auxiliary/postprocess/pp_program.c \
gallium/auxiliary/postprocess/pp_run.c \
gallium/auxiliary/rbug/rbug_connection.c \
gallium/auxiliary/rbug/rbug_context.c \
gallium/auxiliary/rbug/rbug_core.c \
gallium/auxiliary/rbug/rbug_demarshal.c \
gallium/auxiliary/rbug/rbug_shader.c \
gallium/auxiliary/rbug/rbug_texture.c \
gallium/auxiliary/renderonly/renderonly.c \
gallium/auxiliary/rtasm/rtasm_cpu.c \
gallium/auxiliary/rtasm/rtasm_execmem.c \
gallium/auxiliary/rtasm/rtasm_x86sse.c \
gallium/auxiliary/tgsi/tgsi_aa_point.c \
gallium/auxiliary/tgsi/tgsi_build.c \
gallium/auxiliary/tgsi/tgsi_dump.c \
gallium/auxiliary/tgsi/tgsi_emulate.c \
gallium/auxiliary/tgsi/tgsi_dynamic_indexing.c \
gallium/auxiliary/tgsi/tgsi_exec.c \
gallium/auxiliary/tgsi/tgsi_from_mesa.c \
gallium/auxiliary/tgsi/tgsi_info.c \
gallium/auxiliary/tgsi/tgsi_iterate.c \
gallium/auxiliary/tgsi/tgsi_lowering.c \
gallium/auxiliary/tgsi/tgsi_parse.c \
gallium/auxiliary/tgsi/tgsi_point_sprite.c \
gallium/auxiliary/tgsi/tgsi_sanity.c \
gallium/auxiliary/tgsi/tgsi_scan.c \
gallium/auxiliary/tgsi/tgsi_strings.c \
gallium/auxiliary/tgsi/tgsi_text.c \
gallium/auxiliary/tgsi/tgsi_transform.c \
gallium/auxiliary/tgsi/tgsi_two_side.c \
gallium/auxiliary/tgsi/tgsi_ureg.c \
gallium/auxiliary/tgsi/tgsi_util.c \
gallium/auxiliary/tgsi/tgsi_vpos.c \
gallium/auxiliary/translate/translate.c \
gallium/auxiliary/translate/translate_cache.c \
gallium/auxiliary/translate/translate_generic.c \
gallium/auxiliary/translate/translate_sse.c \
gallium/auxiliary/util/u_async_debug.c \
gallium/auxiliary/util/u_bitmask.c \
gallium/auxiliary/util/u_blitter.c \
gallium/auxiliary/util/u_cache.c \
gallium/auxiliary/util/u_compute.c \
gallium/auxiliary/util/u_debug_describe.c \
gallium/auxiliary/util/u_debug_flush.c \
gallium/auxiliary/util/u_debug_image.c \
gallium/auxiliary/util/u_debug_refcnt.c \
gallium/auxiliary/util/u_dl.c \
gallium/auxiliary/util/u_draw.c \
gallium/auxiliary/util/u_draw_quad.c \
gallium/auxiliary/util/u_driconf.c \
gallium/auxiliary/util/u_dump_defines.c \
gallium/auxiliary/util/u_dump_state.c \
gallium/auxiliary/util/u_framebuffer.c \
gallium/auxiliary/util/u_gen_mipmap.c \
gallium/auxiliary/util/u_hash_table.c \
gallium/auxiliary/util/u_handle_table.c \
gallium/auxiliary/util/u_helpers.c \
gallium/auxiliary/util/u_index_modify.c \
gallium/auxiliary/util/u_live_shader_cache.c \
gallium/auxiliary/util/u_log.c \
gallium/auxiliary/util/u_network.c \
gallium/auxiliary/util/u_prim.c \
gallium/auxiliary/util/u_prim_restart.c \
gallium/auxiliary/util/u_pstipple.c \
gallium/auxiliary/util/u_resource.c \
gallium/auxiliary/util/u_sample_positions.c \
gallium/auxiliary/util/u_sampler.c \
gallium/auxiliary/util/u_screen.c \
gallium/auxiliary/util/u_simple_shaders.c \
gallium/auxiliary/util/u_split_draw.c \
gallium/auxiliary/util/u_suballoc.c \
gallium/auxiliary/util/u_surface.c \
gallium/auxiliary/util/u_tests.c \
gallium/auxiliary/util/u_texture.c \
gallium/auxiliary/util/u_threaded_context.c \
gallium/auxiliary/util/u_tile.c \
gallium/auxiliary/util/u_trace_gallium.c \
gallium/auxiliary/util/u_transfer.c \
gallium/auxiliary/util/u_transfer_helper.c \
gallium/auxiliary/util/u_upload_mgr.c \
gallium/auxiliary/util/u_vbuf.c \
gallium/auxiliary/util/u_vertex_state_cache.c \
gallium/frontends/dri/dri2.c \
gallium/frontends/dri/dri_context.c \
gallium/frontends/dri/dri_drawable.c \
gallium/frontends/dri/dri_helpers.c \
gallium/frontends/dri/dri_query_renderer.c \
gallium/frontends/dri/dri_screen.c \
gallium/frontends/dri/dri_util.c \
gallium/frontends/dri/drisw.c \
gallium/frontends/dri/dri2.c \
gallium/targets/dri/target.c \
gallium/winsys/iris/drm/iris_drm_winsys.c \
gallium/winsys/sw/dri/dri_sw_winsys.c \
gallium/winsys/sw/null/null_sw_winsys.c \
gallium/winsys/sw/wrapper/wrapper_sw_winsys.c \
loader/loader.c \
loader/pci_id_driver_map.c \
mesa/drivers/dri/common/dri_util.c \
loader/loader_dri_helper.c \
mapi/entry.c \
mesa/drivers/dri/common/megadriver_stub.c \
mesa/drivers/dri/common/utils.c \
mesa/main/accum.c \
mesa/main/api_arrayelt.c \
mesa/main/arbprogram.c \
@ -492,22 +493,19 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/main/buffers.c \
mesa/main/clear.c \
mesa/main/clip.c \
mesa/main/colortab.c \
mesa/main/compute.c \
mesa/main/condrender.c \
mesa/main/conservativeraster.c \
mesa/main/context.c \
mesa/main/convolve.c \
mesa/main/copyimage.c \
mesa/main/cpuinfo.c \
mesa/main/debug.c \
mesa/main/debug_output.c \
mesa/main/depth.c \
mesa/main/dlist.c \
mesa/main/draw.c \
mesa/main/draw_validate.c \
mesa/main/drawpix.c \
mesa/main/drawtex.c \
mesa/main/draw_validate.c \
mesa/main/enable.c \
mesa/main/errors.c \
mesa/main/es1_conversion.c \
@ -517,25 +515,28 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/main/externalobjects.c \
mesa/main/fbobject.c \
mesa/main/feedback.c \
mesa/main/ff_fragment_shader.c \
mesa/main/ffvertex_prog.c \
mesa/main/fog.c \
mesa/main/format_utils.c \
mesa/main/formatquery.c \
mesa/main/formats.c \
mesa/main/format_utils.c \
mesa/main/framebuffer.c \
mesa/main/genmipmap.c \
mesa/main/get.c \
mesa/main/getstring.c \
mesa/main/glformats.c \
mesa/main/glspirv.c \
mesa/main/glthread_bufferobj.c \
mesa/main/glthread.c \
mesa/main/glthread_bufferobj.c \
mesa/main/glthread_draw.c \
mesa/main/glthread_draw_unroll.c \
mesa/main/glthread_get.c \
mesa/main/glthread_list.c \
mesa/main/glthread_shaderobj.c \
mesa/main/glthread_varray.c \
mesa/main/hash.c \
mesa/main/hint.c \
mesa/main/histogram.c \
mesa/main/image.c \
mesa/main/light.c \
mesa/main/lines.c \
@ -543,7 +544,6 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/main/mipmap.c \
mesa/main/multisample.c \
mesa/main/objectlabel.c \
mesa/main/objectpurge.c \
mesa/main/pack.c \
mesa/main/pbo.c \
mesa/main/performance_monitor.c \
@ -573,8 +573,8 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/main/state.c \
mesa/main/stencil.c \
mesa/main/syncobj.c \
mesa/main/texcompress_bptc.c \
mesa/main/texcompress.c \
mesa/main/texcompress_bptc.c \
mesa/main/texcompress_cpal.c \
mesa/main/texcompress_etc.c \
mesa/main/texcompress_fxt1.c \
@ -597,28 +597,22 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/main/vdpau.c \
mesa/main/version.c \
mesa/main/viewport.c \
mesa/main/vtxfmt.c \
mesa/math/m_eval.c \
mesa/math/m_matrix.c \
mesa/program/arbprogparse.c \
mesa/program/prog_cache.c \
mesa/program/prog_instruction.c \
mesa/program/prog_opt_constant_fold.c \
mesa/program/prog_optimize.c \
mesa/program/prog_parameter.c \
mesa/program/prog_parameter_layout.c \
mesa/program/prog_print.c \
mesa/program/program.c \
mesa/program/programopt.c \
mesa/program/program_parse_extra.c \
mesa/program/prog_statevars.c \
mesa/program/prog_to_nir.c \
mesa/program/program.c \
mesa/program/program_parse_extra.c \
mesa/program/symbol_table.c \
mesa/state_tracker/st_atifs_to_nir.c \
mesa/state_tracker/st_atom_array.c \
mesa/state_tracker/st_atom_atomicbuf.c \
mesa/state_tracker/st_atom_blend.c \
mesa/state_tracker/st_atom.c \
mesa/state_tracker/st_atom_clip.c \
mesa/state_tracker/st_atom_constbuf.c \
mesa/state_tracker/st_atom_depth.c \
@ -636,77 +630,63 @@ SRC_C += compiler/glsl/glcpp/pp.c \
mesa/state_tracker/st_atom_texture.c \
mesa/state_tracker/st_atom_viewport.c \
mesa/state_tracker/st_cb_bitmap.c \
mesa/state_tracker/st_cb_bitmap_shader.c \
mesa/state_tracker/st_cb_blit.c \
mesa/state_tracker/st_cb_bufferobjects.c \
mesa/state_tracker/st_cb_clear.c \
mesa/state_tracker/st_cb_compute.c \
mesa/state_tracker/st_cb_condrender.c \
mesa/state_tracker/st_cb_copyimage.c \
mesa/state_tracker/st_cb_drawpixels.c \
mesa/state_tracker/st_cb_drawpixels_shader.c \
mesa/state_tracker/st_cb_drawtex.c \
mesa/state_tracker/st_cb_eglimage.c \
mesa/state_tracker/st_cb_fbo.c \
mesa/state_tracker/st_cb_feedback.c \
mesa/state_tracker/st_cb_flush.c \
mesa/state_tracker/st_cb_memoryobjects.c \
mesa/state_tracker/st_cb_msaa.c \
mesa/state_tracker/st_cb_perfmon.c \
mesa/state_tracker/st_cb_perfquery.c \
mesa/state_tracker/st_cb_program.c \
mesa/state_tracker/st_cb_queryobj.c \
mesa/state_tracker/st_cb_rasterpos.c \
mesa/state_tracker/st_cb_readpixels.c \
mesa/state_tracker/st_cb_semaphoreobjects.c \
mesa/state_tracker/st_cb_strings.c \
mesa/state_tracker/st_cb_syncobj.c \
mesa/state_tracker/st_cb_texturebarrier.c \
mesa/state_tracker/st_cb_texture.c \
mesa/state_tracker/st_cb_viewport.c \
mesa/state_tracker/st_cb_xformfb.c \
mesa/state_tracker/st_context.c \
mesa/state_tracker/st_copytex.c \
mesa/state_tracker/st_debug.c \
mesa/state_tracker/st_draw.c \
mesa/state_tracker/st_draw_feedback.c \
mesa/state_tracker/st_draw_hw_select.c \
mesa/state_tracker/st_extensions.c \
mesa/state_tracker/st_format.c \
mesa/state_tracker/st_gen_mipmap.c \
mesa/state_tracker/st_interop.c \
mesa/state_tracker/st_manager.c \
mesa/state_tracker/st_nir_builtins.c \
mesa/state_tracker/st_nir_lower_builtin.c \
mesa/state_tracker/st_nir_lower_fog.c \
mesa/state_tracker/st_nir_lower_position_invariant.c \
mesa/state_tracker/st_nir_lower_tex_src_plane.c \
mesa/state_tracker/st_pbo.c \
mesa/state_tracker/st_pbo_compute.c \
mesa/state_tracker/st_program.c \
mesa/state_tracker/st_sampler_view.c \
mesa/state_tracker/st_scissor.c \
mesa/state_tracker/st_shader_cache.c \
mesa/state_tracker/st_texcompress_compute.c \
mesa/state_tracker/st_texture.c \
mesa/state_tracker/st_tgsi_lower_depth_clamp.c \
mesa/state_tracker/st_tgsi_lower_yuv.c \
mesa/state_tracker/st_vdpau.c \
mesa/vbo/vbo_context.c \
mesa/vbo/vbo_exec_api.c \
mesa/vbo/vbo_exec.c \
mesa/vbo/vbo_exec_api.c \
mesa/vbo/vbo_exec_draw.c \
mesa/vbo/vbo_exec_eval.c \
mesa/vbo/vbo_minmax_index.c \
mesa/vbo/vbo_noop.c \
mesa/vbo/vbo_save_api.c \
mesa/vbo/vbo_save.c \
mesa/vbo/vbo_save_api.c \
mesa/vbo/vbo_save_draw.c \
mesa/vbo/vbo_save_loopback.c \
mesa/x86/common_x86.c \
util/blob.c \
util/build_id.c \
util/crc32.c \
util/debug.c \
util/disk_cache.c \
util/disk_cache_os.c \
util/double.c \
util/fast_idiv_by_const.c \
util/format/u_format_bptc.c \
util/format/u_format.c \
util/format/u_format_bptc.c \
util/format/u_format_etc.c \
util/format/u_format_fxt1.c \
util/format/u_format_latc.c \
util/format/u_format_other.c \
util/format/u_format_rgtc.c \
@ -719,29 +699,76 @@ SRC_C += compiler/glsl/glcpp/pp.c \
util/os_file.c \
util/os_misc.c \
util/os_time.c \
util/perf/u_trace.c \
util/ralloc.c \
util/rand_xor.c \
util/rb_tree.c \
util/register_allocate.c \
util/rgtc.c \
util/rwlock.c \
util/set.c \
util/sha1/sha1.c \
util/simple_mtx.c \
util/slab.c \
util/softfloat.c \
util/string_buffer.c \
util/strtod.c \
util/u_call_once.c \
util/u_cpu_detect.c \
util/u_debug.c \
util/u_dynarray.c \
util/u_hash_table.c \
util/u_idalloc.c \
util/u_math.c \
util/u_mm.c \
util/u_printf.c \
util/u_process.c \
util/u_queue.c \
util/u_thread.c \
util/u_vector.c \
util/u_worklist.c \
util/vma.c \
util/xmlconfig.c
#
# generated
#
SRC_CC += compiler/glsl/glsl_parser.cpp \
compiler/glsl/glsl_lexer.cpp \
SRC_C += compiler/builtin_types.c \
compiler/glsl/glcpp/glcpp-lex.c \
compiler/glsl/glcpp/glcpp-parse.c \
compiler/nir/nir_constant_expressions.c \
compiler/nir/nir_intrinsics.c \
compiler/nir/nir_opcodes.c \
compiler/nir/nir_opt_algebraic.c \
compiler/spirv/spirv_info.c \
compiler/spirv/vtn_gather_types.c \
gallium/auxiliary/indices/u_indices_gen.c \
gallium/auxiliary/tr_util.c \
mapi/glapi/gen/api_exec_init.c \
mapi/glapi/gen/enums.c \
mapi/glapi/gen/marshal_generated0.c \
mapi/glapi/gen/marshal_generated1.c \
mapi/glapi/gen/marshal_generated2.c \
mapi/glapi/gen/marshal_generated3.c \
mapi/glapi/gen/marshal_generated4.c \
mapi/glapi/gen/marshal_generated5.c \
mapi/glapi/gen/marshal_generated6.c \
mapi/glapi/gen/marshal_generated7.c \
mapi/glapi/gen/unmarshal_table.c \
mesa/format_fallback.c \
mesa/program/lex.yy.c \
mesa/program/program_parse.tab.c \
util/format/u_format_table.c \
util/format_srgb.c
CC_OPT += -DMAPI_ABI_HEADER=\"glapi/gen/glapi_mapi_tmp.h\" \
-DMAPI_MODE_BRIDGE
CC_OPT += -Wno-unused-function
CC_OPT_loader/loader = -DDEFAULT_DRIVER_DIR='"/drivers"'
CC_OPT_compiler/glsl/glsl_lexer = -include "stdint.h"
@ -756,3 +783,5 @@ vpath %.c $(MESA_GEN_DIR)/src
vpath %.cpp $(MESA_SRC_DIR)/src
vpath %.cpp $(MESA_GEN_DIR)/src
vpath %.cc $(LIB_DIR)
# vi: set ft=make:

View File

@ -6,40 +6,38 @@ INC_DIR += $(MESA_SRC_DIR)/src/gallium/auxiliary \
$(MESA_SRC_DIR)/src/compiler/nir \
$(MESA_GEN_DIR)/src/compiler/nir \
SRC_C = gallium/drivers/softpipe/sp_buffer.c \
gallium/drivers/softpipe/sp_clear.c \
gallium/drivers/softpipe/sp_compute.c \
gallium/drivers/softpipe/sp_context.c \
gallium/drivers/softpipe/sp_draw_arrays.c \
gallium/drivers/softpipe/sp_fence.c \
gallium/drivers/softpipe/sp_flush.c \
gallium/drivers/softpipe/sp_fs_exec.c \
gallium/drivers/softpipe/sp_image.c \
gallium/drivers/softpipe/sp_prim_vbuf.c \
gallium/drivers/softpipe/sp_quad_blend.c \
gallium/drivers/softpipe/sp_quad_depth_test.c \
gallium/drivers/softpipe/sp_quad_fs.c \
gallium/drivers/softpipe/sp_quad_pipe.c \
gallium/drivers/softpipe/sp_quad_stipple.c \
gallium/drivers/softpipe/sp_query.c \
gallium/drivers/softpipe/sp_screen.c \
gallium/drivers/softpipe/sp_setup.c \
gallium/drivers/softpipe/sp_state_blend.c \
gallium/drivers/softpipe/sp_state_clip.c \
gallium/drivers/softpipe/sp_state_derived.c \
gallium/drivers/softpipe/sp_state_image.c \
gallium/drivers/softpipe/sp_state_rasterizer.c \
gallium/drivers/softpipe/sp_state_sampler.c \
gallium/drivers/softpipe/sp_state_shader.c \
gallium/drivers/softpipe/sp_state_so.c \
gallium/drivers/softpipe/sp_state_surface.c \
gallium/drivers/softpipe/sp_state_vertex.c \
gallium/drivers/softpipe/sp_surface.c \
gallium/drivers/softpipe/sp_tex_sample.c \
gallium/drivers/softpipe/sp_tex_tile_cache.c \
gallium/drivers/softpipe/sp_texture.c \
gallium/drivers/softpipe/sp_tile_cache.c \
SRC_C = gallium/drivers/softpipe/sp_buffer.c \
gallium/drivers/softpipe/sp_clear.c \
gallium/drivers/softpipe/sp_compute.c \
gallium/drivers/softpipe/sp_context.c \
gallium/drivers/softpipe/sp_draw_arrays.c \
gallium/drivers/softpipe/sp_fence.c \
gallium/drivers/softpipe/sp_flush.c \
gallium/drivers/softpipe/sp_fs_exec.c \
gallium/drivers/softpipe/sp_image.c \
gallium/drivers/softpipe/sp_prim_vbuf.c \
gallium/drivers/softpipe/sp_quad_blend.c \
gallium/drivers/softpipe/sp_quad_depth_test.c \
gallium/drivers/softpipe/sp_quad_fs.c \
gallium/drivers/softpipe/sp_quad_pipe.c \
gallium/drivers/softpipe/sp_query.c \
gallium/drivers/softpipe/sp_screen.c \
gallium/drivers/softpipe/sp_setup.c \
gallium/drivers/softpipe/sp_state_blend.c \
gallium/drivers/softpipe/sp_state_clip.c \
gallium/drivers/softpipe/sp_state_derived.c \
gallium/drivers/softpipe/sp_state_image.c \
gallium/drivers/softpipe/sp_state_rasterizer.c \
gallium/drivers/softpipe/sp_state_sampler.c \
gallium/drivers/softpipe/sp_state_shader.c \
gallium/drivers/softpipe/sp_state_so.c \
gallium/drivers/softpipe/sp_state_surface.c \
gallium/drivers/softpipe/sp_state_vertex.c \
gallium/drivers/softpipe/sp_surface.c \
gallium/drivers/softpipe/sp_tex_sample.c \
gallium/drivers/softpipe/sp_tex_tile_cache.c \
gallium/drivers/softpipe/sp_texture.c \
gallium/drivers/softpipe/sp_tile_cache.c \
vpath %.c $(MESA_SRC_DIR)/src

View File

@ -2,6 +2,8 @@ LIBS = libc libdrm
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DHAVE_LIBDRM
INC_DIR += $(MESA_SRC_DIR)/src/compiler/nir \
$(MESA_SRC_DIR)/src/etnaviv \
$(MESA_SRC_DIR)/src/gallium/auxiliary \
@ -12,7 +14,6 @@ INC_DIR += $(MESA_SRC_DIR)/src/compiler/nir \
REP_INC_DIR += include/drm-uapi
SRC_C = etnaviv/drm/etnaviv_bo.c \
etnaviv/drm/etnaviv_bo_cache.c \
etnaviv/drm/etnaviv_cmd_stream.c \
@ -29,7 +30,6 @@ SRC_C = etnaviv/drm/etnaviv_bo.c \
gallium/drivers/etnaviv/etnaviv_compiler_nir_emit.c \
gallium/drivers/etnaviv/etnaviv_compiler_nir_liveness.c \
gallium/drivers/etnaviv/etnaviv_compiler_nir_ra.c \
gallium/drivers/etnaviv/etnaviv_compiler_tgsi.c \
gallium/drivers/etnaviv/etnaviv_context.c \
gallium/drivers/etnaviv/etnaviv_disasm.c \
gallium/drivers/etnaviv/etnaviv_disk_cache.c \
@ -38,11 +38,14 @@ SRC_C = etnaviv/drm/etnaviv_bo.c \
gallium/drivers/etnaviv/etnaviv_fence.c \
gallium/drivers/etnaviv/etnaviv_format.c \
gallium/drivers/etnaviv/etnaviv_nir.c \
gallium/drivers/etnaviv/etnaviv_nir_lower_source_mods.c \
gallium/drivers/etnaviv/etnaviv_nir_lower_texture.c \
gallium/drivers/etnaviv/etnaviv_nir_lower_ubo_to_uniform.c \
gallium/drivers/etnaviv/etnaviv_perfmon.c \
gallium/drivers/etnaviv/etnaviv_query.c \
gallium/drivers/etnaviv/etnaviv_query_acc.c \
gallium/drivers/etnaviv/etnaviv_query_acc_occlusion.c \
gallium/drivers/etnaviv/etnaviv_query_acc_perfmon.c \
gallium/drivers/etnaviv/etnaviv_query.c \
gallium/drivers/etnaviv/etnaviv_query_sw.c \
gallium/drivers/etnaviv/etnaviv_rasterizer.c \
gallium/drivers/etnaviv/etnaviv_resource.c \
@ -57,7 +60,7 @@ SRC_C = etnaviv/drm/etnaviv_bo.c \
gallium/drivers/etnaviv/etnaviv_tiling.c \
gallium/drivers/etnaviv/etnaviv_transfer.c \
gallium/drivers/etnaviv/etnaviv_uniforms.c \
gallium/drivers/etnaviv/etnaviv_zsa.c \
gallium/winsys/etnaviv/drm/etnaviv_drm_winsys.c \
gallium/drivers/etnaviv/etnaviv_zsa.c
vpath %.c $(MESA_SRC_DIR)/src

View File

@ -2,6 +2,8 @@ LIBS = libc libdrm
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DHAVE_LIBDRM
INC_DIR += $(MESA_SRC_DIR)/src/compiler/nir \
$(MESA_SRC_DIR)/src/gallium/auxiliary \
$(MESA_SRC_DIR)/src/gallium/drivers \
@ -13,36 +15,36 @@ INC_DIR += $(MESA_SRC_DIR)/src/compiler/nir \
REP_INC_DIR += include/drm-uapi
SRC_C := \
gallium/drivers/lima/lima_draw.c \
gallium/drivers/lima/lima_job.c \
gallium/drivers/lima/lima_context.c \
gallium/drivers/lima/ir/pp/node_to_instr.c \
gallium/drivers/lima/ir/pp/liveness.c \
gallium/drivers/lima/ir/pp/codegen.c \
gallium/drivers/lima/ir/pp/nir.c \
gallium/drivers/lima/ir/pp/disasm.c \
gallium/drivers/lima/ir/pp/regalloc.c \
gallium/drivers/lima/ir/pp/node.c \
gallium/drivers/lima/ir/pp/instr.c \
gallium/drivers/lima/ir/pp/lower.c \
gallium/drivers/lima/ir/pp/scheduler.c \
gallium/drivers/lima/ir/gp/codegen.c \
gallium/drivers/lima/ir/gp/nir.c \
SRC_C = gallium/drivers/lima/ir/gp/codegen.c \
gallium/drivers/lima/ir/gp/disasm.c \
gallium/drivers/lima/ir/gp/regalloc.c \
gallium/drivers/lima/ir/gp/optimize.c \
gallium/drivers/lima/ir/gp/node.c \
gallium/drivers/lima/ir/gp/reduce_scheduler.c \
gallium/drivers/lima/ir/gp/instr.c \
gallium/drivers/lima/ir/gp/lower.c \
gallium/drivers/lima/ir/gp/nir.c \
gallium/drivers/lima/ir/gp/node.c \
gallium/drivers/lima/ir/gp/optimize.c \
gallium/drivers/lima/ir/gp/reduce_scheduler.c \
gallium/drivers/lima/ir/gp/regalloc.c \
gallium/drivers/lima/ir/gp/scheduler.c \
gallium/drivers/lima/ir/lima_nir_split_load_input.c \
gallium/drivers/lima/ir/lima_nir_duplicate_consts.c \
gallium/drivers/lima/ir/lima_nir_duplicate_intrinsic.c \
gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c \
gallium/drivers/lima/ir/lima_nir_lower_txp.c \
gallium/drivers/lima/ir/lima_nir_split_load_input.c \
gallium/drivers/lima/ir/lima_nir_split_loads.c \
gallium/drivers/lima/ir/pp/codegen.c \
gallium/drivers/lima/ir/pp/disasm.c \
gallium/drivers/lima/ir/pp/instr.c \
gallium/drivers/lima/ir/pp/liveness.c \
gallium/drivers/lima/ir/pp/lower.c \
gallium/drivers/lima/ir/pp/nir.c \
gallium/drivers/lima/ir/pp/node.c \
gallium/drivers/lima/ir/pp/node_to_instr.c \
gallium/drivers/lima/ir/pp/regalloc.c \
gallium/drivers/lima/ir/pp/scheduler.c \
gallium/drivers/lima/lima_blit.c \
gallium/drivers/lima/lima_bo.c \
gallium/drivers/lima/lima_context.c \
gallium/drivers/lima/lima_disk_cache.c \
gallium/drivers/lima/lima_draw.c \
gallium/drivers/lima/lima_fence.c \
gallium/drivers/lima/lima_format.c \
@ -55,10 +57,13 @@ SRC_C := \
gallium/drivers/lima/lima_state.c \
gallium/drivers/lima/lima_texture.c \
gallium/drivers/lima/lima_util.c \
gallium/drivers/lima/lima_nir_algebraic.c \
gallium/winsys/lima/drm/lima_drm_winsys.c \
panfrost/shared/pan_minmax_cache.c \
panfrost/shared/pan_tiling.c
#
# generated
#
SRC_C += gallium/drivers/lima/lima_nir_algebraic.c
vpath %.c $(MESA_SRC_DIR)/src
vpath %.c $(MESA_SRC_DIR)/../../../generated/src

View File

@ -1,108 +1,53 @@
LIBS = libc libdrm \
iris_gen80 iris_gen90 iris_gen110 iris_gen120 iris_gen125 \
isl_gen80 isl_gen90 isl_gen110 isl_gen120 isl_gen125
LIBS = libc libdrm stdcxx \
iris_gen80 iris_gen90 iris_gen110 iris_gen120 iris_gen125 iris_gen200\
isl_gen80 isl_gen90 isl_gen110 isl_gen120 isl_gen125 isl_gen200
LIBS += expat zlib
CC_CXX_OPT_STD = -std=c++17
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_CXX_WARN_STRICT =
CC_OPT += -DGALLIUM_IRIS
CC_OPT += -DGALLIUM_IRIS -DHAVE_LIBDRM
# We rename 'ioctl' calls to 'genode_ioctl' calls (drm lib)
CC_C_OPT += -Dioctl=genode_ioctl
CC_C_OPT += -DUSE_SSE41 -msse4
CC_OPT += -Wno-unused-function
INC_DIR += $(MESA_GEN_DIR)/src/compiler \
$(MESA_GEN_DIR)/src/compiler/nir \
$(MESA_GEN_DIR)/src/intel
$(MESA_GEN_DIR)/src/intel \
$(MESA_GEN_DIR)/src/intel/dev \
$(MESA_GEN_DIR)/src/intel/ds \
INC_DIR += $(MESA_SRC_DIR)/src/compiler/nir \
INC_DIR += $(MESA_SRC_DIR)/src/compiler \
$(MESA_SRC_DIR)/src/compiler/nir \
$(MESA_SRC_DIR)/src/gallium/auxiliary \
$(MESA_SRC_DIR)/src/gallium/drivers \
$(MESA_SRC_DIR)/src/gallium/drivers/iris \
$(MESA_SRC_DIR)/src/intel \
$(MESA_SRC_DIR)/src/intel/common \
$(MESA_SRC_DIR)/src/intel/dev \
$(MESA_SRC_DIR)/src/intel/ds \
$(MESA_SRC_DIR)/src/mapi \
$(MESA_SRC_DIR)/src/mesa \
$(MESA_SRC_DIR)/src/mesa/main \
$(MESA_SRC_DIR)/src/mesa
SRC_C = gallium/drivers/iris/iris_batch.c \
gallium/drivers/iris/iris_binder.c \
gallium/drivers/iris/iris_blit.c \
gallium/drivers/iris/iris_border_color.c \
gallium/drivers/iris/iris_bufmgr.c \
gallium/drivers/iris/iris_clear.c \
gallium/drivers/iris/iris_context.c \
gallium/drivers/iris/iris_disk_cache.c \
gallium/drivers/iris/iris_draw.c \
gallium/drivers/iris/iris_fence.c \
gallium/drivers/iris/iris_fine_fence.c \
gallium/drivers/iris/iris_formats.c \
gallium/drivers/iris/iris_monitor.c \
gallium/drivers/iris/iris_perf.c \
gallium/drivers/iris/iris_performance_query.c \
gallium/drivers/iris/iris_pipe_control.c \
gallium/drivers/iris/iris_program.c \
gallium/drivers/iris/iris_program_cache.c \
gallium/drivers/iris/iris_resolve.c \
gallium/drivers/iris/iris_resource.c \
gallium/drivers/iris/iris_screen.c \
gallium/winsys/iris/drm/iris_drm_winsys.c
SRC_C += $(addprefix intel/blorp/, $(notdir $(wildcard $(MESA_SRC_DIR)/src/intel/blorp/*.c)))
SRC_C += $(addprefix intel/perf/, $(notdir $(wildcard $(MESA_SRC_DIR)/src/intel/perf/*.c)))
SRC_C += intel/perf/gen_perf_metrics.c
SRC_C += $(addprefix intel/common/, $(notdir $(wildcard $(MESA_SRC_DIR)/src/intel/common/*.c)))
SRC_C += intel/compiler/brw_clip_line.c \
intel/compiler/brw_clip_point.c \
intel/compiler/brw_clip_tri.c \
intel/compiler/brw_clip_unfilled.c \
intel/compiler/brw_clip_util.c \
intel/compiler/brw_compile_clip.c \
intel/compiler/brw_compiler.c \
intel/compiler/brw_compile_sf.c \
intel/compiler/brw_debug_recompile.c \
intel/compiler/brw_disasm.c \
intel/compiler/brw_disasm_info.c \
intel/compiler/brw_eu_compact.c \
intel/compiler/brw_eu_emit.c \
intel/compiler/brw_eu_util.c \
intel/compiler/brw_eu_validate.c \
intel/compiler/brw_interpolation_map.c \
intel/compiler/brw_nir_analyze_boolean_resolves.c \
intel/compiler/brw_nir_analyze_ubo_ranges.c \
intel/compiler/brw_nir_attribute_workarounds.c \
intel/compiler/brw_nir.c \
intel/compiler/brw_nir_clamp_image_1d_2d_array_sizes.c \
intel/compiler/brw_nir_lower_alpha_to_coverage.c \
intel/compiler/brw_nir_lower_conversions.c \
intel/compiler/brw_nir_lower_cs_intrinsics.c \
intel/compiler/brw_nir_lower_image_load_store.c \
intel/compiler/brw_nir_lower_intersection_shader.c \
intel/compiler/brw_nir_lower_mem_access_bit_sizes.c \
intel/compiler/brw_nir_lower_rt_intrinsics.c \
intel/compiler/brw_nir_lower_scoped_barriers.c \
intel/compiler/brw_nir_lower_shader_calls.c \
intel/compiler/brw_nir_opt_peephole_ffma.c \
intel/compiler/brw_nir_rt.c \
intel/compiler/brw_nir_tcs_workarounds.c \
intel/compiler/brw_packed_float.c \
intel/compiler/brw_reg_type.c \
intel/compiler/brw_vue_map.c
SRC_CC += intel/compiler/brw_cfg.cpp \
intel/compiler/brw_dead_control_flow.cpp \
intel/compiler/brw_eu.cpp \
intel/compiler/brw_fs.cpp \
intel/compiler/brw_fs_bank_conflicts.cpp \
intel/compiler/brw_fs_cmod_propagation.cpp \
intel/compiler/brw_fs_combine_constants.cpp \
intel/compiler/brw_fs_copy_propagation.cpp \
intel/compiler/brw_fs.cpp \
intel/compiler/brw_fs_cse.cpp \
intel/compiler/brw_fs_dead_code_eliminate.cpp \
intel/compiler/brw_fs_generator.cpp \
intel/compiler/brw_fs_live_variables.cpp \
intel/compiler/brw_fs_lower_dpas.cpp \
intel/compiler/brw_fs_lower_pack.cpp \
intel/compiler/brw_fs_lower_regioning.cpp \
intel/compiler/brw_fs_nir.cpp \
@ -111,15 +56,19 @@ SRC_CC += intel/compiler/brw_cfg.cpp \
intel/compiler/brw_fs_saturate_propagation.cpp \
intel/compiler/brw_fs_scoreboard.cpp \
intel/compiler/brw_fs_sel_peephole.cpp \
intel/compiler/brw_fs_thread_payload.cpp \
intel/compiler/brw_fs_validate.cpp \
intel/compiler/brw_fs_visitor.cpp \
intel/compiler/brw_ir_performance.cpp \
intel/compiler/brw_lower_logical_sends.cpp \
intel/compiler/brw_mesh.cpp \
intel/compiler/brw_predicated_break.cpp \
intel/compiler/brw_schedule_instructions.cpp \
intel/compiler/brw_shader.cpp \
intel/compiler/brw_simd_selection.cpp \
intel/compiler/brw_vec4.cpp \
intel/compiler/brw_vec4_cmod_propagation.cpp \
intel/compiler/brw_vec4_copy_propagation.cpp \
intel/compiler/brw_vec4.cpp \
intel/compiler/brw_vec4_cse.cpp \
intel/compiler/brw_vec4_dead_code_eliminate.cpp \
intel/compiler/brw_vec4_generator.cpp \
@ -133,30 +82,135 @@ SRC_CC += intel/compiler/brw_cfg.cpp \
intel/compiler/brw_vec4_tes.cpp \
intel/compiler/brw_vec4_visitor.cpp \
intel/compiler/brw_vec4_vs_visitor.cpp \
intel/compiler/brw_wm_iz.cpp \
intel/compiler/gen6_gs_visitor.cpp
intel/compiler/gfx6_gs_visitor.cpp \
intel/ds/intel_driver_ds.cc
SRC_C += intel/dev/gen_debug.c \
intel/dev/gen_device_info.c
SRC_C += intel/isl/isl.c \
SRC_C += gallium/drivers/iris/i915/iris_batch.c \
gallium/drivers/iris/i915/iris_bufmgr.c \
gallium/drivers/iris/i915/iris_kmd_backend.c \
gallium/drivers/iris/iris_batch.c \
gallium/drivers/iris/iris_binder.c \
gallium/drivers/iris/iris_blit.c \
gallium/drivers/iris/iris_border_color.c \
gallium/drivers/iris/iris_bufmgr.c \
gallium/drivers/iris/iris_clear.c \
gallium/drivers/iris/iris_context.c \
gallium/drivers/iris/iris_disk_cache.c \
gallium/drivers/iris/iris_draw.c \
gallium/drivers/iris/iris_fence.c \
gallium/drivers/iris/iris_fine_fence.c \
gallium/drivers/iris/iris_formats.c \
gallium/drivers/iris/iris_kmd_backend.c \
gallium/drivers/iris/iris_measure.c \
gallium/drivers/iris/iris_monitor.c \
gallium/drivers/iris/iris_perf.c \
gallium/drivers/iris/iris_performance_query.c \
gallium/drivers/iris/iris_pipe_control.c \
gallium/drivers/iris/iris_program.c \
gallium/drivers/iris/iris_program_cache.c \
gallium/drivers/iris/iris_resolve.c \
gallium/drivers/iris/iris_resource.c \
gallium/drivers/iris/iris_screen.c \
gallium/drivers/iris/iris_utrace.c \
intel/blorp/blorp.c \
intel/blorp/blorp_blit.c \
intel/blorp/blorp_clear.c \
intel/common/i915/intel_engine.c \
intel/common/i915/intel_gem.c \
intel/common/intel_aux_map.c \
intel/common/intel_batch_decoder.c \
intel/common/intel_decoder.c \
intel/common/intel_disasm.c \
intel/common/intel_engine.c \
intel/common/intel_gem.c \
intel/common/intel_l3_config.c \
intel/common/intel_measure.c \
intel/common/intel_mem.c \
intel/common/intel_sample_positions.c \
intel/common/intel_urb_config.c \
intel/common/intel_uuid.c \
intel/common/xe/intel_device_query.c \
intel/common/xe/intel_engine.c \
intel/common/xe/intel_gem.c \
intel/compiler/brw_clip_line.c \
intel/compiler/brw_clip_point.c \
intel/compiler/brw_clip_tri.c \
intel/compiler/brw_clip_unfilled.c \
intel/compiler/brw_clip_util.c \
intel/compiler/brw_compile_clip.c \
intel/compiler/brw_compile_ff_gs.c \
intel/compiler/brw_compile_sf.c \
intel/compiler/brw_compiler.c \
intel/compiler/brw_debug_recompile.c \
intel/compiler/brw_disasm.c \
intel/compiler/brw_disasm_info.c \
intel/compiler/brw_eu.c \
intel/compiler/brw_eu_compact.c \
intel/compiler/brw_eu_emit.c \
intel/compiler/brw_eu_util.c \
intel/compiler/brw_eu_validate.c \
intel/compiler/brw_interpolation_map.c \
intel/compiler/brw_nir.c \
intel/compiler/brw_nir_analyze_boolean_resolves.c \
intel/compiler/brw_nir_analyze_ubo_ranges.c \
intel/compiler/brw_nir_attribute_workarounds.c \
intel/compiler/brw_nir_blockify_uniform_loads.c \
intel/compiler/brw_nir_clamp_image_1d_2d_array_sizes.c \
intel/compiler/brw_nir_clamp_per_vertex_loads.c \
intel/compiler/brw_nir_lower_alpha_to_coverage.c \
intel/compiler/brw_nir_lower_conversions.c \
intel/compiler/brw_nir_lower_cooperative_matrix.c \
intel/compiler/brw_nir_lower_cs_intrinsics.c \
intel/compiler/brw_nir_lower_intersection_shader.c \
intel/compiler/brw_nir_lower_non_uniform_barycentric_at_sample.c \
intel/compiler/brw_nir_lower_non_uniform_resource_intel.c \
intel/compiler/brw_nir_lower_ray_queries.c \
intel/compiler/brw_nir_lower_rt_intrinsics.c \
intel/compiler/brw_nir_lower_shader_calls.c \
intel/compiler/brw_nir_lower_shading_rate_output.c \
intel/compiler/brw_nir_lower_sparse.c \
intel/compiler/brw_nir_lower_storage_image.c \
intel/compiler/brw_nir_opt_peephole_ffma.c \
intel/compiler/brw_nir_opt_peephole_imul32x16.c \
intel/compiler/brw_nir_rt.c \
intel/compiler/brw_nir_tcs_workarounds.c \
intel/compiler/brw_packed_float.c \
intel/compiler/brw_reg_type.c \
intel/compiler/brw_vue_map.c \
intel/dev/i915/intel_device_info.c \
intel/dev/intel_debug.c \
intel/dev/intel_device_info.c \
intel/dev/intel_hwconfig.c \
intel/dev/intel_kmd.c \
intel/dev/xe/intel_device_info.c \
intel/isl/isl.c \
intel/isl/isl_aux_info.c \
intel/isl/isl_gen7.c \
intel/isl/isl_gen8.c \
intel/isl/isl_gen9.c \
intel/isl/isl_gen12.c \
intel/isl/isl_drm.c \
intel/isl/isl_format.c \
intel/isl/isl_format_layout.c \
intel/isl/isl_gfx12.c \
intel/isl/isl_gfx4.c \
intel/isl/isl_gfx6.c \
intel/isl/isl_gfx7.c \
intel/isl/isl_gfx8.c \
intel/isl/isl_gfx9.c \
intel/isl/isl_query.c \
intel/isl/isl_storage_image.c \
intel/isl/isl_tiled_memcpy.c \
intel/isl/isl_tiled_memcpy_normal.c \
intel/isl/isl_tiled_memcpy_sse41.c
intel/isl/isl_tiled_memcpy_sse41.c \
intel/perf/intel_perf.c \
intel/perf/intel_perf_mdapi.c \
intel/perf/intel_perf_query.c \
SRC_C += $(addprefix mesa/swrast/, $(notdir $(wildcard $(MESA_SRC_DIR)/src/mesa/swrast/*.c)))
SRC_C += $(addprefix mesa/tnl/, $(notdir $(wildcard $(MESA_SRC_DIR)/src/mesa/tnl/*.c)))
SRC_C += mesa/main/texformat.c
#
# generated
#
SRC_C += intel/dev/intel_wa.c \
intel/ds/intel_tracepoints.c \
intel/isl/isl_format_layout.c \
intel/perf/intel_perf_metrics.c \
vpath %.c $(MESA_GEN_DIR)/src
vpath %.c $(MESA_SRC_DIR)/src
vpath %.cc $(MESA_SRC_DIR)/src
vpath %.cpp $(MESA_SRC_DIR)/src

View File

@ -2,6 +2,6 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=110
CC_OPT += -DGFX_VERx10=110
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -2,6 +2,6 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=120
CC_OPT += -DGFX_VERx10=120
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -2,6 +2,6 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=125
CC_OPT += -DGFX_VERx10=125
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -0,0 +1,7 @@
LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGFX_VERx10=200
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -2,6 +2,6 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=80
CC_OPT += -DGFX_VERx10=80
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -2,6 +2,6 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=90
CC_OPT += -DGFX_VERx10=90
include $(REP_DIR)/lib/mk/iris_gen.inc

View File

@ -2,5 +2,5 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=110
CC_OPT += -DGFX_VERx10=110
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -2,5 +2,5 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=120
CC_OPT += -DGFX_VERx10=120
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -2,5 +2,5 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=125
CC_OPT += -DGFX_VERx10=125
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -0,0 +1,6 @@
LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGFX_VERx10=200
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -2,5 +2,5 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=80
CC_OPT += -DGFX_VERx10=80
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -2,5 +2,5 @@ LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
CC_OPT += -DGEN_VERSIONx10=90
CC_OPT += -DGFX_VERx10=90
include $(REP_DIR)/lib/mk/isl_gen.inc

View File

@ -1,12 +1,12 @@
SHARED_LIB = yes
LIBS = libc egl
LIBS = libc egl libdrm
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = platform_iris.c
SRC_CC = drm_init.cc
CC_OPT += -DHAVE_GENODE_PLATFORM
CC_OPT += -DHAVE_GENODE_PLATFORM -DHAVE_LIBDRM
INC_DIR += $(MESA_SRC_DIR)/src/egl/drivers/dri2 \
$(MESA_SRC_DIR)/src/egl/main \

View File

@ -121,5 +121,5 @@ eglWaitGL T
eglWaitNative T
eglWaitSync T
genode_blit T
image_lookup_extension D 24
image_lookup_extension D 40
use_invalidate D 16

View File

@ -1 +1 @@
ef717b035d6a41d9921589756bbc30f07f0bf515
1fe844251b05c1622f35383317034ec01bac81c2

View File

@ -1,5 +1,5 @@
LICENSE := GPLv2
VERSION := 21.0.0
VERSION := 24.0.1
DOWNLOADS := mesa.archive
#
@ -7,24 +7,23 @@ DOWNLOADS := mesa.archive
#
URL_BASE := https://archive.mesa3d.org
URL(mesa) := $(URL_BASE)/mesa-$(VERSION).tar.xz
SHA(mesa) := e6204e98e6a8d77cf9dc5d34f99dd8e3ef7144f3601c808ca0dd26ba522e0d84
SHA(mesa) := f387192b08c471c545590dd12230a2a343244804b5fe866fec6aea02eab57613
DIR(mesa) := src/lib/mesa
TAR_OPT(mesa) := --strip-components=1 --files-from $(REP_DIR)/src/lib/mesa/files.list
HASH_INPUT += $(REP_DIR)/src/lib/mesa/files.list
PATCHES := src/lib/mesa/patches/bitset_redefined.patch \
PATCHES := src/lib/mesa/patches/dri2.patch \
src/lib/mesa/patches/etnaviv.patch \
src/lib/mesa/patches/iris.patch \
src/lib/mesa/patches/iris_bufmgr_fd.patch \
src/lib/mesa/patches/iris_bufmgr_unmap.patch \
src/lib/mesa/patches/iris_disable_compute.patch \
src/lib/mesa/patches/iris_binder_memory.patch \
src/lib/mesa/patches/lseek.patch \
src/lib/mesa/patches/intel_gen.patch \
src/lib/mesa/patches/iris_bufmgr.patch \
src/lib/mesa/patches/iris_utrace.patch \
src/lib/mesa/patches/lima.patch \
src/lib/mesa/patches/loader_fds.patch \
src/lib/mesa/patches/mesa.patch \
src/lib/mesa/patches/os_dupfd.patch \
src/lib/mesa/patches/os_mmap.patch \
src/lib/mesa/patches/softpipe_cache.patch \
src/lib/mesa/patches/lima.patch \
src/lib/mesa/patches/sync_wait.patch
PATCH_OPT := -p1
@ -32,8 +31,8 @@ PATCH_OPT := -p1
#
# Generated Mesa sources
#
URL(generated) = https://github.com/cnuke/mesa_generated.git
REV(generated) = c3954da3f66d6cb961421f03c09d589faade1784
URL(generated) = https://github.com/ssumpf/mesa_generated.git
REV(generated) = 2b684dc19480b4620fd57e98dc2993f540872a31
DIR(generated) = generated
#
@ -57,7 +56,14 @@ GEN_TARGET = generated
#
# Generate files
#
generated_files = $(GEN_TARGET)/src/compiler/glsl/float64_glsl.h \
generated_files = $(GEN_TARGET)/src/compiler/builtin_types.c \
$(GEN_TARGET)/src/compiler/builtin_types.h \
$(GEN_TARGET)/src/compiler/glsl/astc_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/bc1_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/bc4_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/cross_platform_settings_piece_all.h \
$(GEN_TARGET)/src/compiler/glsl/etc2_rgba_stitch_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/float64_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/glcpp/glcpp-lex.c \
$(GEN_TARGET)/src/compiler/glsl/glcpp/glcpp-parse.c \
$(GEN_TARGET)/src/compiler/glsl/glsl_lexer.cpp \
@ -78,8 +84,30 @@ generated_files = $(GEN_TARGET)/src/compiler/glsl/float64_glsl.h \
$(GEN_TARGET)/src/compiler/spirv/vtn_gather_types.c \
$(GEN_TARGET)/src/compiler/spirv/vtn_generator_ids.h \
$(GEN_TARGET)/src/gallium/auxiliary/indices/u_indices_gen.c \
$(GEN_TARGET)/src/gallium/auxiliary/tr_util.c \
$(GEN_TARGET)/src/gallium/auxiliary/u_tracepoints.h \
$(GEN_TARGET)/src/gallium/drivers/lima/lima_nir_algebraic.c \
$(GEN_TARGET)/src/git_sha1.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec.c \
$(GEN_TARGET)/src/intel/dev/intel_wa.c \
$(GEN_TARGET)/src/intel/ds/intel_tracepoints.c \
$(GEN_TARGET)/src/intel/genxml/gen8_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen9_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen11_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen12_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen125_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen125_rt_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen20_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen20_rt_pack.h \
$(GEN_TARGET)/src/intel/genxml/genX_bits.h \
$(GEN_TARGET)/src/intel/genxml/genX_xml.h \
$(GEN_TARGET)/src/intel/isl/isl_format_layout.c \
$(GEN_TARGET)/src/intel/perf/intel_perf_metrics.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_beginend_init.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec_decl.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec_init.c \
$(GEN_TARGET)/src/mapi/glapi/gen/api_hw_select_init.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_save.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_save_init.h \
$(GEN_TARGET)/src/mapi/glapi/gen/enums.c \
$(GEN_TARGET)/src/mapi/glapi/gen/glapi_mapi_tmp.h \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated0.c \
@ -90,30 +118,20 @@ generated_files = $(GEN_TARGET)/src/compiler/glsl/float64_glsl.h \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated5.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated6.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated7.c \
$(GEN_TARGET)/src/mapi/glapi/gen/unmarshal_table.c \
$(GEN_TARGET)/src/mapi/shared-glapi/glapi_mapi_tmp.h \
$(GEN_TARGET)/src/mesa/format_fallback.c \
$(GEN_TARGET)/src/mesa/format_info.h \
$(GEN_TARGET)/src/mesa/format_pack.c \
$(GEN_TARGET)/src/mesa/format_unpack.c \
$(GEN_TARGET)/src/mesa/get_hash.h \
$(GEN_TARGET)/src/mesa/main/dispatch.h \
$(GEN_TARGET)/src/mesa/main/marshal_generated.h \
$(GEN_TARGET)/src/mesa/main/remap_helper.h \
$(GEN_TARGET)/src/mesa/program/lex.yy.c \
$(GEN_TARGET)/src/mesa/program/program_parse.tab.c \
$(GEN_TARGET)/src/util/driconf_static.h \
$(GEN_TARGET)/src/util/format_srgb.c \
$(GEN_TARGET)/src/util/format/u_format_pack.h \
$(GEN_TARGET)/src/util/format/u_format_table.c \
$(GEN_TARGET)/src/intel/genxml/gen8_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen9_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen11_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen12_pack.h \
$(GEN_TARGET)/src/intel/genxml/gen125_pack.h \
$(GEN_TARGET)/src/intel/genxml/genX_bits.h \
$(GEN_TARGET)/src/intel/genxml/genX_xml.h \
$(GEN_TARGET)/src/intel/isl/isl_format_layout.c \
$(GEN_TARGET)/src/intel/perf/gen_perf_metrics.h \
$(GEN_TARGET)/src/gallium/drivers/lima/lima_nir_algebraic.c
#
# Print message and create directory
@ -133,10 +151,26 @@ CMD = ${CMD($(notdir $@))}
#
# Generated creation rules
#
#
GL_ES_API = $(SRC)/src/mapi/glapi/gen/gl_and_es_API.xml
CMD(astc_glsl.h) = astc_decoder.glsl $@ -n astc_source
CMD(float64_glsl.h) = float64.glsl $@ -n float64_source
CMD(bc1_glsl.h) = bc1.glsl $@ -n bc1_source
CMD(bc4_glsl.h) = bc4.glsl $@ -n bc4_source
CMD(etc2_rgba_stitch_glsl.h) = etc2_rgba_stitch.glsl $@ -n etc2_rgba_stitch_source
CMD(cross_platform_settings_piece_all.h) = CrossPlatformSettings_piece_all.glsl \
$@ -n cross_platform_settings_piece_all_header
$(GEN_TARGET)/src/compiler/glsl/astc_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/bc1_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/bc4_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/cross_platform_settings_piece_all.h \
$(GEN_TARGET)/src/compiler/glsl/etc2_rgba_stitch_glsl.h \
$(GEN_TARGET)/src/compiler/glsl/float64_glsl.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/util/xxd.py \
$(SRC)/src/compiler/glsl/float64.glsl $@ -n float64_source
$(SRC)/src/compiler/glsl/$(CMD)
CMD(nir_opcodes.h) = nir_opcodes_h.py
CMD(nir_opcodes.c) = nir_opcodes_c.py
@ -169,7 +203,7 @@ $(GEN_TARGET)/src/mapi/shared-glapi/glapi_mapi_tmp.h \
$(GEN_TARGET)/src/mapi/glapi/gen/glapi_mapi_tmp.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mapi/mapi_abi.py --printer ${CMD($@)} \
$(SRC)/src/mapi/glapi/gen/gl_and_es_API.xml > $@
$(GL_ES_API) > $@
CMD(ir_expression_operation.h) = enum
CMD(ir_expression_operation_constant.h) = constant
@ -192,23 +226,26 @@ $(GEN_TARGET)/src/compiler/spirv/spirv_info.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/compiler/spirv/$(CMD) $@
$(GEN_TARGET)/src/compiler/builtin_types.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/compiler/builtin_types_h.py $@
$(GEN_TARGET)/src/compiler/builtin_types.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/compiler/builtin_types_c.py $@
CMD(dispatch.h) = gl_table.py -m remap_table
CMD(marshal_generated.h) = gl_marshal_h.py
CMD(remap_helper.h) = remap_helper.py
CMD(api_exec.c) = gl_genexec.py
CMD(marshal_generated0.c) = gl_marshal.py -i 0 -n 8
CMD(marshal_generated1.c) = gl_marshal.py -i 1 -n 8
CMD(marshal_generated2.c) = gl_marshal.py -i 2 -n 8
CMD(marshal_generated3.c) = gl_marshal.py -i 3 -n 8
CMD(marshal_generated4.c) = gl_marshal.py -i 4 -n 8
CMD(marshal_generated5.c) = gl_marshal.py -i 5 -n 8
CMD(marshal_generated6.c) = gl_marshal.py -i 6 -n 8
CMD(marshal_generated7.c) = gl_marshal.py -i 7 -n 8
CMD(marshal_generated0.c) = gl_marshal.py $(GL_ES_API) 0 8
CMD(marshal_generated1.c) = gl_marshal.py $(GL_ES_API) 1 8
CMD(marshal_generated2.c) = gl_marshal.py $(GL_ES_API) 2 8
CMD(marshal_generated3.c) = gl_marshal.py $(GL_ES_API) 3 8
CMD(marshal_generated4.c) = gl_marshal.py $(GL_ES_API) 4 8
CMD(marshal_generated5.c) = gl_marshal.py $(GL_ES_API) 5 8
CMD(marshal_generated6.c) = gl_marshal.py $(GL_ES_API) 6 8
CMD(marshal_generated7.c) = gl_marshal.py $(GL_ES_API) 7 8
$(GEN_TARGET)/src/mesa/main/dispatch.h \
$(GEN_TARGET)/src/mesa/main/marshal_generated.h \
$(GEN_TARGET)/src/mesa/main/remap_helper.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated0.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated1.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated2.c \
@ -217,14 +254,42 @@ $(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated4.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated5.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated6.c \
$(GEN_TARGET)/src/mapi/glapi/gen/marshal_generated7.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mapi/glapi/gen/$(CMD) > $@
$(GEN_TARGET)/src/mapi/glapi/gen/unmarshal_table.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mapi/glapi/gen/gl_unmarshal_table.py \
$(GL_ES_API) > $@
$(GEN_TARGET)/src/mesa/main/dispatch.h \
$(GEN_TARGET)/src/mesa/main/marshal_generated.h \
$(GEN_TARGET)/src/mesa/main/remap_helper.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mapi/glapi/gen/$(CMD) \
-f $(SRC)/src/mapi/glapi/gen/gl_and_es_API.xml > $@
-f $(GL_ES_API) > $@
$(GEN_TARGET)/src/mesa/get_hash.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mesa/main/get_hash_generator.py \
-f $(SRC)/src/mapi/glapi/gen/gl_and_es_API.xml > $@
-f $(GL_ES_API) > $@
CMD(api_exec_decl.h) = api_exec_decl_h.py
CMD(api_exec_init.c) = api_exec_init.py
CMD(api_hw_select_init.h) = api_hw_select_init_h.py
CMD(api_save.h) = api_save_h.py
CMD(api_save_init.h) = api_save_init_h.py
CMD(api_beginend_init.h) = api_beginend_init_h.py
$(GEN_TARGET)/src/mapi/glapi/gen/api_beginend_init.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec_decl.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_exec_init.c \
$(GEN_TARGET)/src/mapi/glapi/gen/api_hw_select_init.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_save.h \
$(GEN_TARGET)/src/mapi/glapi/gen/api_save_init.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mapi/glapi/gen/$(CMD) \
-f $(SRC)/src/mapi/glapi/gen/gl_and_es_API.xml > $@
$(GEN_TARGET)/src/mapi/glapi/gen/enums.c:
$(MSG_DIR)
@ -234,19 +299,29 @@ $(GEN_TARGET)/src/mapi/glapi/gen/enums.c:
$(GEN_TARGET)/src/gallium/auxiliary/indices/u_indices_gen.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) \
$(SRC)/src/gallium/auxiliary/indices/u_indices_gen.py > $@
$(SRC)/src/gallium/auxiliary/indices/u_indices_gen.py $@
$(GEN_TARGET)/src/gallium/auxiliary/tr_util.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/gallium/auxiliary/driver_trace/enums2names.py \
$(SRC)/src/gallium/include/pipe/p_defines.h \
$(SRC)/src/gallium/include/pipe/p_video_enums.h \
$(SRC)/src/util/blend.h \
-C $@ -H $(GEN_TARGET)/src/gallium/auxiliary/tr_util.h -I tr_util.h
$(GEN_TARGET)/src/gallium/auxiliary/u_tracepoints.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/gallium/auxiliary/util/u_tracepoints.py \
-p $(SRC)/src/util/perf/ \
-H $(GEN_TARGET)/src/gallium/auxiliary/u_tracepoints.h
$(GEN_TARGET)/src/git_sha1.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/bin/git_sha1_gen.py --output $@
CMD(format_info.h) = format_info.py
CMD(format_pack.c) = format_pack.py
CMD(format_unpack.c) = format_unpack.py
$(GEN_TARGET)/src/mesa/format_info.h \
$(GEN_TARGET)/src/mesa/format_pack.c \
$(GEN_TARGET)/src/mesa/format_unpack.c:
$(GEN_TARGET)/src/mesa/format_info.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/mesa/main/$(CMD) $(SRC)/src/mesa/main/formats.csv \
> $@
@ -267,6 +342,11 @@ $(GEN_TARGET)/src/util/format_srgb.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/util/format_srgb.py > $@
$(GEN_TARGET)/src/util/driconf_static.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/util/driconf_static.py \
$(SRC)/src/util/00-mesa-defaults.conf $@
$(GEN_TARGET)/src/compiler/glsl/glsl_parser.cpp:
$(MSG_DIR)
$(VERBOSE)bison -Wno-deprecated -o $@ -p "_mesa_glsl_" \
@ -282,25 +362,40 @@ $(GEN_TARGET)/src/mesa/program/program_parse.tab.c:
$(VERBOSE)bison -Wno-deprecated -o $@ \
--defines=$(@D)/program_parse.tab.h $(SRC)/src/mesa/program/program_parse.y
PACK_OPT = --engines=render,blitter,video
$(GEN_TARGET)/src/intel/genxml/gen8_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen8.xml >$@
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen8.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen9_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen9.xml >$@
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen9.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen11_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen11.xml >$@
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen11.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen12_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen12.xml >$@
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen12.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen125_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen125.xml >$@
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen125.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen125_rt_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen125_rt.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen20_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen20.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/gen20_rt_pack.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/genxml/gen_pack_header.py $(SRC)/src/intel/genxml/gen20_rt.xml $(PACK_OPT) >$@
$(GEN_TARGET)/src/intel/genxml/genX_bits.h:
$(MSG_DIR)
@ -310,7 +405,12 @@ $(GEN_TARGET)/src/intel/genxml/genX_bits.h:
$(SRC)/src/intel/genxml/gen11.xml \
$(SRC)/src/intel/genxml/gen12.xml \
$(SRC)/src/intel/genxml/gen125.xml \
-o $@
$(SRC)/src/intel/genxml/gen125_rt.xml \
$(SRC)/src/intel/genxml/gen20.xml \
$(SRC)/src/intel/genxml/gen20_rt.xml \
-o $@ \
--include-symbols 'MI_BATCH_BUFFER_START::Batch Buffer Start Address,MI_REPORT_PERF_COUNT::Memory Address,MI_STORE_DATA_IMM::Address,MI_STORE_DATA_IMM::Immediate Data,MI_STORE_REGISTER_MEM::Memory Address,3DSTATE_DEPTH_BUFFER::Surface Base Address,3DSTATE_DEPTH_BUFFER::Surface Pitch,3DSTATE_STENCIL_BUFFER::Surface Base Address,3DSTATE_STENCIL_BUFFER::Surface Pitch,3DSTATE_HIER_DEPTH_BUFFER::Surface Base Address,3DSTATE_HIER_DEPTH_BUFFER::Surface Pitch,3DSTATE_CLEAR_PARAMS,3DSTATE_SO_BUFFER::Surface Base Address,3DSTATE_SO_BUFFER::Stream Offset,3DSTATE_CPSIZE_CONTROL_BUFFER::Surface Base Address,3DSTATE_CPSIZE_CONTROL_BUFFER::Surface Pitch,RENDER_SURFACE_STATE::Surface Base Address,RENDER_SURFACE_STATE::Surface Pitch,RENDER_SURFACE_STATE::Auxiliary Surface Base Address,RENDER_SURFACE_STATE::Auxiliary Surface Pitch,RENDER_SURFACE_STATE::Clear Value Address,RENDER_SURFACE_STATE::Red Clear Color,RENDER_SURFACE_STATE::Green Clear Color,RENDER_SURFACE_STATE::Blue Clear Color,RENDER_SURFACE_STATE::Alpha Clear Color,RENDER_SURFACE_STATE::Width,RENDER_SURFACE_STATE::Height,RENDER_SURFACE_STATE::Depth,RENDER_SURFACE_STATE::Surface Type,RENDER_SURFACE_STATE::Render Target View Extent,CLEAR_COLOR,VERTEX_BUFFER_STATE::Buffer Starting Address,CPS_STATE,RT_DISPATCH_GLOBALS::Hit Group Table,RT_DISPATCH_GLOBALS::Miss Group Table,RT_DISPATCH_GLOBALS::Callable Group Table,RT_DISPATCH_GLOBALS::Launch Width,RT_DISPATCH_GLOBALS::Launch Height,RT_DISPATCH_GLOBALS::Launch Depth'
$(GEN_TARGET)/src/intel/genxml/genX_xml.h:
$(MSG_DIR)
@ -320,6 +420,7 @@ $(GEN_TARGET)/src/intel/genxml/genX_xml.h:
$(SRC)/src/intel/genxml/gen11.xml \
$(SRC)/src/intel/genxml/gen12.xml \
$(SRC)/src/intel/genxml/gen125.xml \
$(SRC)/src/intel/genxml/gen20.xml \
> $@
$(GEN_TARGET)/src/intel/isl/isl_format_layout.c:
@ -327,26 +428,51 @@ $(GEN_TARGET)/src/intel/isl/isl_format_layout.c:
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/isl/gen_format_layout.py \
--csv $(call _src,$(@D))/isl_format_layout.csv --out $@
$(GEN_TARGET)/src/intel/perf/gen_perf_metrics.h:
$(GEN_TARGET)/src/intel/perf/intel_perf_metrics.h:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/perf/gen_perf.py \
--code generated/src/intel/perf/gen_perf_metrics.c \
--header generated/src/intel/perf/gen_perf_metrics.h \
$(SRC)/src/intel/perf/oa-bdw.xml \
$(SRC)/src/intel/perf/oa-bxt.xml \
$(SRC)/src/intel/perf/oa-cflgt2.xml \
$(SRC)/src/intel/perf/oa-cflgt3.xml \
$(SRC)/src/intel/perf/oa-chv.xml \
$(SRC)/src/intel/perf/oa-glk.xml \
--code generated/src/intel/perf/intel_perf_metrics.c \
--header generated/src/intel/perf/intel_perf_metrics.h \
$(SRC)/src/intel/perf/oa-hsw.xml \
$(SRC)/src/intel/perf/oa-icl.xml \
$(SRC)/src/intel/perf/oa-kblgt2.xml \
$(SRC)/src/intel/perf/oa-kblgt3.xml \
$(SRC)/src/intel/perf/oa-lkf.xml \
$(SRC)/src/intel/perf/oa-bdw.xml \
$(SRC)/src/intel/perf/oa-chv.xml \
$(SRC)/src/intel/perf/oa-sklgt2.xml \
$(SRC)/src/intel/perf/oa-sklgt3.xml \
$(SRC)/src/intel/perf/oa-sklgt4.xml \
$(SRC)/src/intel/perf/oa-tgl.xml
$(SRC)/src/intel/perf/oa-kblgt2.xml \
$(SRC)/src/intel/perf/oa-kblgt3.xml \
$(SRC)/src/intel/perf/oa-cflgt2.xml \
$(SRC)/src/intel/perf/oa-cflgt3.xml \
$(SRC)/src/intel/perf/oa-bxt.xml \
$(SRC)/src/intel/perf/oa-glk.xml \
$(SRC)/src/intel/perf/oa-icl.xml \
$(SRC)/src/intel/perf/oa-ehl.xml \
$(SRC)/src/intel/perf/oa-tglgt1.xml \
$(SRC)/src/intel/perf/oa-tglgt2.xml \
$(SRC)/src/intel/perf/oa-rkl.xml \
$(SRC)/src/intel/perf/oa-dg1.xml \
$(SRC)/src/intel/perf/oa-adl.xml \
$(SRC)/src/intel/perf/oa-acmgt1.xml \
$(SRC)/src/intel/perf/oa-acmgt2.xml \
$(SRC)/src/intel/perf/oa-acmgt3.xml \
$(SRC)/src/intel/perf/oa-mtlgt2.xml \
$(SRC)/src/intel/perf/oa-mtlgt3.xml
$(GEN_TARGET)/src/intel/dev/intel_wa.c:
$(MSG_DIR)
$(VERBOSE)$(PYTHON) $(SRC)/src/intel/dev/gen_wa_helpers.py \
$(SRC)/src/intel/dev/mesa_defs.json \
$(GEN_TARGET)/src/intel/dev/intel_wa.h \
$@
$(GEN_TARGET)/src/intel/ds/intel_tracepoints.c:
$(MSG_DIR)
$(VERBOSE) $(PYTHON) $(SRC)/src/intel/ds/intel_tracepoints.py \
-p $(SRC)/src/util/perf/ \
--utrace-hdr $(GEN_TARGET)/src/intel/ds/intel_tracepoints.h \
--perfetto-hdr $(GEN_TARGET)/src/intel/ds/intel_tracepoints_perfetto.h \
--utrace-src $@
$(GEN_TARGET)/src/gallium/drivers/lima/lima_nir_algebraic.c:
$(MSG_DIR)
@ -371,7 +497,7 @@ $(call check_tool,flex)
#
# Determine python version to use
#
PYTHON := $(notdir $(lastword $(shell which python3 $(addprefix python3.,5 6 7 8))))
PYTHON := $(notdir $(lastword $(shell which python3 $(addprefix python3.,8 9 10 11))))
ifeq ($(PYTHON),)
default: python_not_installed

View File

@ -21,11 +21,13 @@ MIRROR_FROM_REP_DIR := \
lib/mk/spec/x86/iris_gen110.mk \
lib/mk/spec/x86/iris_gen120.mk \
lib/mk/spec/x86/iris_gen125.mk \
lib/mk/spec/x86/iris_gen200.mk \
lib/mk/spec/x86/iris_gen80.mk \
lib/mk/spec/x86/iris_gen90.mk \
lib/mk/spec/x86/isl_gen110.mk \
lib/mk/spec/x86/isl_gen120.mk \
lib/mk/spec/x86/isl_gen125.mk \
lib/mk/spec/x86/isl_gen200.mk \
lib/mk/spec/x86/isl_gen80.mk \
lib/mk/spec/x86/isl_gen90.mk \
lib/mk/spec/x86_64/mesa.mk \

View File

@ -2,6 +2,7 @@ base
blit
libdrm
expat
format
gpu_session
libc
os

View File

@ -15,6 +15,7 @@
* Mesa
*/
#include <egl_dri2.h>
#include <util/xmlconfig.h>
/*
* Libc
@ -76,13 +77,13 @@ _create_surface(_EGLDisplay *disp,
dri2_surf->base.GLColorspace);
if (dri2_dpy->dri2) {
dri2_surf->dri_drawable = (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
dri2_surf->dri_drawable = (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen_render_gpu, config,
dri2_surf);
/* create back buffer image */
unsigned flags = 0;
flags |= __DRI_IMAGE_USE_LINEAR;
flags |= (__DRI_IMAGE_USE_SHARE | __DRI_IMAGE_USE_BACKBUFFER);
dri2_surf->back_image = dri2_dpy->image->createImage(dri2_dpy->dri_screen,
dri2_surf->back_image = dri2_dpy->image->createImage(dri2_dpy->dri_screen_render_gpu,
dri2_surf->base.Width,
dri2_surf->base.Height,
__DRI_IMAGE_FORMAT_XRGB8888,
@ -91,7 +92,7 @@ _create_surface(_EGLDisplay *disp,
} else {
assert(dri2_dpy->swrast);
dri2_surf->dri_drawable =
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen,
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen_render_gpu,
config, dri2_surf);
}
@ -167,6 +168,12 @@ EGLBoolean dri2_initialize_genode(_EGLDisplay *disp)
return EGL_FALSE;
}
/*
* xmlconfig.c expects a valid 'execname' variable (see file). Since
* the fallback 'getprogname' returns NULL, inject something
*/
driInjectExecName("mesa_app");
typedef EGLBoolean (*genode_backend)(_EGLDisplay *);
genode_backend init = (genode_backend)dlsym(handle, "dri2_initialize_genode_backend");

View File

@ -14,7 +14,8 @@
* Mesa
*/
#include <egl_dri2.h>
#include <drivers/dri/common/utils.h>
#include <gallium/frontends/dri/dri_util.h>
/*
* Libc
*/
@ -183,6 +184,7 @@ static const __DRIextension *dri2_loader_extensions[] = {
&image_loader_extension.base,
&image_lookup_extension.base,
&background_callable_extension.base,
&use_invalidate.base,
NULL,
};
@ -202,7 +204,8 @@ static EGLBoolean dri2_initialize_genode_etnaviv(_EGLDisplay *disp)
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
dri2_dpy->fd = 42;
dri2_dpy->fd_render_gpu = 42;
dri2_dpy->fd_display_gpu = dri2_dpy->fd_render_gpu;
dri2_dpy->driver_name = strdup("etnaviv");
disp->DriverData = (void *)dri2_dpy;

File diff suppressed because it is too large Load Diff

View File

@ -15,8 +15,7 @@
* Mesa
*/
#include <egl_dri2.h>
#include <drivers/dri/common/utils.h>
#include <gallium/frontends/dri/dri_util.h>
/*
* Libc
*/
@ -196,6 +195,7 @@ static const __DRIextension *dri2_loader_extensions[] = {
&dri2_loader_extension.base,
&image_lookup_extension.base,
&background_callable_extension.base,
&use_invalidate.base,
NULL,
};
@ -213,8 +213,9 @@ EGLBoolean dri2_initialize_genode_backend(_EGLDisplay *disp)
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
dri2_dpy->fd = 43;
dri2_dpy->driver_name = strdup("iris");
dri2_dpy->fd_render_gpu = 43;
dri2_dpy->fd_display_gpu = dri2_dpy->fd_render_gpu;
dri2_dpy->driver_name = strdup("iris");
disp->DriverData = (void *)dri2_dpy;
dri2_dpy->vtbl = &dri2_genode_display_vtbl;

View File

@ -15,7 +15,8 @@
* Mesa
*/
#include <egl_dri2.h>
#include <drivers/dri/common/utils.h>
#include <gallium/frontends/dri/dri_util.h>
/*
* Libc
*/
@ -184,6 +185,7 @@ static const __DRIextension *dri2_loader_extensions[] = {
&image_loader_extension.base,
&image_lookup_extension.base,
&background_callable_extension.base,
&use_invalidate.base,
NULL,
};
@ -203,8 +205,9 @@ static EGLBoolean dri2_initialize_genode_lima(_EGLDisplay *disp)
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
dri2_dpy->fd = 44;
dri2_dpy->driver_name = strdup("lima");
dri2_dpy->fd_render_gpu = 44;
dri2_dpy->fd_display_gpu = dri2_dpy->fd_render_gpu;
dri2_dpy->driver_name = strdup("lima");
disp->DriverData = (void *)dri2_dpy;
if (!dri2_load_driver_dri3(disp))

View File

@ -1,4 +1,36 @@
/* Genode */
#include <base/log.h>
#include <format/snprintf.h>
#include <util/string.h>
/* libc */
#include <pthread.h>
/* Mesa */
#include <util/log.h>
extern "C" void pthread_set_name_np(pthread_t, const char *)
{ }
/* mesa/src/util/log.c */
extern "C" void
mesa_log(enum mesa_log_level level, const char *tag, const char *format, ...)
{
using namespace Genode;
va_list list;
va_start(list, format);
char buf[128] { };
Format::String_console(buf, sizeof(buf)).vprintf(format, list);
switch (level) {
case MESA_LOG_ERROR: log("Mesa error: ", Cstring(buf)); break;
case MESA_LOG_WARN : log("Mesa warning: ", Cstring(buf)); break;
case MESA_LOG_INFO : log("Mesa info: ", Cstring(buf)); break;
case MESA_LOG_DEBUG: log("Mesa debug: ", Cstring(buf)); break;
}
va_end(list);
}

View File

@ -1,93 +0,0 @@
--- a/src/lib/mesa/src/intel/compiler/brw_nir_lower_shader_calls.c
+++ b/src/lib/mesa/src/intel/compiler/brw_nir_lower_shader_calls.c
@@ -151,15 +151,15 @@
intrin->intrinsic == nir_intrinsic_execute_callable;
}
-struct bitset {
+struct brw_bitset {
BITSET_WORD *set;
unsigned size;
};
-static struct bitset
+static struct brw_bitset
bitset_create(void *mem_ctx, unsigned size)
{
- return (struct bitset) {
+ return (struct brw_bitset) {
.set = rzalloc_array(mem_ctx, BITSET_WORD, BITSET_WORDS(size)),
.size = size,
};
@@ -168,7 +168,7 @@
static bool
src_is_in_bitset(nir_src *src, void *_set)
{
- struct bitset *set = _set;
+ struct brw_bitset *set = _set;
assert(src->is_ssa);
/* Any SSA values which were added after we generated liveness information
@@ -183,7 +183,7 @@
}
static void
-add_ssa_def_to_bitset(nir_ssa_def *def, struct bitset *set)
+add_ssa_def_to_bitset(nir_ssa_def *def, struct brw_bitset *set)
{
if (def->index >= set->size)
return;
@@ -192,7 +192,7 @@
}
static bool
-can_remat_instr(nir_instr *instr, struct bitset *remat)
+can_remat_instr(nir_instr *instr, struct brw_bitset *remat)
{
/* Set of all values which are trivially re-materializable and we shouldn't
* ever spill them. This includes:
@@ -270,7 +270,7 @@
}
static bool
-can_remat_ssa_def(nir_ssa_def *def, struct bitset *remat)
+can_remat_ssa_def(nir_ssa_def *def, struct brw_bitset *remat)
{
return can_remat_instr(def->parent_instr, remat);
}
@@ -362,7 +362,7 @@
const unsigned num_ssa_defs = impl->ssa_alloc;
const unsigned live_words = BITSET_WORDS(num_ssa_defs);
- struct bitset trivial_remat = bitset_create(mem_ctx, num_ssa_defs);
+ struct brw_bitset trivial_remat = bitset_create(mem_ctx, num_ssa_defs);
/* Array of all live SSA defs which are spill candidates */
nir_ssa_def **spill_defs =
@@ -434,7 +434,7 @@
/* Make a copy of trivial_remat that we'll update as we crawl through
* the live SSA defs and unspill them.
*/
- struct bitset remat = bitset_create(mem_ctx, num_ssa_defs);
+ struct brw_bitset remat = bitset_create(mem_ctx, num_ssa_defs);
memcpy(remat.set, trivial_remat.set, live_words * sizeof(BITSET_WORD));
/* Before the two builders are always separated by the call
@@ -926,7 +926,7 @@
struct exec_list *child_list,
bool child_list_contains_cursor,
nir_instr *resume_instr,
- struct bitset *remat)
+ struct brw_bitset *remat)
{
nir_shader *shader = impl->function->shader;
nir_cf_list cf_list;
@@ -1113,7 +1113,7 @@
/* Used to track which things may have been assumed to be re-materialized
* by the spilling pass and which we shouldn't delete.
*/
- struct bitset remat = bitset_create(mem_ctx, impl->ssa_alloc);
+ struct brw_bitset remat = bitset_create(mem_ctx, impl->ssa_alloc);
/* Create a nop instruction to use as a cursor as we extract and re-insert
* stuff into the CFG.

View File

@ -0,0 +1,17 @@
diff --git a/src/lib/mesa/src/gallium/frontends/dri/dri2.c b/src/lib/mesa/src/gallium/frontends/dri/dri2.c
index ad68f3b..fdd0936 100644
--- a/src/lib/mesa/src/gallium/frontends/dri/dri2.c
+++ b/src/lib/mesa/src/gallium/frontends/dri/dri2.c
@@ -650,7 +650,11 @@ dri2_allocate_textures(struct dri_context *ctx,
whandle.format = format;
whandle.modifier = DRM_FORMAT_MOD_INVALID;
if (screen->can_share_buffer)
- whandle.type = WINSYS_HANDLE_TYPE_SHARED;
+ /*
+ * Change from SHARED to FD because we abuse etna_screen_create
+ * to allocate the BO but the imx8q_gpu_drv is rendernode only.
+ */
+ whandle.type = WINSYS_HANDLE_TYPE_FD;
else
whandle.type = WINSYS_HANDLE_TYPE_KMS;
drawable->textures[statt] =

View File

@ -1,45 +1,21 @@
--- a/src/lib/mesa/src/gallium/frontends/dri/dri2.c
+++ b/src/lib/mesa/src/gallium/frontends/dri/dri2.c
@@ -550,7 +550,11 @@ dri2_allocate_textures(struct dri_context *ctx,
whandle.format = format;
whandle.modifier = DRM_FORMAT_MOD_INVALID;
if (screen->can_share_buffer)
- whandle.type = WINSYS_HANDLE_TYPE_SHARED;
+ /*
+ * Change from SHARED to FD because we abuse etna_screen_create
+ * to allocate the BO but the imx8q_gpu_drv is rendernode only.
+ */
+ whandle.type = WINSYS_HANDLE_TYPE_FD;
else
whandle.type = WINSYS_HANDLE_TYPE_KMS;
drawable->textures[statt] =
--- a/src/lib/mesa/src/loader/loader.c
+++ b/src/lib/mesa/src/loader/loader.c
@@ -467,6 +467,9 @@ out:
char *
loader_get_driver_for_fd(int fd)
{
+ if (fd == 42) {
+ return strdup("etnaviv");
+ }
char *driver;
* disable shader cache
diff --git a/src/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c b/src/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
index 7d43fe0..9622ac3 100644
--- a/src/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
+++ b/src/lib/mesa/src/gallium/drivers/etnaviv/etnaviv_disk_cache.c
@@ -37,6 +37,7 @@ etna_disk_cache_init(struct etna_compiler *compiler, const char *renderer)
if (DBG_ENABLED(ETNA_DBG_NOCACHE))
return;
/* Allow an environment variable to force choosing a different driver
--- a/src/lib/mesa/src/util/os_file.c
+++ b/src/lib/mesa/src/util/os_file.c
@@ -50,6 +50,12 @@ os_dupfd_cloexec(int fd)
int
os_dupfd_cloexec(int fd)
{
+ /*
+ * The fd is not allocate via the libc so dup will not work, just
+ * return the original fd.
+ */
+ return fd;
+
int minfd = 3;
int newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd);
+#ifdef ENABLE_SHADER_CACHE
const struct build_id_note *note =
build_id_find_nhdr_for_addr(etna_disk_cache_init);
assert(note && build_id_length(note) == 20); /* sha1 */
@@ -48,6 +49,7 @@ etna_disk_cache_init(struct etna_compiler *compiler, const char *renderer)
_mesa_sha1_format(timestamp, id_sha1);
--
2.20.1
compiler->disk_cache = disk_cache_create(renderer, timestamp, etna_mesa_debug);
+#endif
}
void

View File

@ -0,0 +1,25 @@
Genode only supports GEN8+, remove version below 8.
diff --git a/src/lib/mesa/src/intel/isl/isl_priv.h b/src/lib/mesa/src/intel/isl/isl_priv.h
index 0eb5426..1218e2b 100644
--- a/src/lib/mesa/src/intel/isl/isl_priv.h
+++ b/src/lib/mesa/src/intel/isl/isl_priv.h
@@ -55,18 +55,6 @@ typedef void (*isl_emit_cpb_control_s_func)(const struct isl_device *dev, void *
static inline isl_##func##_func \
isl_##func##_get_func(const struct isl_device *dev) { \
switch (ISL_GFX_VERX10(dev)) { \
- case 40: \
- return isl_gfx4_##func; \
- case 45: \
- /* G45 surface state is the same as gfx5 */ \
- case 50: \
- return isl_gfx5_##func; \
- case 60: \
- return isl_gfx6_##func; \
- case 70: \
- return isl_gfx7_##func; \
- case 75: \
- return isl_gfx75_##func; \
case 80: \
return isl_gfx8_##func; \
case 90: \

View File

@ -1,12 +0,0 @@
--- a/src/lib/mesa/src/loader/loader.c
--- b/src/lib/mesa/src/loader/loader.c
@@ -470,6 +470,9 @@
if (fd == 42) {
return "etnaviv";
}
+ if (fd == 43) {
+ return strdup("iris");
+ }
char *driver;
/* Allow an environment variable to force choosing a different driver

View File

@ -1,138 +0,0 @@
iris: handle IRIS_MEMZONE_BINDER with a real vma_heap like
the others
We're moving towards a path where all contexts share the same virtual
memory - because this will make implementing vm_bind much easier - ,
and to achieve that we need to rework the binder memzone. As it is,
different contexts will choose overlapping addresses. So in this patch
we adjust the Binder to be 1GB - per Ken's suggestion - and use a real
vma_heap for it. As a bonus the code gets simpler since it just reuses
the same pattern we already have for the other memzones.
Credits to Kenneth Granunke for helping me with this change.
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_binder.c b/src/gallium/drivers/iris/iris_binder.c
index 19ee29f..0c64ab5 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_binder.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_binder.c
@@ -36,7 +36,7 @@
* binding table entries are full 32-bit pointers.)
*
* To handle this, we split a 4GB region of VMA into two memory zones.
- * IRIS_MEMZONE_BINDER is a small region at the bottom able to hold a few
+ * IRIS_MEMZONE_BINDER is a 1GB region at the bottom able to hold a few
* binder BOs. IRIS_MEMZONE_SURFACE contains the rest of the 4GB, and is
* always at a higher address than the binders. This allows us to program
* Surface State Base Address to the binder BO's address, and offset the
@@ -71,23 +71,12 @@ binder_realloc(struct iris_context *ice)
struct iris_bufmgr *bufmgr = screen->bufmgr;
struct iris_binder *binder = &ice->state.binder;
- uint64_t next_address = IRIS_MEMZONE_BINDER_START;
-
if (binder->bo) {
- /* Place the new binder just after the old binder, unless we've hit the
- * end of the memory zone...then wrap around to the start again.
- */
- next_address = binder->bo->gtt_offset + IRIS_BINDER_SIZE;
- if (next_address >= IRIS_MEMZONE_SURFACE_START)
- next_address = IRIS_MEMZONE_BINDER_START;
-
- iris_bo_unreference(binder->bo);
+ iris_bo_unreference(binder->bo);
}
-
binder->bo =
iris_bo_alloc(bufmgr, "binder", IRIS_BINDER_SIZE, IRIS_MEMZONE_BINDER);
- binder->bo->gtt_offset = next_address;
binder->map = iris_bo_map(NULL, binder->bo, MAP_WRITE);
binder->insert_point = INIT_INSERT_POINT;
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index 1849e33..a89a494 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
@@ -302,10 +302,6 @@ vma_alloc(struct iris_bufmgr *bufmgr,
if (memzone == IRIS_MEMZONE_BORDER_COLOR_POOL)
return IRIS_BORDER_COLOR_POOL_ADDRESS;
- /* The binder handles its own allocations. Return non-zero here. */
- if (memzone == IRIS_MEMZONE_BINDER)
- return IRIS_MEMZONE_BINDER_START;
-
uint64_t addr =
util_vma_heap_alloc(&bufmgr->vma_allocator[memzone], size, alignment);
@@ -331,10 +327,6 @@ vma_free(struct iris_bufmgr *bufmgr,
enum iris_memory_zone memzone = iris_memzone_for_address(address);
- /* The binder handles its own allocations. */
- if (memzone == IRIS_MEMZONE_BINDER)
- return;
-
assert(memzone < ARRAY_SIZE(bufmgr->vma_allocator));
util_vma_heap_free(&bufmgr->vma_allocator[memzone], address, size);
@@ -430,9 +422,10 @@ alloc_bo_from_cache(struct iris_bufmgr *bufmgr,
* end up in the cache). Therefore its old aux-buffer range can be
* removed from the aux-map.
*/
- if (bo->bufmgr->aux_map_ctx)
+ if (bo->bufmgr->aux_map_ctx) {
gen_aux_map_unmap_range(bo->bufmgr->aux_map_ctx, bo->gtt_offset,
bo->size);
+ }
bo->aux_map_address = 0;
}
@@ -1335,10 +1328,8 @@ iris_bufmgr_destroy(struct iris_bufmgr *bufmgr)
_mesa_hash_table_destroy(bufmgr->name_table, NULL);
_mesa_hash_table_destroy(bufmgr->handle_table, NULL);
- for (int z = 0; z < IRIS_MEMZONE_COUNT; z++) {
- if (z != IRIS_MEMZONE_BINDER)
+ for (int z = 0; z < IRIS_MEMZONE_COUNT; z++)
util_vma_heap_finish(&bufmgr->vma_allocator[z]);
- }
close(bufmgr->fd);
@@ -1859,15 +1850,18 @@ iris_bufmgr_create(struct gen_device_info *devinfo, int fd, bool bo_reuse)
STATIC_ASSERT(IRIS_MEMZONE_SHADER_START == 0ull);
const uint64_t _4GB = 1ull << 32;
const uint64_t _2GB = 1ul << 31;
+ const uint64_t _1GB = 1ul << 30;
/* The STATE_BASE_ADDRESS size field can only hold 1 page shy of 4GB */
const uint64_t _4GB_minus_1 = _4GB - PAGE_SIZE;
util_vma_heap_init(&bufmgr->vma_allocator[IRIS_MEMZONE_SHADER],
PAGE_SIZE, _4GB_minus_1 - PAGE_SIZE);
+ util_vma_heap_init(&bufmgr->vma_allocator[IRIS_MEMZONE_BINDER],
+ IRIS_MEMZONE_BINDER_START, _1GB);
util_vma_heap_init(&bufmgr->vma_allocator[IRIS_MEMZONE_SURFACE],
IRIS_MEMZONE_SURFACE_START,
- _4GB_minus_1 - IRIS_MAX_BINDERS * IRIS_BINDER_SIZE);
+ _4GB_minus_1 - _1GB);
/* TODO: Why does limiting to 2GB help some state items on gen12?
* - CC Viewport Pointer
* - Blend State Pointer
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.h b/src/gallium/drivers/iris/iris_bufmgr.h
index 7755919..c3e937f 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.h
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.h
@@ -79,11 +79,10 @@ enum iris_memory_zone {
#define IRIS_MEMZONE_COUNT (IRIS_MEMZONE_OTHER + 1)
#define IRIS_BINDER_SIZE (64 * 1024)
-#define IRIS_MAX_BINDERS 100
#define IRIS_MEMZONE_SHADER_START (0ull * (1ull << 32))
#define IRIS_MEMZONE_BINDER_START (1ull * (1ull << 32))
-#define IRIS_MEMZONE_SURFACE_START (IRIS_MEMZONE_BINDER_START + IRIS_MAX_BINDERS * IRIS_BINDER_SIZE)
+#define IRIS_MEMZONE_SURFACE_START (IRIS_MEMZONE_BINDER_START + (1ull << 30))
#define IRIS_MEMZONE_DYNAMIC_START (2ull * (1ull << 32))
#define IRIS_MEMZONE_OTHER_START (3ull * (1ull << 32))

View File

@ -0,0 +1,88 @@
* call drm_unmap_ppgtt when a vm area from cache is cleared, so libdrm can unmap
at GPU driver
* use drm_lseek instead of libc version in order to retrieve bo object size
* disable fd operations
* align size to 2MB in 'iris_bo_alloc' as done in 'alloc_fresh_bo' to not
pollute bo cache
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
index 088f34f..98483f3 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
@@ -112,6 +112,8 @@
#define FILE_DEBUG_FLAG DEBUG_BUFMGR
+ void drm_unmap_ppgtt(__u32 handle);
+
/**
* For debugging purposes, this returns a time in seconds.
*/
@@ -1048,6 +1050,7 @@ alloc_bo_from_cache(struct iris_bufmgr *bufmgr,
continue;
}
+ drm_unmap_ppgtt(cur->gem_handle);
vma_free(bufmgr, cur->address, cur->size);
cur->address = 0ull;
}
@@ -1167,8 +1170,16 @@ iris_bo_alloc(struct iris_bufmgr *bufmgr,
struct iris_bo *bo;
unsigned int page_size = getpagesize();
enum iris_heap heap = flags_to_heap(bufmgr, flags);
- struct bo_cache_bucket *bucket =
- bucket_for_size(bufmgr, size, heap, flags);
+ struct bo_cache_bucket *bucket;
+
+ /*
+ * Use same optimization as 'alloc_fresh_bo', otherwise 2M buckets will
+ * balloon for 1M - <2M allocations
+ */
+ if (size >= 1024 * 1024)
+ size = align64(size, 2 * 1024 * 1024);
+
+ bucket = bucket_for_size(bufmgr, size, heap, flags);
if (memzone != IRIS_MEMZONE_OTHER || (flags & BO_ALLOC_COHERENT))
flags |= BO_ALLOC_NO_SUBALLOC;
@@ -1887,6 +1898,8 @@ iris_gem_set_tiling(struct iris_bo *bo, const struct isl_surf *surf)
return ret;
}
+extern int drm_lseek(int fd, off_t offset, int whence);
+
struct iris_bo *
iris_bo_import_dmabuf(struct iris_bufmgr *bufmgr, int prime_fd,
const uint64_t modifier)
@@ -1923,7 +1936,7 @@ iris_bo_import_dmabuf(struct iris_bufmgr *bufmgr, int prime_fd,
* later, we can lseek on the prime fd to get the size. Older
* kernels will just fail, in which case we fall back to the
* provided (estimated or guess size). */
- ret = lseek(prime_fd, 0, SEEK_END);
+ ret = drm_lseek(prime_fd, 0, SEEK_END);
if (ret != -1)
bo->size = ret;
@@ -2460,12 +2473,14 @@ iris_bufmgr_get_for_fd(int fd, bool bo_reuse)
struct intel_device_info devinfo;
struct stat st;
+#if 0
if (fstat(fd, &st))
return NULL;
-
+#endif
struct iris_bufmgr *bufmgr = NULL;
simple_mtx_lock(&global_bufmgr_list_mutex);
+#if 0
list_for_each_entry(struct iris_bufmgr, iter_bufmgr, &global_bufmgr_list, link) {
struct stat iter_st;
if (fstat(iter_bufmgr->fd, &iter_st))
@@ -2478,6 +2493,7 @@ iris_bufmgr_get_for_fd(int fd, bool bo_reuse)
}
}
+#endif
if (!intel_get_device_info_from_fd(fd, &devinfo))
return NULL;

View File

@ -1,55 +0,0 @@
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
index 3928f57..1849e33 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1302,6 +1302,8 @@ iris_bo_wait(struct iris_bo *bo, int64_t timeout_ns)
return ret;
}
+struct iris_bufmgr * single_bufmgr = NULL;
+
static void
iris_bufmgr_destroy(struct iris_bufmgr *bufmgr)
{
@@ -1819,7 +1821,8 @@ gem_param(int fd, int name)
static struct iris_bufmgr *
iris_bufmgr_create(struct gen_device_info *devinfo, int fd, bool bo_reuse)
{
- uint64_t gtt_size = iris_gtt_size(fd);
+// uint64_t gtt_size = iris_gtt_size(fd);
+ uint64_t gtt_size = 2 * IRIS_MEMZONE_OTHER_START;
if (gtt_size <= IRIS_MEMZONE_OTHER_START)
return NULL;
@@ -1925,14 +1928,17 @@ iris_bufmgr_unref(struct iris_bufmgr *bufmgr)
struct iris_bufmgr *
iris_bufmgr_get_for_fd(struct gen_device_info *devinfo, int fd, bool bo_reuse)
{
+#if 0
struct stat st;
if (fstat(fd, &st))
return NULL;
+#endif
struct iris_bufmgr *bufmgr = NULL;
mtx_lock(&global_bufmgr_list_mutex);
+#if 0
list_for_each_entry(struct iris_bufmgr, iter_bufmgr, &global_bufmgr_list, link) {
struct stat iter_st;
if (fstat(iter_bufmgr->fd, &iter_st))
@@ -1944,7 +1950,13 @@ iris_bufmgr_get_for_fd(struct gen_device_info *devinfo, int fd, bool bo_reuse)
goto unlock;
}
}
+#endif
+ if (single_bufmgr) {
+ struct iris_bufmgr * iter_bufmgr = single_bufmgr;
+ bufmgr = iris_bufmgr_ref(iter_bufmgr);
+ goto unlock;
+ } else
bufmgr = iris_bufmgr_create(devinfo, fd, bo_reuse);
if (bufmgr)
list_addtail(&bufmgr->link, &global_bufmgr_list);

View File

@ -1,21 +0,0 @@
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
@@ -101,6 +101,8 @@
#define FILE_DEBUG_FLAG DEBUG_BUFMGR
+void drm_unmap_ppgtt(__u32 handle);
+
static inline int
atomic_add_unless(int *v, int add, int unless)
{
@@ -439,6 +441,9 @@
*/
if (memzone != iris_memzone_for_address(bo->gtt_offset) ||
bo->gtt_offset % alignment != 0) {
+
+
+ drm_unmap_ppgtt(bo->gem_handle);
vma_free(bufmgr, bo->gtt_offset, bo->size);
bo->gtt_offset = 0ull;
}

View File

@ -1,18 +0,0 @@
Disable compute batch intialization since it requires its own DRM context. This
is currently not supported by the GPU multiplexer and in turn corrupts the state
of the render batch.
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_context.c b/src/lib/mesa/src/gallium/drivers/iris/iris_context.c
index 9fc6bb3..ac58e82 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_context.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_context.c
@@ -361,7 +361,8 @@ iris_create_context(struct pipe_screen *pscreen, void *priv, unsigned flags)
}
screen->vtbl.init_render_context(&ice->batches[IRIS_BATCH_RENDER]);
- screen->vtbl.init_compute_context(&ice->batches[IRIS_BATCH_COMPUTE]);
+ //XXX: we need support multiple contexts in GPU driver
+ //screen->vtbl.init_compute_context(&ice->batches[IRIS_BATCH_COMPUTE]);
return ctx;
}

View File

@ -0,0 +1,21 @@
* short circuit 'fstat'
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_utrace.c b/src/lib/mesa/src/gallium/drivers/iris/iris_utrace.c
index 8700857..eafd2e7 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_utrace.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_utrace.c
@@ -176,12 +176,14 @@ void iris_utrace_init(struct iris_context *ice)
struct iris_screen *screen = (struct iris_screen *)ice->ctx.screen;
struct stat st;
- uint32_t minor;
+ uint32_t minor = 0;
+#ifndef __GENODE__
if (fstat(screen->fd, &st) == 0)
minor = minor(st.st_rdev);
else
minor = 0;
+#endif
intel_ds_device_init(&ice->ds, screen->devinfo, screen->fd, minor,
INTEL_DS_API_OPENGL);

View File

@ -1,6 +1,29 @@
* disable shader cache (not supported)
* shortcircut 'close'
diff --git a/src/lib/mesa/src/gallium/drivers/lima/lima_disk_cache.c b/src/lib/mesa/src/gallium/drivers/lima/lima_disk_cache.c
index 0c3bef7..c5f9b02 100644
--- a/src/lib/mesa/src/gallium/drivers/lima/lima_disk_cache.c
+++ b/src/lib/mesa/src/gallium/drivers/lima/lima_disk_cache.c
@@ -191,6 +191,7 @@ err:
void
lima_disk_cache_init(struct lima_screen *screen)
{
+#ifdef ENABLE_SHADER_CACHE
const struct build_id_note *note =
build_id_find_nhdr_for_addr(lima_disk_cache_init);
assert(note && build_id_length(note) == 20); /* sha1 */
@@ -202,4 +203,5 @@ lima_disk_cache_init(struct lima_screen *screen)
_mesa_sha1_format(timestamp, id_sha1);
screen->disk_cache = disk_cache_create(screen->base.get_name(&screen->base), timestamp, 0);
+#endif
}
diff --git a/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c b/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
index 193e3ee..df81156 100644
--- a/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
--- b/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
@@ -90,8 +93,14 @@ lima_fence_get_fd(struct pipe_screen *pscreen,
+++ b/src/lib/mesa/src/gallium/drivers/lima/lima_fence.c
@@ -90,8 +90,14 @@ lima_fence_get_fd(struct pipe_screen *pscreen,
static void
lima_fence_destroy(struct pipe_fence_handle *fence)
{
@ -8,22 +31,10 @@
+ /*
+ * On Genode the fd is not created by the libc
+ * (see ioctl_lima.cc).
+ */
+ */
if (fence->fd >= 0)
close(fence->fd);
+#endif
FREE(fence);
}
--- a/src/lib/mesa/src/loader/loader.c
--- b/src/lib/mesa/src/loader/loader.c
@@ -473,6 +473,9 @@
if (fd == 43) {
return strdup("iris");
}
+ if (fd == 44) {
+ return strdup("lima");
+ }
char *driver;
/* Allow an environment variable to force choosing a different driver

View File

@ -0,0 +1,21 @@
diff --git a/src/lib/mesa/src/loader/loader.c b/src/lib/mesa/src/loader/loader.c
index bf90afe..3cce4ce 100644
--- a/src/lib/mesa/src/loader/loader.c
+++ b/src/lib/mesa/src/loader/loader.c
@@ -670,6 +670,16 @@ loader_get_driver_for_fd(int fd)
{
char *driver;
+ if (fd == 42) {
+ return strdup("etnaviv");
+ }
+ if (fd == 43) {
+ return strdup("iris");
+ }
+ if (fd == 44) {
+ return strdup("lima");
+ }
+
/* Allow an environment variable to force choosing a different driver
* binary. If that driver binary can't survive on this FD, that's the
* user's problem, but this allows vc4 simulator to run on an i965 host,

View File

@ -1,13 +0,0 @@
diff --git a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
index 2549729..c0045eb 100644
--- a/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/lib/mesa/src/gallium/drivers/iris/iris_bufmgr.c
@@ -1417,7 +1417,7 @@ iris_bo_import_dmabuf(struct iris_bufmgr *bufmgr, int prime_fd,
* later, we can lseek on the prime fd to get the size. Older
* kernels will just fail, in which case we fall back to the
* provided (estimated or guess size). */
- ret = lseek(prime_fd, 0, SEEK_END);
+ ret = drm_lseek(prime_fd, 0, SEEK_END);
if (ret != -1)
bo->size = ret;

View File

@ -1,8 +1,8 @@
diff --git a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
index 62fc7fb..0725756 100644
index 992f0e3..1f682fc 100644
--- a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
@@ -1188,6 +1188,9 @@ dri2_initialize(_EGLDisplay *disp)
@@ -1170,6 +1170,9 @@ dri2_initialize(_EGLDisplay *disp)
case _EGL_PLATFORM_ANDROID:
ret = dri2_initialize_android(disp);
break;
@ -13,23 +13,24 @@ index 62fc7fb..0725756 100644
unreachable("Callers ensure we cannot get here.");
return EGL_FALSE;
diff --git a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
index d7f9696..007c630 100644
index 57d8820..0d1be58 100644
--- a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
@@ -296,6 +296,12 @@ struct dri2_egl_surface
int format;
@@ -356,6 +356,13 @@ struct dri2_egl_surface {
bool received_dmabuf_feedback;
#endif
+#ifdef HAVE_GENODE_PLATFORM
+ struct Genode_egl_window *g_win;
+ __DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
+ __DRIimage *back_image;
+ __DRIimage *back_image;
+#endif
+
+
#ifdef HAVE_DRM_PLATFORM
struct gbm_dri_surface *gbm_surf;
#endif
@@ -516,6 +522,9 @@ dri2_initialize_android(_EGLDisplay *disp)
@@ -606,6 +613,9 @@ dri2_initialize_android(_EGLDisplay *disp)
EGLBoolean
dri2_initialize_surfaceless(_EGLDisplay *disp);
@ -40,74 +41,91 @@ index d7f9696..007c630 100644
dri2_initialize_device(_EGLDisplay *disp);
static inline void
diff --git a/src/lib/mesa/src/egl/main/egldisplay.c b/src/lib/mesa/src/egl/main/egldisplay.c
index 765618f..be99e17 100644
index 4eadb8f..6a46d79 100644
--- a/src/lib/mesa/src/egl/main/egldisplay.c
+++ b/src/lib/mesa/src/egl/main/egldisplay.c
@@ -77,6 +77,7 @@ static const struct {
{ _EGL_PLATFORM_HAIKU, "haiku" },
{ _EGL_PLATFORM_SURFACELESS, "surfaceless" },
{ _EGL_PLATFORM_DEVICE, "device" },
+ { _EGL_PLATFORM_DEVICE, "genode" },
@@ -83,6 +83,7 @@ static const struct {
{_EGL_PLATFORM_SURFACELESS, "surfaceless"},
{_EGL_PLATFORM_DEVICE, "device"},
{_EGL_PLATFORM_WINDOWS, "windows"},
+ {_EGL_PLATFORM_GENODE, "genode"},
};
/**
diff --git a/src/lib/mesa/src/egl/main/egldisplay.h b/src/lib/mesa/src/egl/main/egldisplay.h
index 4d2afbc..3dd6b72 100644
index b3510ae..14e8354 100644
--- a/src/lib/mesa/src/egl/main/egldisplay.h
+++ b/src/lib/mesa/src/egl/main/egldisplay.h
@@ -52,6 +52,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_HAIKU,
@@ -55,6 +55,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_SURFACELESS,
_EGL_PLATFORM_DEVICE,
_EGL_PLATFORM_WINDOWS,
+ _EGL_PLATFORM_GENODE,
_EGL_NUM_PLATFORMS,
_EGL_INVALID_PLATFORM = -1
diff --git a/src/lib/mesa/src/egl/main/egllog.c b/src/lib/mesa/src/egl/main/egllog.c
index 6a91952..b41b481 100644
index 678bb75..9c16c60 100644
--- a/src/lib/mesa/src/egl/main/egllog.c
+++ b/src/lib/mesa/src/egl/main/egllog.c
@@ -57,7 +57,7 @@
@@ -55,7 +55,7 @@
#endif /* HAVE_ANDROID_PLATFORM */
#define MAXSTRING 1000
#define MAXSTRING 1000
-#define FALLBACK_LOG_LEVEL _EGL_WARNING
+#define FALLBACK_LOG_LEVEL _EGL_DEBUG
+#define FALLBACK_LOG_LEVEL _EGL_WARNING
static struct {
simple_mtx_t mutex;
diff --git a/src/lib/mesa/src/loader/loader.c b/src/lib/mesa/src/loader/loader.c
index d64bc7c..9a25398 100644
index 19c456c..bf90afe 100644
--- a/src/lib/mesa/src/loader/loader.c
+++ b/src/lib/mesa/src/loader/loader.c
@@ -561,7 +561,7 @@ loader_open_driver(const char *driver_name,
@@ -800,8 +800,7 @@ loader_open_driver_lib(const char *driver_name,
next = end;
len = next - p;
- snprintf(path, sizeof(path), "%.*s/tls/%s%s.so", len,
- p, driver_name, lib_suffix);
+ snprintf(path, sizeof(path), "%.*s/mesa_gpu_drv.lib.so", len, p);
driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
#endif
if (driver == NULL) {
- snprintf(path, sizeof(path), "%.*s/%s_dri.so", len, p, driver_name);
+ snprintf(path, sizeof(path), "%.*s/mesa_gpu_drv.lib.so", len, p);
driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
if (driver == NULL) {
dl_error = dlerror();
diff --git a/src/lib/mesa/src/util/u_thread.h b/src/lib/mesa/src/util/u_thread.h
index c5f7fb6..f3166a4 100644
--- a/src/lib/mesa/src/util/u_thread.h
+++ b/src/lib/mesa/src/util/u_thread.h
@@ -209,7 +209,7 @@ util_set_current_thread_affinity(const uint32_t *mask,
static inline int64_t
snprintf(path, sizeof(path), "%.*s/%s%s.so", len,
diff --git a/src/lib/mesa/src/util/u_thread.c b/src/lib/mesa/src/util/u_thread.c
index c508733..b186182 100644
--- a/src/lib/mesa/src/util/u_thread.c
+++ b/src/lib/mesa/src/util/u_thread.c
@@ -154,7 +154,8 @@ util_set_thread_affinity(thrd_t thread,
int64_t
util_thread_get_time_nano(thrd_t thread)
{
-#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__GENODE__)
-#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__managarm__)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__managarm__) \
+ && !defined(__GENODE__)
struct timespec ts;
clockid_t cid;
@@ -249,7 +249,7 @@ static inline bool u_thread_is_self(thrd_t thread)
@@ -174,7 +175,8 @@ util_thread_get_time_nano(thrd_t thread)
#endif
}
-#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) \
+ && !defined(__GENODE__)
void util_barrier_init(util_barrier *barrier, unsigned count)
{
diff --git a/src/lib/mesa/src/util/u_thread.h b/src/lib/mesa/src/util/u_thread.h
index b5c7667..7065bc8 100644
--- a/src/lib/mesa/src/util/u_thread.h
+++ b/src/lib/mesa/src/util/u_thread.h
@@ -116,7 +116,8 @@ static inline bool u_thread_is_self(thrd_t thread)
* util_barrier
*/
-#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) && !defined(__GENODE__)
+#if defined(HAVE_PTHREAD) && !defined(__APPLE__) && !defined(__HAIKU__) \
+ && !defined(__GENODE__)
typedef pthread_barrier_t util_barrier;

View File

@ -0,0 +1,17 @@
diff --git a/src/lib/mesa/src/util/os_file.c b/src/lib/mesa/src/util/os_file.c
index 464425a..0590d98 100644
--- a/src/lib/mesa/src/util/os_file.c
+++ b/src/lib/mesa/src/util/os_file.c
@@ -53,6 +53,12 @@ os_dupfd_cloexec(int fd)
int
os_dupfd_cloexec(int fd)
{
+ /*
+ * The fd is not allocate via the libc so dup will not work, just
+ * return the original fd.
+ */
+ return fd;
+
int minfd = 3;
int newfd = fcntl(fd, F_DUPFD_CLOEXEC, minfd);

View File

@ -1,21 +1,26 @@
--- a/src/lib/mesa/src/gallium/auxiliary/os/os_mman.h
+++ b/src/lib/mesa/src/gallium/auxiliary/os/os_mman.h
@@ -59,10 +59,12 @@ extern "C" {
Use drm_map/unmap instead of libc versions
diff --git a/src/lib/mesa/src/util/os_mman.h b/src/lib/mesa/src/util/os_mman.h
index 9b0e45e..c9e72eb 100644
--- a/src/lib/mesa/src/util/os_mman.h
+++ b/src/lib/mesa/src/util/os_mman.h
@@ -60,9 +60,13 @@ extern "C" {
munmap(addr, length)
#else
+extern void *drm_mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset);
+
/* assume large file support exists */
# define os_mmap(addr, length, prot, flags, fd, offset) \
- mmap(addr, length, prot, flags, fd, offset)
+ drm_mmap(addr, length, prot, flags, fd, offset)
+
+extern int drm_munmap(void *addr, size_t length);
static inline int os_munmap(void *addr, size_t length)
{
/* Copied from configure code generated by AC_SYS_LARGEFILE */
@@ -72,7 +74,7 @@ static inline int os_munmap(void *addr, size_t length)
LARGE_OFF_T % 2147483647 == 1);
@@ -73,7 +77,7 @@ static inline int os_munmap(void *addr, size_t length)
LARGE_OFF_T % 2147483647 == 1, "");
#undef LARGE_OFF_T
- return munmap(addr, length);

View File

@ -1,8 +1,8 @@
Allocate texture cache lazy instead of relying on OS specific VM address space
reservation via malloc.
reservation via malloc. Safes over 100MB for small scenarios.
diff --git a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
index 8725930..d36c833 100644
index 7edeb2c..139f0d6 100644
--- a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -724,7 +724,7 @@ get_texel_buffer_no_border(const struct sp_sampler_view *sp_sview,
@ -48,19 +48,19 @@ index 8725930..d36c833 100644
diff --git a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index 7a1009a..78de40a 100644
index 4bc8e3e..bb280e5 100644
--- a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -221,6 +221,9 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
pos, x/TILE_SIZE, y/TILE_SIZE, z, face, level,
@@ -222,6 +222,9 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
pos, tile->addr.bits.x, tile->addr.bits.y, tile->z, tile->face, tile->level);
#endif
+
+ if (tile->data == NULL)
+ tile->data = malloc(sizeof(struct softpipe_tex_data));
+
/* check if we need to get a new transfer */
if (!tc->tex_trans ||
tc->tex_level != addr.bits.level ||
@@ -265,7 +268,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
TEX_TILE_SIZE,
TEX_TILE_SIZE,
@ -71,7 +71,7 @@ index 7a1009a..78de40a 100644
}
diff --git a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
index 2e4635f..fa21e1f 100644
index a6bb2eb..5998343 100644
--- a/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
+++ b/src/lib/mesa/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
@@ -60,15 +60,19 @@ union tex_tile_address {

View File

@ -1,20 +1,22 @@
Use drm_poll instead of libc version (see: libdrm -> ioctl_dispatch.cc)
diff --git a/src/lib/mesa/src/util/libsync.h b/src/lib/mesa/src/util/libsync.h
index 60e3e5d..c81647c 100644
--- a/src/lib/mesa/src/util/libsync.h
+++ b/src/lib/mesa/src/util/libsync.h
@@ -65,6 +65,8 @@
#define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data)
@@ -98,6 +98,7 @@ struct sync_file_info {
#define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info)
#endif
+extern int drm_poll(struct pollfd *, nfds_t, int);
+
static inline int sync_wait(int fd, int timeout)
{
struct pollfd fds = {0};
@@ -74,7 +76,7 @@
fds.events = POLLIN;
@@ -110,7 +111,7 @@ static inline int sync_wait(int fd, int timeout)
do {
clock_gettime(CLOCK_MONOTONIC, &poll_start);
- ret = poll(&fds, 1, timeout);
+ ret = drm_poll(&fds, 1, timeout);
clock_gettime(CLOCK_MONOTONIC, &poll_end);
if (ret > 0) {
if (fds.revents & (POLLERR | POLLNVAL)) {
errno = EINVAL;

View File

@ -14,7 +14,8 @@
* Mesa
*/
#include <egl_dri2.h>
#include <drivers/dri/common/utils.h>
#include <gallium/frontends/dri/dri_util.h>
/*
* Libc
*/
@ -176,7 +177,7 @@ dri2_initialize_genode_swrast(_EGLDisplay *disp)
disp->DriverData = (void *)dri2_dpy;
dri2_dpy->fd = -1;
dri2_dpy->fd_render_gpu = -1;
dri2_dpy->driver_name = strdup("swrast");
if (!dri2_load_driver_swrast(disp))
goto close_driver;