libports: Remove Mesa-11.2.2

issue #4254
This commit is contained in:
Sebastian Sumpf 2021-08-20 10:59:37 +02:00 committed by Christian Helmuth
parent b6ec4bdf05
commit 9041567f14
51 changed files with 0 additions and 4634 deletions

View File

@ -1 +0,0 @@
INC_DIR += $(call select_from_ports,egl_api)/include

View File

@ -1 +0,0 @@
include $(call select_from_repositories,lib/import/import-mesa_api.mk)

View File

@ -1 +0,0 @@
INC_DIR += $(call select_from_ports,mesa)/include

View File

@ -1 +0,0 @@
INC_DIR += $(call select_from_ports,mesa)/include

View File

@ -1,40 +0,0 @@
SHARED_LIB = yes
LIBS = libc blit
# Link to Mesa, EGL clients should use `eglGetProcAddres`
# to retrieve Mesa implementations rather than use Mesa
# symbols directly.
LIBS += mesa
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = \
main/eglsurface.c \
main/eglconfig.c \
main/eglglobals.c \
main/egldisplay.c \
main/eglfallbacks.c \
main/eglsync.c \
main/egllog.c \
main/eglarray.c \
main/eglimage.c \
main/eglcontext.c \
main/eglcurrent.c \
main/eglapi.c \
main/egldriver.c \
drivers/dri2/egl_dri2.c \
platform.c
SRC_CC = genode_interface.cc
CC_OPT += -D_EGL_NATIVE_PLATFORM=_EGL_PLATFORM_GENODE -D_EGL_BUILT_IN_DRIVER_DRI2 \
-DHAVE_GENODE_PLATFORM
INC_DIR += $(MESA_PORT_DIR)/src/egl/main \
$(MESA_PORT_DIR)/src/egl/drivers/dri2
vpath %.c $(MESA_PORT_DIR)/src/egl
vpath %.c $(LIB_DIR)/egl
vpath %.cc $(LIB_DIR)/egl
CC_CXX_WARN_STRICT =

View File

@ -1 +0,0 @@
# stub mk file

View File

@ -1,17 +0,0 @@
SHARED_LIB = yes
LIBS = libc egl i965
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = platform_i965.c
SRC_CC = drm_init.cc
CC_OPT += -DHAVE_GENODE_PLATFORM
INC_DIR += $(MESA_PORT_DIR)/src/egl/main \
$(MESA_PORT_DIR)/src/egl/drivers/dri2
vpath %.c $(LIB_DIR)/i965
vpath %.cc $(LIB_DIR)/i965
CC_CXX_WARN_STRICT =

View File

@ -1,15 +0,0 @@
SHARED_LIB = yes
LIBS = libc egl swrast
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = platform_swrast.c
CC_OPT += -DHAVE_GENODE_PLATFORM
INC_DIR += $(MESA_PORT_DIR)/src/egl/main \
$(MESA_PORT_DIR)/src/egl/drivers/dri2
vpath %.c $(LIB_DIR)/swrast
CC_CXX_WARN_STRICT =

View File

@ -1,18 +0,0 @@
SHARED_LIB = yes
LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = mapi/entry.c \
mapi/mapi_glapi.c \
mapi/stub.c \
mapi/table.c \
mapi/u_current.c \
mapi/u_execmem.c
CC_OPT += -DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\" -DMAPI_MODE_GLAPI
vpath %.c $(MESA_PORT_DIR)/src
CC_CXX_WARN_STRICT =

View File

@ -1,230 +0,0 @@
LIBS = libc drm
include $(REP_DIR)/lib/mk/mesa-common.inc
I965_COMPILER_FILES = \
brw_compiler.c \
brw_device_info.c \
brw_disasm.c \
brw_eu.c \
brw_eu_compact.c \
brw_eu_emit.c \
brw_eu_util.c \
brw_eu_validate.c \
brw_interpolation_map.c \
brw_nir.c \
brw_nir_analyze_boolean_resolves.c \
brw_nir_attribute_workarounds.c \
brw_nir_opt_peephole_ffma.c \
brw_packed_float.c \
brw_surface_formats.c \
brw_util.c \
brw_vue_map.c \
intel_asm_annotation.c \
intel_debug.c \
intel_resolve_map.c
I965_COMPILER_FILES_CXX = \
brw_cfg.cpp \
brw_dead_control_flow.cpp \
brw_fs_cmod_propagation.cpp \
brw_fs_combine_constants.cpp \
brw_fs_copy_propagation.cpp \
brw_fs.cpp \
brw_fs_cse.cpp \
brw_fs_dead_code_eliminate.cpp \
brw_fs_generator.cpp \
brw_fs_live_variables.cpp \
brw_fs_nir.cpp \
brw_fs_reg_allocate.cpp \
brw_fs_register_coalesce.cpp \
brw_fs_saturate_propagation.cpp \
brw_fs_sel_peephole.cpp \
brw_fs_surface_builder.cpp \
brw_fs_validate.cpp \
brw_fs_visitor.cpp \
brw_nir_uniforms.cpp \
brw_predicated_break.cpp \
brw_schedule_instructions.cpp \
brw_shader.cpp \
brw_vec4_cmod_propagation.cpp \
brw_vec4_copy_propagation.cpp \
brw_vec4.cpp \
brw_vec4_cse.cpp \
brw_vec4_dead_code_eliminate.cpp \
brw_vec4_generator.cpp \
brw_vec4_gs_visitor.cpp \
brw_vec4_live_variables.cpp \
brw_vec4_nir.cpp \
brw_vec4_gs_nir.cpp \
brw_vec4_reg_allocate.cpp \
brw_vec4_surface_builder.cpp \
brw_vec4_tcs.cpp \
brw_vec4_tes.cpp \
brw_vec4_visitor.cpp \
brw_vec4_vs_visitor.cpp \
brw_wm_iz.cpp \
gen6_gs_visitor.cpp
I965_FILES = \
brw_binding_tables.c \
brw_cc.c \
brw_clear.c \
brw_clip.c \
brw_clip_line.c \
brw_clip_point.c \
brw_clip_state.c \
brw_clip_tri.c \
brw_clip_unfilled.c \
brw_clip_util.c \
brw_compute.c \
brw_conditional_render.c \
brw_context.c \
brw_cs.c \
brw_curbe.c \
brw_draw.c \
brw_draw_upload.c \
brw_ff_gs.c \
brw_ff_gs_emit.c \
brw_gs.c \
brw_gs_state.c \
brw_gs_surface_state.c \
brw_meta_fast_clear.c \
brw_meta_stencil_blit.c \
brw_meta_updownsample.c \
brw_meta_util.c \
brw_misc_state.c \
brw_object_purgeable.c \
brw_performance_monitor.c \
brw_pipe_control.c \
brw_program.c \
brw_primitive_restart.c \
brw_queryobj.c \
brw_reset.c \
brw_sampler_state.c \
brw_sf.c \
brw_sf_emit.c \
brw_sf_state.c \
brw_state_batch.c \
brw_state_cache.c \
brw_state_dump.c \
brw_state_upload.c \
brw_tcs.c \
brw_tcs_surface_state.c \
brw_tes.c \
brw_tes_surface_state.c \
brw_tex.c \
brw_tex_layout.c \
brw_urb.c \
brw_vs.c \
brw_vs_state.c \
brw_vs_surface_state.c \
brw_wm.c \
brw_wm_state.c \
brw_wm_surface_state.c \
gen6_cc.c \
gen6_clip_state.c \
gen6_constant_state.c \
gen6_depth_state.c \
gen6_depthstencil.c \
gen6_gs_state.c \
gen6_multisample_state.c \
gen6_queryobj.c \
gen6_sampler_state.c \
gen6_scissor_state.c \
gen6_sf_state.c \
gen6_sol.c \
gen6_surface_state.c \
gen6_urb.c \
gen6_viewport_state.c \
gen6_vs_state.c \
gen6_wm_state.c \
gen7_cs_state.c \
gen7_ds_state.c \
gen7_gs_state.c \
gen7_hs_state.c \
gen7_l3_state.c \
gen7_misc_state.c \
gen7_sf_state.c \
gen7_sol_state.c \
gen7_te_state.c \
gen7_urb.c \
gen7_viewport_state.c \
gen7_vs_state.c \
gen7_wm_state.c \
gen7_wm_surface_state.c \
gen8_blend_state.c \
gen8_depth_state.c \
gen8_disable.c \
gen8_draw_upload.c \
gen8_ds_state.c \
gen8_gs_state.c \
gen8_hs_state.c \
gen8_misc_state.c \
gen8_multisample_state.c \
gen8_ps_state.c \
gen8_sf_state.c \
gen8_sol_state.c \
gen8_surface_state.c \
gen8_viewport_state.c \
gen8_vs_state.c \
gen8_wm_depth_stencil.c \
intel_batchbuffer.c \
intel_blit.c \
intel_buffer_objects.c \
intel_buffers.c \
intel_copy_image.c \
intel_extensions.c \
intel_fbo.c \
intel_mipmap_tree.c \
intel_pixel_bitmap.c \
intel_pixel.c \
intel_pixel_copy.c \
intel_pixel_draw.c \
intel_pixel_read.c \
intel_screen.c \
intel_state.c \
intel_syncobj.c \
intel_tex.c \
intel_tex_copy.c \
intel_tex_image.c \
intel_tex_subimage.c \
intel_tex_validate.c \
intel_tiled_memcpy.c \
intel_upload.c
I965_FILES_CXX = \
brw_blorp_blit.cpp \
brw_blorp_blit_eu.cpp \
brw_blorp.cpp \
brw_cubemap_normalize.cpp \
brw_fs_channel_expressions.cpp \
brw_fs_vector_splitting.cpp \
brw_link.cpp \
brw_lower_texture_gradients.cpp \
brw_lower_unnormalized_offset.cpp \
gen6_blorp.cpp \
gen7_blorp.cpp
INC_DIR += $(MESA_SRC_DIR)/drivers/dri/common
SRC_C = $(addprefix drivers/dri/i965/,$(I965_COMPILER_FILES) $(I965_FILES))
SRC_CC = $(addprefix drivers/dri/i965/,$(I965_COMPILER_FILES_CXX) $(I965_FILES_CXX))
SRC_C += bo_map.c
CC_OPT = -DHAVE_PTHREAD -DFFS_DEFINED=1
CC_C_OPT = -std=c99
CC_CXX_OPT += -D__STDC_LIMIT_MACROS
#
# special flags
#
CC_OPT_drivers/dri/i965/brw_fs_combine_constants = -D__BSD_VISIBLE
vpath %.c $(REP_DIR)/src/lib/mesa/i965
vpath %.c $(MESA_SRC_DIR)
vpath %.cpp $(MESA_SRC_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,22 +0,0 @@
MESA_PORT_DIR := $(call select_from_ports,mesa)/src/lib/mesa
MESA_SRC_DIR := $(MESA_PORT_DIR)/src/mesa
LIB_DIR := $(REP_DIR)/src/lib/mesa
INC_DIR += $(MESA_SRC_DIR) \
$(MESA_SRC_DIR)/main \
$(MESA_SRC_DIR)/x86 \
$(MESA_PORT_DIR) \
$(MESA_PORT_DIR)/include \
$(MESA_PORT_DIR)/src \
$(MESA_PORT_DIR)/src/mapi \
$(MESA_PORT_DIR)/src/gallium/auxiliary \
$(MESA_PORT_DIR)/src/gallium/include \
$(LIB_DIR)/include
CC_OPT += -DHAVE_PTHREAD -D_XOPEN_SOURCE=700 -DDEFAULT_DRIVER_DIR=\"\ \"
CC_WARN += -Wno-return-type
CC_C_OPT +=-Wno-implicit-function-declaration
# vi: set ft=make :

View File

@ -1,482 +0,0 @@
SHARED_LIB = yes
LIBS = libc stdcxx expat glapi mesa_api
include $(REP_DIR)/lib/mk/mesa-common.inc
MAIN_ES_FILES = \
main/es1_conversion.c
MAIN_FILES = \
main/accum.c \
main/api_arrayelt.c \
main/api_exec.c \
main/api_loopback.c \
main/api_validate.c \
main/arbprogram.c \
main/arrayobj.c \
main/atifragshader.c \
main/attrib.c \
main/blend.c \
main/blit.c \
main/bufferobj.c \
main/buffers.c \
main/clear.c \
main/clip.c \
main/colortab.c \
main/compute.c \
main/condrender.c \
main/context.c \
main/convolve.c \
main/copyimage.c \
main/cpuinfo.c \
main/debug.c \
main/debug_output.c \
main/depth.c \
main/dlist.c \
main/drawpix.c \
main/drawtex.c \
main/enable.c \
main/enums.c \
main/errors.c \
main/eval.c \
main/execmem.c \
main/extensions.c \
main/fbobject.c \
main/feedback.c \
main/ffvertex_prog.c \
main/fog.c \
main/format_pack.c \
main/format_unpack.c \
main/formatquery.c \
main/formats.c \
main/format_utils.c \
main/framebuffer.c \
main/get.c \
main/genmipmap.c \
main/getstring.c \
main/glformats.c \
main/hash.c \
main/hint.c \
main/histogram.c \
main/image.c \
main/imports.c \
main/light.c \
main/lines.c \
main/matrix.c \
main/mipmap.c \
main/mm.c \
main/multisample.c \
main/objectlabel.c \
main/objectpurge.c \
main/pack.c \
main/pbo.c \
main/performance_monitor.c \
main/pipelineobj.c \
main/pixel.c \
main/pixelstore.c \
main/pixeltransfer.c \
main/points.c \
main/polygon.c \
main/program_resource.c \
main/querymatrix.c \
main/queryobj.c \
main/rastpos.c \
main/readpix.c \
main/remap.c \
main/renderbuffer.c \
main/samplerobj.c \
main/scissor.c \
main/shaderapi.c \
main/shaderimage.c \
main/shaderobj.c \
main/shared.c \
main/state.c \
main/stencil.c \
main/syncobj.c \
main/texcompress.c \
main/texcompress_bptc.c \
main/texcompress_cpal.c \
main/texcompress_etc.c \
main/texcompress_fxt1.c \
main/texcompress_rgtc.c \
main/texcompress_s3tc.c \
main/texenv.c \
main/texformat.c \
main/texgen.c \
main/texgetimage.c \
main/teximage.c \
main/texobj.c \
main/texparam.c \
main/texstate.c \
main/texstorage.c \
main/texstore.c \
main/textureview.c \
main/texturebarrier.c \
main/transformfeedback.c \
main/uniforms.c \
main/varray.c \
main/vdpau.c \
main/version.c \
main/viewport.c \
main/vtxfmt.c
MAIN_FILES_CC = \
main/ff_fragment_shader.cpp \
main/shader_query.cpp \
main/uniform_query.cpp \
MATH_FILES = \
math/m_debug_clip.c \
math/m_debug_norm.c \
math/m_debug_xform.c \
math/m_eval.c \
math/m_matrix.c \
math/m_translate.c \
math/m_vector.c \
MATH_XFORM_FILES = \
math/m_xform.c \
VBO_FILES = \
vbo/vbo_context.c \
vbo/vbo_exec_api.c \
vbo/vbo_exec_array.c \
vbo/vbo_exec.c \
vbo/vbo_exec_draw.c \
vbo/vbo_exec_eval.c \
vbo/vbo_minmax_index.c \
vbo/vbo_noop.c \
vbo/vbo_primitive_restart.c \
vbo/vbo_rebase.c \
vbo/vbo_save_api.c \
vbo/vbo_save.c \
vbo/vbo_save_draw.c \
vbo/vbo_save_loopback.c \
vbo/vbo_split.c \
vbo/vbo_split_copy.c \
vbo/vbo_split_inplace.c
TNL_FILES = \
tnl/t_context.c \
tnl/t_draw.c \
tnl/t_pipeline.c \
tnl/t_vb_fog.c \
tnl/t_vb_light.c \
tnl/t_vb_normals.c \
tnl/t_vb_points.c \
tnl/t_vb_program.c \
tnl/t_vb_render.c \
tnl/t_vb_texgen.c \
tnl/t_vb_texmat.c \
tnl/t_vb_vertex.c \
tnl/t_vertex.c \
tnl/t_vertex_generic.c \
tnl/t_vertex_sse.c \
tnl/t_vp_build.c \
SWRAST_FILES = \
swrast/s_aaline.c \
swrast/s_aatriangle.c \
swrast/s_alpha.c \
swrast/s_atifragshader.c \
swrast/s_bitmap.c \
swrast/s_blend.c \
swrast/s_blit.c \
swrast/s_clear.c \
swrast/s_context.c \
swrast/s_copypix.c \
swrast/s_depth.c \
swrast/s_drawpix.c \
swrast/s_feedback.c \
swrast/s_fog.c \
swrast/s_fragprog.c \
swrast/s_lines.c \
swrast/s_logic.c \
swrast/s_masking.c \
swrast/s_points.c \
swrast/s_renderbuffer.c \
swrast/s_span.c \
swrast/s_stencil.c \
swrast/s_texcombine.c \
swrast/s_texfetch.c \
swrast/s_texfilter.c \
swrast/s_texrender.c \
swrast/s_texture.c \
swrast/s_triangle.c \
swrast/s_zoom.c \
SWRAST_SETUP_FILES = \
swrast_setup/ss_context.c \
swrast_setup/ss_triangle.c \
COMMON_DRIVER_FILES = \
drivers/common/driverfuncs.c \
drivers/common/meta_blit.c \
drivers/common/meta_copy_image.c \
drivers/common/meta_generate_mipmap.c \
drivers/common/meta_tex_subimage.c \
drivers/common/meta.c \
ASM_C_FILES += \
x86/common_x86.c \
x86/x86_xform.c \
x86/sse.c \
x86/rtasm/x86sse.c \
sparc/sparc.c \
PROGRAM = \
program/arbprogparse.c \
program/lex.yy.c \
program/prog_cache.c \
program/prog_execute.c \
program/prog_hash_table.c \
program/prog_instruction.c \
program/prog_noise.c \
program/prog_opt_constant_fold.c \
program/prog_optimize.c \
program/prog_parameter.c \
program/prog_parameter_layout.c \
program/prog_print.c \
program/prog_statevars.c \
program/prog_to_nir.c \
program/program.c \
program/programopt.c \
program/program_parse.tab.c \
program/program_parse_extra.c \
program/symbol_table.c
PROGRAM_CXX = \
program/ir_to_mesa.cpp \
program/string_to_uint_map.cpp
MAPI_FILES = \
mapi/entry.c
UTIL = \
util/debug.c \
util/format_srgb.c \
util/half_float.c \
util/hash_table.c \
util/ralloc.c \
util/register_allocate.c \
util/rgtc.c \
util/set.c \
util/strtod.c
GLSL = \
glsl/blob.c \
glsl/glcpp/glcpp-lex.c \
glsl/glcpp/glcpp-parse.c \
glsl/glcpp/pp.c
GLSL_CXX = \
glsl/ast_array_index.cpp \
glsl/ast_expr.cpp \
glsl/ast_function.cpp \
glsl/ast_to_hir.cpp \
glsl/ast_type.cpp \
glsl/builtin_functions.cpp \
glsl/builtin_types.cpp \
glsl/builtin_variables.cpp \
glsl/glsl_lexer.cpp \
glsl/glsl_parser.cpp \
glsl/glsl_parser_extras.cpp \
glsl/glsl_symbol_table.cpp \
glsl/hir_field_selection.cpp \
glsl/ir_basic_block.cpp \
glsl/ir_builder.cpp \
glsl/ir_clone.cpp \
glsl/ir_constant_expression.cpp \
glsl/ir.cpp \
glsl/ir_equals.cpp \
glsl/ir_expression_flattening.cpp \
glsl/ir_function_can_inline.cpp \
glsl/ir_function_detect_recursion.cpp \
glsl/ir_function.cpp \
glsl/ir_hierarchical_visitor.cpp \
glsl/ir_hv_accept.cpp \
glsl/ir_import_prototypes.cpp \
glsl/ir_print_visitor.cpp \
glsl/ir_reader.cpp \
glsl/ir_rvalue_visitor.cpp \
glsl/ir_set_program_inouts.cpp \
glsl/ir_validate.cpp \
glsl/ir_variable_refcount.cpp \
glsl/linker.cpp \
glsl/link_atomics.cpp \
glsl/link_functions.cpp \
glsl/link_interface_blocks.cpp \
glsl/link_uniforms.cpp \
glsl/link_uniform_initializers.cpp \
glsl/link_uniform_block_active_visitor.cpp \
glsl/link_uniform_blocks.cpp \
glsl/link_varyings.cpp \
glsl/loop_analysis.cpp \
glsl/loop_controls.cpp \
glsl/loop_unroll.cpp \
glsl/lower_buffer_access.cpp \
glsl/lower_clip_distance.cpp \
glsl/lower_const_arrays_to_uniforms.cpp \
glsl/lower_discard.cpp \
glsl/lower_discard_flow.cpp \
glsl/lower_if_to_cond_assign.cpp \
glsl/lower_instructions.cpp \
glsl/lower_jumps.cpp \
glsl/lower_mat_op_to_vec.cpp \
glsl/lower_noise.cpp \
glsl/lower_offset_array.cpp \
glsl/lower_packed_varyings.cpp \
glsl/lower_named_interface_blocks.cpp \
glsl/lower_packing_builtins.cpp \
glsl/lower_subroutine.cpp \
glsl/lower_tess_level.cpp \
glsl/lower_texture_projection.cpp \
glsl/lower_variable_index_to_cond_assign.cpp \
glsl/lower_vec_index_to_cond_assign.cpp \
glsl/lower_vec_index_to_swizzle.cpp \
glsl/lower_vector.cpp \
glsl/lower_vector_derefs.cpp \
glsl/lower_vector_insert.cpp \
glsl/lower_vertex_id.cpp \
glsl/lower_output_reads.cpp \
glsl/lower_shared_reference.cpp \
glsl/lower_ubo_reference.cpp \
glsl/opt_algebraic.cpp \
glsl/opt_array_splitting.cpp \
glsl/opt_conditional_discard.cpp \
glsl/opt_constant_folding.cpp \
glsl/opt_constant_propagation.cpp \
glsl/opt_constant_variable.cpp \
glsl/opt_copy_propagation.cpp \
glsl/opt_copy_propagation_elements.cpp \
glsl/opt_dead_builtin_variables.cpp \
glsl/opt_dead_builtin_varyings.cpp \
glsl/opt_dead_code.cpp \
glsl/opt_dead_code_local.cpp \
glsl/opt_dead_functions.cpp \
glsl/opt_flatten_nested_if_blocks.cpp \
glsl/opt_flip_matrices.cpp \
glsl/opt_function_inlining.cpp \
glsl/opt_if_simplification.cpp \
glsl/opt_minmax.cpp \
glsl/opt_noop_swizzle.cpp \
glsl/opt_rebalance_tree.cpp \
glsl/opt_redundant_jumps.cpp \
glsl/opt_structure_splitting.cpp \
glsl/opt_swizzle_swizzle.cpp \
glsl/opt_tree_grafting.cpp \
glsl/opt_vectorize.cpp \
glsl/s_expression.cpp
LIBCOMPILER_CXX = \
glsl_types.cpp \
nir_types.cpp
LIBCOMPILER = \
shader_enums.c
DRI = \
drivers/dri/common/dri_util.c \
drivers/dri/common/megadriver_stub.c \
drivers/dri/common/utils.c \
drivers/dri/common/xmlconfig.c
NIR = \
compiler/nir/nir.c \
compiler/nir/nir_clone.c \
compiler/nir/nir_constant_expressions.c \
compiler/nir/nir_control_flow.c \
compiler/nir/nir_dominance.c \
compiler/nir/nir_from_ssa.c \
compiler/nir/nir_instr_set.c \
compiler/nir/nir_intrinsics.c \
compiler/nir/nir_gs_count_vertices.c \
compiler/nir/nir_liveness.c \
compiler/nir/nir_lower_alu_to_scalar.c \
compiler/nir/nir_lower_atomics.c \
compiler/nir/nir_lower_global_vars_to_local.c \
compiler/nir/nir_lower_gs_intrinsics.c \
compiler/nir/nir_lower_io.c \
compiler/nir/nir_lower_load_const_to_scalar.c \
compiler/nir/nir_lower_locals_to_regs.c \
compiler/nir/nir_lower_outputs_to_temporaries.c \
compiler/nir/nir_lower_phis_to_scalar.c \
compiler/nir/nir_lower_samplers.c \
compiler/nir/nir_lower_system_values.c \
compiler/nir/nir_lower_to_source_mods.c \
compiler/nir/nir_lower_tex.c \
compiler/nir/nir_lower_vars_to_ssa.c \
compiler/nir/nir_lower_var_copies.c \
compiler/nir/nir_lower_vec_to_movs.c \
compiler/nir/nir_metadata.c \
compiler/nir/nir_move_vec_src_uses_to_dest.c \
compiler/nir/nir_normalize_cubemap_coords.c \
compiler/nir/nir_opcodes.c \
compiler/nir/nir_opt_algebraic.c \
compiler/nir/nir_opt_constant_folding.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_peephole_select.c \
compiler/nir/nir_opt_remove_phis.c \
compiler/nir/nir_opt_undef.c \
compiler/nir/nir_print.c \
compiler/nir/nir_remove_dead_variables.c \
compiler/nir/nir_search.c \
compiler/nir/nir_split_var_copies.c \
compiler/nir/nir_sweep.c \
compiler/nir/nir_to_ssa.c \
compiler/nir/nir_worklist.c
NIR_CXX = \
nir/glsl_to_nir.cpp
SRC_C = \
$(MAIN_ES_FILES) \
$(MAIN_FILES) \
$(MATH_FILES) \
$(MAPI_FILES) \
$(MATH_XFORM_FILES) \
$(VBO_FILES) \
$(TNL_FILES) \
$(SWRAST_FILES) \
$(SWRAST_SETUP_FILES) \
$(COMMON_DRIVER_FILES) \
$(ASM_C_FILES) \
$(PROGRAM) \
$(UTIL) \
$(GLSL) \
$(LIBCOMPILER) \
$(DRI) \
$(NIR)
SRC_CC = $(MAIN_FILES_CC) $(GLSL_CXX) $(LIBCOMPILER_CXX) $(PROGRAM_CXX) $(NIR_CXX)
CC_OPT += -DPACKAGE_VERSION=\"11.2.2\" \
-DPACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\" \
-DMAPI_ABI_HEADER=\"glapi/glapi_mapi_tmp.h\" \
-DMAPI_MODE_BRIDGE
#XXX: for debugging
CC_OPT += -gdwarf-2
CC_C_OPT += -std=c99
CC_CXX_OPT += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
#
# special flags
#
CC_OPT_glsl/linker = -D__BSD_VISIBLE
CC_OPT_compiler/nir/nir_from_ssa = -D__BSD_VISIBLE -DFFS_DEFINED=1
CC_OPT_compiler/nir/nir_instr_set = -D__BSD_VISIBLE -DFFS_DEFINED=1
CC_OPT_compiler/nir/nir_liveness = -D__BSD_VISIBLE -DFFS_DEFINED=1
CC_OPT_compiler/nir/nir_lower_vars_to_ssa = -D__BSD_VISIBLE -DFFS_DEFINED=1
vpath %.c $(MESA_SRC_DIR)
vpath %.cpp $(MESA_SRC_DIR)
vpath %.c $(MESA_PORT_DIR)/src
vpath %.cpp $(MESA_PORT_DIR)/src/compiler
vpath %.c $(MESA_PORT_DIR)/src/compiler
# vi: set ft=make :

View File

@ -1,3 +0,0 @@
# stub mk file
CC_CXX_WARN_STRICT =

View File

@ -1,3 +0,0 @@
include $(REP_DIR)/lib/mk/mesa.inc
CC_CXX_WARN_STRICT =

View File

@ -1,3 +0,0 @@
include $(REP_DIR)/lib/mk/mesa.inc
CC_CXX_WARN_STRICT =

View File

@ -1,3 +0,0 @@
include $(REP_DIR)/lib/mk/mesa.inc
CC_CXX_WARN_STRICT =

View File

@ -1,7 +0,0 @@
include $(REP_DIR)/lib/mk/mesa.inc
ASM_C_FILES += x86-64/x86-64.c
INC_DIR += $(MESA_SRC_DIR)/x86_64
CC_CXX_WARN_STRICT =

View File

@ -1,10 +0,0 @@
LIBS = libc
include $(REP_DIR)/lib/mk/mesa-common.inc
SRC_C = drivers/dri/swrast/swrast.c
INC_DIR += $(MESA_SRC_DIR)/drivers/dri/common
vpath %.c $(MESA_SRC_DIR)
CC_CXX_WARN_STRICT =

View File

@ -1,125 +0,0 @@
_eglAddAtExitCall T
_eglAppendArray T
_eglBindContext T
_eglBindTexImage T
_eglBuiltInDriverDRI2 T
_eglBuiltInDrivers D 32
_eglCheckDisplayHandle T
_eglCheckResource T
_eglChooseConfig T
_eglCleanupDisplay T
_eglCompareConfigs T
_eglCreateArray T
_eglDestroyArray T
_eglDestroyCurrentThread T
_eglEraseArray T
_eglError T
_eglFilterArray T
_eglFilterConfigArray T
_eglFindArray T
_eglFindDisplay T
_eglFiniDisplay T
_eglFlattenArray T
_eglGetAPIContext T
_eglGetConfigAttrib T
_eglGetConfigs T
_eglGetCurrentContext T
_eglGetCurrentThread T
_eglGetDriverProc T
_eglGetNativePlatform T
_eglGetResource T
_eglGetSyncAttrib T
_eglGlobal D 112
_eglInitConfig T
_eglInitContext T
_eglInitDriverFallbacks T
_eglInitImage T
_eglInitResource T
_eglInitSurface T
_eglInitSync T
_eglIsCurrentThreadDummy T
_eglLinkConfig T
_eglLinkResource T
_eglLog T
_eglLookupConfig T
_eglMatchConfig T
_eglMatchDriver T
_eglParseConfigAttribList T
_eglParseImageAttribList T
_eglPutResource T
_eglQueryContext T
_eglQuerySurface T
_eglReleaseDisplayResources T
_eglReleaseTexImage T
_eglSetLogLevel T
_eglSetLogProc T
_eglSurfaceAttrib T
_eglSwapInterval T
_eglUnlinkResource T
_eglUnloadDrivers T
_eglValidateConfig T
blit T
dri2_add_config T
dri2_create_image_khr T
dri2_create_screen T
dri2_flush_drawable_for_swapbuffers T
dri2_genode_create_pixmap_surface T
dri2_genode_create_window_surface T
dri2_genode_destroy_surface T
dri2_genode_swap_interval T
dri2_get_dri_config T
dri2_initialize_genode T
dri2_load_driver T
dri2_load_driver_dri3 T
dri2_load_driver_swrast T
dri2_lookup_egl_image T
dri2_setup_screen T
dri2_surface_get_dri_drawable T
dri2_to_egl_attribute_map D 196
eglBindAPI T
eglBindTexImage T
eglChooseConfig T
eglClientWaitSync T
eglCopyBuffers T
eglCreateContext T
eglCreateImage T
eglCreatePbufferFromClientBuffer T
eglCreatePbufferSurface T
eglCreatePixmapSurface T
eglCreatePlatformPixmapSurface T
eglCreatePlatformWindowSurface T
eglCreateSync T
eglCreateWindowSurface T
eglDestroyContext T
eglDestroyImage T
eglDestroySurface T
eglDestroySync T
eglGetConfigAttrib T
eglGetConfigs T
eglGetCurrentContext T
eglGetCurrentDisplay T
eglGetCurrentSurface T
eglGetDisplay T
eglGetError T
eglGetPlatformDisplay T
eglGetProcAddress T
eglGetSyncAttrib T
eglInitialize T
eglMakeCurrent T
eglQueryAPI T
eglQueryContext T
eglQueryString T
eglQuerySurface T
eglReleaseTexImage T
eglReleaseThread T
eglSurfaceAttrib T
eglSwapBuffers T
eglSwapInterval T
eglTerminate T
eglWaitClient T
eglWaitGL T
eglWaitNative T
eglWaitSync T
genode_blit T
image_lookup_extension D 24
use_invalidate D 16

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
6835d67506c800140e54b384baa5b070c8e48aeb

View File

@ -1,84 +0,0 @@
LICENSE := GPLv2
VERSION := 11.2.2
DOWNLOADS := mesa.archive
URL_BASE := https://mesa.freedesktop.org/archive/older-versions
URL(mesa) := $(URL_BASE)/11.x/$(VERSION)/mesa-$(VERSION).tar.gz
SHA(mesa) := e2453014cd2cc5337a5180cdeffe8cf24fffbb83e20a96888e2b01df868eaae6
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/egl.patch
PATCH_OPT := -p1
DIRS := include
DIR_CONTENT(include) = $(wildcard src/lib/mesa/include/*)
#
# Check for tools
#
$(call check_tool,bison)
$(call check_tool,flex)
$(call check_tool,python)
#
# Determine python version to use
#
PYTHON := $(notdir $(lastword $(shell which python2 $(addprefix python2.,4 5 6 7 8))))
ifeq ($(PYTHON),)
default: python_not_installed
python_not_installed:
$(error mesa requires python2)
endif
#
# Generate files
#
generated_files = src/lib/mesa/src/compiler/glsl/glsl_parser.cpp \
src/lib/mesa/src/compiler/glsl/glsl_lexer.cpp \
src/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c \
src/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c \
src/lib/mesa/src/mesa/program/program_parse.tab.c \
src/lib/mesa/src/mesa/program/lex.yy.c \
src/lib/mesa/src/mapi/shared-glapi/glapi_mapi_tmp.h \
src/lib/mesa/src/compiler/glsl/glsl_parser.cpp:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)bison -o $@ -p "_mesa_glsl_" \
--defines=$(@D)/glsl_parser.h $(@D)/glsl_parser.yy
src/lib/mesa/src/compiler/glsl/glsl_lexer.cpp:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)flex -o $@ $(@D)/glsl_lexer.ll
src/lib/mesa/src/compiler/glsl/glcpp/glcpp-parse.c:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)bison -o $@ -p "glcpp_parser_" --defines=$(@D)/glcpp-parse.h \
$(@D)/glcpp-parse.y
src/lib/mesa/src/compiler/glsl/glcpp/glcpp-lex.c:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)flex -o $@ $(@D)/glcpp-lex.l
src/lib/mesa/src/mesa/program/program_parse.tab.c:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)bison -o $@ -p "_mesa_program_" --defines=$(@D)/program_parse.tab.h \
$(@D)/program_parse.y
src/lib/mesa/src/mesa/program/lex.yy.c:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)flex -o $@ $(@D)/program_lexer.l
src/lib/mesa/src/mapi/shared-glapi/glapi_mapi_tmp.h:
@$(MSG_GENERATE)$(notdir $@)
$(VERBOSE)mkdir -p $(@D)
$(VERBOSE)$(PYTHON) $(@D)/../mapi_abi.py --mode lib --printer shared-glapi \
$(@D)/../glapi/gen/gl_and_es_API.xml > $@
default: $(DOWNLOADS) $(generated_files)
# vi: set ft=make :

View File

@ -1,11 +0,0 @@
content: include LICENSE
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/egl_api)
include:
mkdir $@
cp -r $(PORT_DIR)/include/* $@
cp -r $(REP_DIR)/include/EGL $@
LICENSE:
grep '\*\*' $(PORT_DIR)/include/EGL/egl.h >$@

View File

@ -1 +0,0 @@
2019-02-25 cc7c73294a6f048afb445c9383fbf5635d38e329

View File

@ -1,22 +0,0 @@
MIRROR_FROM_REP_DIR := lib/import/import-mesa.mk \
lib/symbols/egl \
lib/symbols/mesa
content: $(MIRROR_FROM_REP_DIR)
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mesa)
content: include
include:
mkdir -p $@
cp -r $(PORT_DIR)/include/* $@
cp -r $(REP_DIR)/include/EGL $@
content: LICENSE
LICENSE:
cp $(PORT_DIR)/src/lib/mesa/docs/COPYING $@

View File

@ -1 +0,0 @@
2019-02-25 62999e1a7be37e39e64720fc75c3feb611139da7

View File

@ -1 +0,0 @@
mesa

View File

@ -1,38 +0,0 @@
MIRROR_FROM_REP_DIR := lib/mk/egl.mk \
lib/mk/egl_i965.mk \
lib/mk/egl_swrast.mk \
lib/mk/glapi.mk \
lib/mk/i965.mk \
lib/mk/mesa.inc \
lib/mk/mesa_api.mk \
lib/mk/mesa-common.inc \
lib/mk/spec/arm/mesa.mk \
lib/mk/spec/arm_64/mesa.mk \
lib/mk/spec/x86_32/mesa.mk \
lib/mk/spec/x86_64/mesa.mk \
lib/mk/swrast.mk \
src/lib/mesa
content: $(MIRROR_FROM_REP_DIR) src/lib/mesa/target.mk
$(MIRROR_FROM_REP_DIR):
$(mirror_from_rep_dir)
src/lib/mesa/target.mk:
mkdir -p $(dir $@)
echo "LIBS = mesa" > $@
PORT_DIR := $(call port_dir,$(REP_DIR)/ports/mesa)
MIRROR_FROM_PORT_DIR := src/lib/mesa/src \
content: $(MIRROR_FROM_PORT_DIR)
$(MIRROR_FROM_PORT_DIR):
mkdir -p $(dir $@)
cp -r $(PORT_DIR)/$@ $(dir $@)
content: LICENSE
LICENSE:
cp $(PORT_DIR)/src/lib/mesa/docs/COPYING $@

View File

@ -1 +0,0 @@
2021-08-08 7b15434ecde0e7653bc274c69eb0b698e1147f61

View File

@ -1,9 +0,0 @@
base
blit
drm
expat
gpu_session
libc
os
stdcxx
timer_session

View File

@ -1,20 +0,0 @@
set demo_component test/mesa_demo/gears
set demo_binary gears
set demo_ram_quota 32M
set demo_caps 200
set demo_config {
<config ld_verbose="true">
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc" />
<vfs>
<dir name="dev">
<log/> <inline name="rtc">2000-01-01 00:00</inline>
</dir>
</vfs>
</config>}
set demo_modules {
gears
}
source ${genode_dir}/repos/libports/run/mesa.inc

View File

@ -1,2 +0,0 @@
set use_i965 0
source ${genode_dir}/repos/libports/run/mesa-gears.inc

View File

@ -1,2 +0,0 @@
set use_i965 1
source ${genode_dir}/repos/libports/run/mesa-gears.inc

View File

@ -1,18 +0,0 @@
set demo_component test/mesa_demo/triangle_gl
set demo_binary triangle_gl
set demo_ram_quota 32M
set demo_caps 200
set demo_config {
<config ld_verbose="true">
<libc stdout="/dev/log" stderr="/dev/log"/>
<vfs>
<dir name="dev"> <log/> </dir>
</vfs>
</config>}
set demo_modules {
triangle_gl
}
source ${genode_dir}/repos/libports/run/mesa.inc

View File

@ -1,2 +0,0 @@
set use_i965 0
source ${genode_dir}/repos/libports/run/mesa-triangle_gl.inc

View File

@ -1,2 +0,0 @@
set use_i965 1
source ${genode_dir}/repos/libports/run/mesa-triangle_gl.inc

View File

@ -1,172 +0,0 @@
if {[have_spec linux] && $use_i965} {
puts "i965 driver not supported on Linux."
exit 1
}
if {[have_include power_on/qemu] && $use_i965} {
puts "i965 driver not supported in Qemu."
exit 1
}
create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/[drivers_interactive_pkg] \
[depot_user]/src/nitpicker \
[depot_user]/src/demo \
[depot_user]/src/init
set build_components {
drivers/gpu/intel
lib/mesa/swrast
}
lappend_if $use_i965 build_components lib/mesa/i965
lappend build_components $demo_component
build $build_components
set config {
<config prio_levels="2">
<parent-provides>
<service name="CPU"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="LOG"/>
<service name="PD"/>
<service name="RM"/>
<service name="ROM"/>
</parent-provides>
<default caps="100"/>
<default-route>
<any-service> <parent/> <any-child/> </any-service>
</default-route>
<start name="timer">
<resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides>
</start>
<start name="drivers" caps="1500" managing_system="yes">
<resource name="RAM" quantum="64M"/>
<binary name="init"/>
<route>
<service name="ROM" label="config"> <parent label="drivers.config"/> </service>
<service name="Timer"> <child name="timer"/> </service>
<service name="Capture"> <child name="nitpicker"/> </service>
<service name="Event"> <child name="nitpicker"/> </service>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="nitpicker" caps="200">
<resource name="RAM" quantum="2M"/>
<provides>
<service name="Gui"/> <service name="Capture"/> <service name="Event"/>
</provides>
<config>
<capture/> <event/>
<domain name="pointer" layer="1" content="client" label="no" origin="pointer" />
<domain name="default" layer="2" content="client" label="no" focus="click" hover="always" />
<policy label_prefix="pointer" domain="pointer"/>
<default-policy domain="default"/>
</config>
<route><any-service><parent/><any-child/></any-service></route>
</start>
<start name="pointer">
<resource name="RAM" quantum="1M"/>
</start>}
set backend_library egl_swrast.lib.so
if {$use_i965} {
set backend_library egl_i965.lib.so
}
set launchpad_config {
<config>
<launcher name="init" ram_quota="1G" caps="2000">
<config verbose="yes">
<parent-provides>
<service name="ROM"/>
<service name="IRQ"/>
<service name="IO_MEM"/>
<service name="IO_PORT"/>
<service name="PD"/>
<service name="RM"/>
<service name="CPU"/>
<service name="LOG"/>
<service name="Gui"/>
<service name="Timer"/>
<service name="Gpu"/>
</parent-provides>
<start name="liquid_fb" caps="200">
<resource name="RAM" quantum="16M"/>
<provides> <service name="Framebuffer"/> <service name="Input"/> </provides>
<config resize_handle="off" animate="off" title="gears" width="600" height="600" xpos="100" ypos="100"/>
<route>
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>}
append launchpad_config "
<start name=\"$demo_binary\" caps=\"$demo_caps\">
<resource name=\"RAM\" quantum=\"$demo_ram_quota\"/>"
append launchpad_config $demo_config
append launchpad_config "
<route>
<service name=\"ROM\" label=\"egl_drv.lib.so\">
<parent label=\"$backend_library\"/>
</service>"
append launchpad_config {
<any-service> <parent/> <any-child/> </any-service>
</route>
</start>
</config>
</launcher>
</config>}
append config {
<start name="launchpad" caps="512">
<resource name="RAM" quantum="512M"/>}
append config $launchpad_config
append config {
</start>}
append_if $use_i965 config {
<start name="intel_fb_drv" caps="200">
<binary name="intel_gpu_drv"/>
<resource name="RAM" quantum="40M"/>
<provides> <service name="Gpu"/> </provides>
<route>
<any-service> <parent /> <any-child/> </any-service>
</route>
</start>}
append config {
</config>}
install_config $config
set boot_modules {
libc.lib.so vfs.lib.so libm.lib.so
egl.lib.so mesa.lib.so stdcxx.lib.so
expat.lib.so glapi.lib.so
egl_swrast.lib.so
}
append_if $use_i965 boot_modules {
egl_i965.lib.so drm.lib.so
intel_gpu_drv
}
append boot_modules $demo_modules
build_boot_image $boot_modules
append qemu_args " -m 768"
run_genode_until forever

View File

@ -1,26 +0,0 @@
/**
* \brief Genode C bindings for EGL back end
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/* needed since there exists a 'util/list.h' in mesa */
#include <../include/util/list.h>
#include <blit/blit.h>
#include <base/log.h>
extern "C" {
#include <platform.h>
}
void genode_blit(void const *src, unsigned src_w, void *dst, unsigned dst_w, int w, int h)
{
blit(src, src_w, dst, dst_w, w, h);
}

View File

@ -1,187 +0,0 @@
/**
* \brief Generic EGL-DRI2 back end
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/*
* Mesa
*/
#include <egl_dri2.h>
#include <egl_dri2_fallbacks.h>
#include <drivers/dri/common/utils.h>
/*
* Libc
*/
#include <string.h>
#include <dlfcn.h>
#include <unistd.h>
/*
* Local
*/
#include <platform.h>
EGLBoolean dri2_genode_swap_interval(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval)
{
if (interval > surf->Config->MaxSwapInterval)
interval = surf->Config->MaxSwapInterval;
else if (interval < surf->Config->MinSwapInterval)
interval = surf->Config->MinSwapInterval;
surf->SwapInterval = interval;
return EGL_TRUE;
}
static _EGLSurface *
_create_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list,
enum Surface_type type)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_config *dri2_conf = dri2_egl_config(conf);
struct Genode_egl_window *window = native_window;
struct Genode_egl_window *window_dynamic;
struct dri2_egl_surface *dri2_surf;
const __DRIconfig *config;
window->type = type;
dri2_surf = calloc(1, sizeof *dri2_surf);
if (type == PIXMAP) {
window_dynamic = calloc(1, sizeof(struct Genode_egl_window));
*window_dynamic = *window;
window = window_dynamic;
}
if (!dri2_surf)
{
_eglError(EGL_BAD_ALLOC, "dri2_create_surface");
return NULL;
}
if (!_eglInitSurface(&dri2_surf->base, disp, EGL_WINDOW_BIT, conf, attrib_list))
goto cleanup_surf;
dri2_surf->g_win = window;
dri2_surf->base.Width = window->width;;
dri2_surf->base.Height = window->height;
config = dri2_get_dri_config(dri2_conf, EGL_WINDOW_BIT,
dri2_surf->base.GLColorspace);
if (dri2_dpy->dri2) {
dri2_surf->dri_drawable = (*dri2_dpy->dri2->createNewDrawable)(dri2_dpy->dri_screen, config,
dri2_surf);
/* create back buffer image */
dri2_surf->back_image = dri2_dpy->image->createImage(dri2_dpy->dri_screen,
dri2_surf->base.Width,
dri2_surf->base.Height,
__DRI_IMAGE_FORMAT_ARGB8888,
dri2_dpy->is_different_gpu ?
0 : __DRI_IMAGE_USE_SHARE,
NULL);
} else {
assert(dri2_dpy->swrast);
dri2_surf->dri_drawable =
(*dri2_dpy->swrast->createNewDrawable)(dri2_dpy->dri_screen,
config, dri2_surf);
}
if (dri2_surf->dri_drawable == NULL)
{
_eglError(EGL_BAD_ALLOC, "swrast->createNewDrawable");
goto cleanup_dri_drawable;
}
dri2_genode_swap_interval(drv, disp, &dri2_surf->base,
dri2_dpy->default_swap_interval);
return &dri2_surf->base;
cleanup_dri_drawable:
dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
cleanup_surf:
if (type == PIXMAP)
free(window_dynamic);
free(dri2_surf);
return NULL;
}
_EGLSurface *
dri2_genode_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list)
{
return _create_surface(drv, disp, conf, native_window, attrib_list, WINDOW);
}
_EGLSurface*
dri2_genode_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *dpy,
_EGLConfig *conf, void *native_pixmap,
const EGLint *attrib_list)
{
return _create_surface(drv, dpy, conf, native_pixmap, attrib_list, PIXMAP);
}
EGLBoolean
dri2_genode_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(surf);
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct Genode_egl_window *window = dri2_surf->g_win;
if (!_eglPutSurface(surf)) {
return EGL_TRUE;
}
dri2_dpy->core->destroyDrawable(dri2_surf->dri_drawable);
if (dri2_surf->back_image)
dri2_dpy->image->destroyImage(dri2_surf->back_image);
if (window->type == PIXMAP)
free(window);
free(dri2_surf);
return EGL_TRUE;
}
EGLBoolean dri2_initialize_genode(_EGLDriver *drv, _EGLDisplay *disp)
{
void *handle;
if (!(handle = dlopen("egl_drv.lib.so", 0))) {
printf("Error: could not open EGL back end driver ('egl_drv.lib.so')\n");
return EGL_FALSE;
}
typedef EGLBoolean (*genode_backend)(_EGLDriver *, _EGLDisplay *);
genode_backend init = (genode_backend)dlsym(handle, "dri2_initialize_genode_backend");
if (!init) {
printf("Error: could not find 'dri2_initialize_genode_backend'\n");
return EGL_FALSE;
}
return init(drv, disp);
}

File diff suppressed because it is too large Load Diff

View File

@ -1,27 +0,0 @@
/**
* \brief DRM bindings
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#include <drivers/dri/i965/intel_image.h>
void *genode_map_image(__DRIimage *image)
{
/* map read only */
drm_intel_bo_map(image->bo, false);
return image->bo->virtual;
}
void genode_unmap_image(__DRIimage *image)
{
drm_intel_bo_unmap(image->bo);
}

View File

@ -1,34 +0,0 @@
/**
* \brief Initialize DRM libraries session interface
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#include <../include/util/list.h>
#include <base/env.h>
extern "C" {
#include <platform.h>
}
extern Genode::Entrypoint &genode_entrypoint();
extern void drm_init(Genode::Env &env, Genode::Entrypoint &ep);
void genode_drm_init()
{
drm_init(*genode_env, genode_entrypoint());
}
extern void drm_complete();
void genode_drm_complete()
{
drm_complete();
}

View File

@ -1,253 +0,0 @@
/**
* \brief Intel GPU EGL-DRI2 back end
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/*
* Mesa
*/
#include <egl_dri2.h>
#include <egl_dri2_fallbacks.h>
#include <drivers/dri/common/utils.h>
/*
* Libc
*/
#include <dlfcn.h>
/*
* Local
*/
#include <bo_map.h>
#include <platform.h>
static int stride(int value)
{
/* 32-bit RGB888 */
return value * 4;
}
typedef void *(*mem_copy_fn)(void *dest, const void *src, size_t n);
extern void
tiled_to_linear(uint32_t xt1, uint32_t xt2,
uint32_t yt1, uint32_t yt2,
char *dst, const char *src,
int32_t dst_pitch, uint32_t src_pitch,
bool has_swizzling,
uint32_t tiling,
mem_copy_fn mem_copy);
static void
dri2_genode_put_image(__DRIdrawable * draw, int op,
int x, int y, int w, int h,
char *data, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dri2_surf->base.Resource.Display);
struct Genode_egl_window *window = dri2_surf->g_win;
unsigned char *dst = window->addr;
int src_stride;
int dst_stride = stride(dri2_surf->base.Width);
dri2_dpy->image->queryImage(dri2_surf->back_image, __DRI_IMAGE_ATTRIB_STRIDE, &src_stride);
/* copy to frame buffer and refresh */
tiled_to_linear(0, dst_stride,
0, h,
(char *)dst, data,
dst_stride, src_stride,
false, 1, memcpy);
}
static EGLBoolean
dri2_genode_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
genode_drm_complete();
void *data = genode_map_image(dri2_surf->back_image);
dri2_genode_put_image(dri2_surf->dri_drawable, 0, 0, 0,
dri2_surf->base.Width, dri2_surf->base.Height,
(char *)data, (void *)dri2_surf);
genode_unmap_image(dri2_surf->back_image);
return EGL_TRUE;
}
/*
* platform functions
*/
static struct dri2_egl_display_vtbl dri2_genode_display_vtbl = {
.authenticate = NULL,
.create_window_surface = dri2_genode_create_window_surface,
.create_pixmap_surface = dri2_genode_create_pixmap_surface,
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
.destroy_surface = dri2_genode_destroy_surface,
.create_image = dri2_fallback_create_image_khr,
.swap_interval = dri2_genode_swap_interval,
.swap_buffers = dri2_genode_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
.swap_buffers_region = dri2_fallback_swap_buffers_region,
.post_sub_buffer = dri2_fallback_post_sub_buffer,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
static __DRIbuffer *
dri2_genode_get_buffers(__DRIdrawable * driDrawable,
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
_eglError(EGL_BAD_PARAMETER, "dri2_genode_get_buffers not implemented");
return NULL;
}
static void
dri2_genode_flush_front_buffer(__DRIdrawable * driDrawable, void *loaderPrivate)
{
_eglError(EGL_BAD_PARAMETER, "dri2_genode_flush_front_buffer not implemented");
}
static void
back_bo_to_dri_buffer(struct dri2_egl_surface *dri2_surf, __DRIbuffer *buffer)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(dri2_surf->base.Resource.Display);
__DRIimage *image;
int name, pitch;
image = dri2_surf->back_image;
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_NAME, &name);
dri2_dpy->image->queryImage(image, __DRI_IMAGE_ATTRIB_STRIDE, &pitch);
buffer->attachment = __DRI_BUFFER_BACK_LEFT;
buffer->name = name;
buffer->pitch = pitch;
buffer->cpp = 4;
buffer->flags = 0;
}
static __DRIbuffer *
dri2_genode_get_buffers_with_format(__DRIdrawable * driDrawable,
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
int i, j;
for (i = 0, j = 0; i < 2 * count; i += 2, j++) {
switch (attachments[i]) {
case __DRI_BUFFER_BACK_LEFT:
back_bo_to_dri_buffer(dri2_surf, &dri2_surf->buffers[j]);
break;
default:
// if (get_aux_bo(dri2_surf, attachments[i], attachments[i + 1],
// &dri2_surf->buffers[j]) < 0) {
// _eglError(EGL_BAD_ALLOC, "failed to allocate aux buffer");
// return NULL;
// }
printf("ERROR: not implemented\n");
while (1);
break;
}
}
*out_count = j;
if (j == 0)
return NULL;
*width = dri2_surf->base.Width;
*height = dri2_surf->base.Height;
return dri2_surf->buffers;
}
EGLBoolean
dri2_initialize_genode_backend(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
static unsigned rgb888_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
int i;
/* initialize DRM back end */
genode_drm_init();
dri2_dpy = calloc(1, sizeof *dri2_dpy);
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
dri2_dpy->fd = -1;
dri2_dpy->driver_name = strdup("i965");
disp->DriverData = (void *)dri2_dpy;
dri2_dpy->vtbl = &dri2_genode_display_vtbl;
if (!dri2_load_driver(disp))
goto cleanup_dpy;
dri2_dpy->dri2_major = 2;
dri2_dpy->dri2_minor = __DRI_DRI2_VERSION;
dri2_dpy->dri2_loader_extension.base.name = __DRI_DRI2_LOADER;
dri2_dpy->dri2_loader_extension.base.version = 3;
dri2_dpy->dri2_loader_extension.getBuffers = dri2_genode_get_buffers;
dri2_dpy->dri2_loader_extension.flushFrontBuffer = dri2_genode_flush_front_buffer;
dri2_dpy->dri2_loader_extension.getBuffersWithFormat = dri2_genode_get_buffers_with_format;
dri2_dpy->extensions[0] = &dri2_dpy->dri2_loader_extension.base;
dri2_dpy->extensions[1] = &image_lookup_extension.base;
dri2_dpy->extensions[2] = NULL;
dri2_dpy->swap_available = (dri2_dpy->dri2_minor >= 2);
dri2_dpy->invalidate_available = (dri2_dpy->dri2_minor >= 3);
if (!dri2_create_screen(disp))
goto close_screen;
EGLint attrs[] = {
EGL_DEPTH_SIZE, 0, /* set in loop below (from DRI config) */
EGL_NATIVE_VISUAL_TYPE, 0,
EGL_NATIVE_VISUAL_ID, 0,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_NONE };
for (i = 1; dri2_dpy->driver_configs[i]; i++) {
/* set depth size in attrs */
attrs[1] = dri2_dpy->driver_configs[i]->modes.depthBits;
dri2_add_config(disp, dri2_dpy->driver_configs[i], i, EGL_WINDOW_BIT, attrs, rgb888_masks);
}
return EGL_TRUE;
close_screen:
dlclose(dri2_dpy->driver);
cleanup_dpy:
free(dri2_dpy);
return EGL_FALSE;
}

View File

@ -1,4 +0,0 @@
TARGET = dummy-egl_i965
LIBS = egl_i965
CC_CXX_WARN_STRICT =

View File

@ -1,20 +0,0 @@
/**
* \brief DRM bindings
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _BO_MAP_H_
#define _BO_MAP_H_
void *genode_map_image(__DRIimage *image);
void genode_unmap_image(__DRIimage *image);
#endif /* _BO_MAP_H_ */

View File

@ -1,20 +0,0 @@
/**
* \brief FreeBSD definitions for mesa
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _INCLUDE__OSRELDATE_H_
#define _INCLUDE__OSRELDATE_H_
#undef __FreeBSD_version
#define __FreeBSD_version 802000
#endif /* _INCLUDE__OSRELDATE_H_ */

View File

@ -1,50 +0,0 @@
/**
* \brief Platform C/C++ inteface
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
#ifndef _PLATFORM_H_
#define _PLATFORM_H_
#ifdef __cplusplus
namespace Genode { class Env; }
extern Genode::Env *genode_env;
#endif
#include <EGL/egl.h>
struct Genode_egl_window;
void genode_blit(void const *src, unsigned src_w, void *dst, unsigned dst_w, int w, int h);
void genode_drm_init();
void genode_drm_complete();
struct _EGLSurface;
struct _EGLDriver;
struct _EGLConfig;
struct _EGLDisplay;
_EGLSurface *
dri2_genode_create_window_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list);
EGLBoolean
dri2_genode_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf);
_EGLSurface *
dri2_genode_create_pixmap_surface(_EGLDriver *drv, _EGLDisplay *disp,
_EGLConfig *conf, void *native_window,
const EGLint *attrib_list);
EGLBoolean
dri2_genode_swap_interval(_EGLDriver *drv, _EGLDisplay *disp,
_EGLSurface *surf, EGLint interval);
#endif

View File

@ -1,99 +0,0 @@
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 8f50f0c..b4a7bc1 100644
--- a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.c
@@ -450,7 +450,7 @@ dri2_open_driver(_EGLDisplay *disp)
#endif
if (dri2_dpy->driver == NULL) {
snprintf(path, sizeof path,
- "%.*s/%s_dri.so", len, p, dri2_dpy->driver_name);
+ "egl_%s.lib.so",dri2_dpy->driver_name);
dri2_dpy->driver = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
if (dri2_dpy->driver == NULL)
_eglLog(_EGL_DEBUG, "failed to open %s: %s\n", path, dlerror());
@@ -791,6 +791,12 @@ dri2_initialize(_EGLDriver *drv, _EGLDisplay *disp)
return EGL_TRUE;
return dri2_initialize_android(drv, disp);
#endif
+#ifdef HAVE_GENODE_PLATFORM
+ case _EGL_PLATFORM_GENODE:
+ if (disp->Options.TestOnly)
+ return EGL_TRUE;
+ return dri2_initialize_genode(drv, disp);
+#endif
default:
_eglLog(_EGL_WARNING, "No EGL platform enabled.");
@@ -2530,6 +2536,8 @@ dri2_load(_EGLDriver *drv)
const char *libname = "libglapi.so";
#elif defined(__APPLE__)
const char *libname = "libglapi.0.dylib";
+#elif defined(HAVE_GENODE_PLATFORM)
+ const char *libname = "glapi.lib.so";
#else
const char *libname = "libglapi.so.0";
#endif
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 52ad92b..bb4a1c1 100644
--- a/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/lib/mesa/src/egl/drivers/dri2/egl_dri2.h
@@ -258,6 +258,12 @@ struct dri2_egl_surface
int format;
#endif
+#ifdef HAVE_GENODE_PLATFORM
+ struct Genode_egl_window *g_win;
+ __DRIbuffer *dri_buffers[__DRI_BUFFER_COUNT];
+ __DRIimage *back_image;
+#endif
+
#ifdef HAVE_DRM_PLATFORM
struct gbm_dri_surface *gbm_surf;
#endif
@@ -372,6 +378,9 @@ dri2_initialize_android(_EGLDriver *drv, _EGLDisplay *disp);
EGLBoolean
dri2_initialize_surfaceless(_EGLDriver *drv, _EGLDisplay *disp);
+EGLBoolean
+dri2_initialize_genode(_EGLDriver *drv, _EGLDisplay *disp);
+
void
dri2_flush_drawable_for_swapbuffers(_EGLDisplay *disp, _EGLSurface *draw);
diff --git a/src/lib/mesa/src/egl/main/egldisplay.c b/src/lib/mesa/src/egl/main/egldisplay.c
index f6db03a..36bfad4 100644
--- a/src/lib/mesa/src/egl/main/egldisplay.c
+++ b/src/lib/mesa/src/egl/main/egldisplay.c
@@ -71,6 +71,7 @@ static const struct {
{ _EGL_PLATFORM_ANDROID, "android" },
{ _EGL_PLATFORM_HAIKU, "haiku" },
{ _EGL_PLATFORM_SURFACELESS, "surfaceless" },
+ { _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 008c467..dbdbf4e 100644
--- a/src/lib/mesa/src/egl/main/egldisplay.h
+++ b/src/lib/mesa/src/egl/main/egldisplay.h
@@ -50,6 +50,7 @@ enum _egl_platform_type {
_EGL_PLATFORM_ANDROID,
_EGL_PLATFORM_HAIKU,
_EGL_PLATFORM_SURFACELESS,
+ _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 9569465..be0bdbb 100644
--- a/src/lib/mesa/src/egl/main/egllog.c
+++ b/src/lib/mesa/src/egl/main/egllog.c
@@ -45,7 +45,7 @@
#include "egllog.h"
#define MAXSTRING 1000
-#define FALLBACK_LOG_LEVEL _EGL_WARNING
+#define FALLBACK_LOG_LEVEL _EGL_DEBUG
static struct {

View File

@ -1,214 +0,0 @@
/**
* \brief Software EGL-DRI2 back end
* \author Sebastian Sumpf
* \date 2017-08-17
*/
/*
* Copyright (C) 2017 Genode Labs GmbH
*
* This file is part of the Genode OS framework, which is distributed
* under the terms of the GNU Affero General Public License version 3.
*/
/*
* Mesa
*/
#include <egl_dri2.h>
#include <egl_dri2_fallbacks.h>
#include <drivers/dri/common/utils.h>
/*
* Libc
*/
#include <string.h>
#include <dlfcn.h>
/*
* Local
*/
#include <platform.h>
static int stride(int value)
{
/* 32-bit RGB888 */
return value * 4;
}
static EGLBoolean
dri2_genode_swrast_swap_buffers(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *draw)
{
struct dri2_egl_display *dri2_dpy = dri2_egl_display(disp);
struct dri2_egl_surface *dri2_surf = dri2_egl_surface(draw);
dri2_dpy->core->swapBuffers(dri2_surf->dri_drawable);
return EGL_TRUE;
}
static struct dri2_egl_display_vtbl dri2_genode_display_vtbl = {
.authenticate = NULL,
.create_window_surface = dri2_genode_create_window_surface,
.create_pixmap_surface = dri2_genode_create_pixmap_surface,
.create_pbuffer_surface = dri2_fallback_create_pbuffer_surface,
.destroy_surface = dri2_genode_destroy_surface,
.create_image = dri2_fallback_create_image_khr,
.swap_interval = dri2_genode_swap_interval,
.swap_buffers = dri2_genode_swrast_swap_buffers,
.swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
.swap_buffers_region = dri2_fallback_swap_buffers_region,
.post_sub_buffer = dri2_fallback_post_sub_buffer,
.copy_buffers = dri2_fallback_copy_buffers,
.query_buffer_age = dri2_fallback_query_buffer_age,
.get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
static void
dri2_genode_swrast_get_image(__DRIdrawable * read,
int x, int y, int w, int h,
char *data, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
struct Genode_egl_window *window = dri2_surf->g_win;
unsigned char * src = window->addr;
int src_stride = stride(dri2_surf->base.Width);
int copy_width = stride(w);
int x_offset = stride(x);
int dst_stride = copy_width;
assert(data != (char *)src);
src += x_offset;
src += y * src_stride;
/* copy width over stride boundary */
if (copy_width > src_stride - x_offset)
copy_width = src_stride - x_offset;
/* limit height */
if (h > dri2_surf->base.Height - y)
h = dri2_surf->base.Height - y;
/* copy to surface */
genode_blit(src, src_stride, data, dst_stride, copy_width, h);
}
static void
dri2_genode_swrast_put_image(__DRIdrawable * draw, int op,
int x, int y, int w, int h,
char *data, void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
struct Genode_egl_window *window = dri2_surf->g_win;
unsigned char * dst = window->addr;
int dst_stride = stride(dri2_surf->base.Width);
int copy_width = stride(w);
int x_offset = stride(x);
int src_stride = copy_width;
dst += x_offset;
dst += y * dst_stride;
/* copy width over stride boundary */
if (copy_width >dst_stride - x_offset)
copy_width = dst_stride - x_offset;
/* limit height */
if (h > dri2_surf->base.Height - y)
h = dri2_surf->base.Height - y;
/* copy to frame buffer and refresh */
genode_blit(data, src_stride, dst, dst_stride, copy_width, h);
}
static void
dri2_genode_swrast_get_drawable_info(__DRIdrawable * draw,
int *x, int *y, int *w, int *h,
void *loaderPrivate)
{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
//XXX: (void) swrast_update_buffers(dri2_surf);
struct Genode_egl_window *window = dri2_surf->g_win;
*x = 0;
*y = 0;
*w = window->width;
*h = window->height;
dri2_surf->base.Width = window->width;
dri2_surf->base.Height = window->height;
}
static EGLBoolean
dri2_initialize_genode_swrast(_EGLDriver *drv, _EGLDisplay *disp)
{
struct dri2_egl_display *dri2_dpy;
static unsigned rgb888_masks[4] = { 0xff0000, 0xff00, 0xff, 0 };
int i;
dri2_dpy = calloc(1, sizeof *dri2_dpy);
if (!dri2_dpy)
return _eglError(EGL_BAD_ALLOC, "eglInitialize");
disp->DriverData = (void *)dri2_dpy;
dri2_dpy->vtbl = &dri2_genode_display_vtbl;
dri2_dpy->fd = -1;
dri2_dpy->driver_name = strdup("swrast");
if (!dri2_load_driver_swrast(disp))
goto close_driver;
dri2_dpy->swrast_loader_extension.base.name = __DRI_SWRAST_LOADER;
dri2_dpy->swrast_loader_extension.base.version = 2;
dri2_dpy->swrast_loader_extension.getDrawableInfo = dri2_genode_swrast_get_drawable_info;
dri2_dpy->swrast_loader_extension.putImage = dri2_genode_swrast_put_image;
dri2_dpy->swrast_loader_extension.getImage = dri2_genode_swrast_get_image;
dri2_dpy->extensions[0] = &dri2_dpy->swrast_loader_extension.base;
dri2_dpy->extensions[1] = NULL;
if (!dri2_create_screen(disp))
goto close_screen;
EGLint attrs[] = {
EGL_DEPTH_SIZE, 0, /* set in loop below (from DRI config) */
EGL_NATIVE_VISUAL_TYPE, 0,
EGL_NATIVE_VISUAL_ID, 0,
EGL_RED_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_BLUE_SIZE, 8,
EGL_NONE };
for (i = 1; dri2_dpy->driver_configs[i]; i++) {
/* set depth size in attrs */
attrs[1] = dri2_dpy->driver_configs[i]->modes.depthBits;
dri2_add_config(disp, dri2_dpy->driver_configs[i], i,
EGL_WINDOW_BIT | EGL_PBUFFER_BIT, attrs,
rgb888_masks);
}
return EGL_TRUE;
close_screen:
dlclose(dri2_dpy->driver);
close_driver:
free(dri2_dpy);
return EGL_FALSE;
}
EGLBoolean dri2_initialize_genode_backend(_EGLDriver *drv, _EGLDisplay *disp)
{
return dri2_initialize_genode_swrast(drv, disp);
}

View File

@ -1,4 +0,0 @@
TARGET = dummy-egl_swrast
LIBS = egl_swrast
CC_CXX_WARN_STRICT =