-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable xmlconfig on Android #8
base: lineage-18.1-mesa-23.3
Are you sure you want to change the base?
Conversation
I don't know why Mesa still block it, but let's put this into good use. This commit includes : - Remove Android availability check on xmlconfig - Include libxml2 into Android.mk - Enable xmlconfig in mesa3d_cross.mk - On Android, /etc/drirc file will move to /vendor/etc/drirc, while /usr/share/drirc.d will move to /data/vendor/drirc.d Signed-off-by: hmtheboy154 <[email protected]>
What do we gain? |
138a2af
to
83be4b2
Compare
Some Android games will check for GPU name & driver and enable optimization/features based on the info. For example in the default config there's this : |
|
Users have to make one on their own in order to apply spoofing to specific application. I hardcode SYSCONFDIR to
It's pretty weird that Rob Clark made this change but haven't made change to support xmlconfig in Android builds. If you check meson.build you can see that it still block Android from building xmlconfig With my change, meson will build with xmlconfig by default and one can easily make an xml and put it under Here's a result I tested back then with AIDA64 : https://t.me/blissx86/196723 |
For instance, this issue is triggered with "piglit/bin/ext_framebuffer_multisample-accuracy all_samples color depthstencil -auto -fbo": Direct leak of 1160 byte(s) in 1 object(s) allocated from: #0 0x7fbe8897d7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7fbe7e7abfcc in rc_constants_copy ../src/gallium/drivers/r300/compiler/radeon_code.c:47 #2 0x7fbe7e7ec902 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:174 #3 0x7fbe7e7e1b22 in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516 #4 0x7fbe7e7e6373 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:591 #5 0x7fbe7e75456e in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1073 #6 0x7fbe7cd2ebe5 in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1070 #7 0x7fbe7cd374b5 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1116 #8 0x7fbe7cd38273 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1281 #9 0x7fbe7cd38273 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345 #10 0x7fbe7d798ca8 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:724 #11 0x7fbe7d798ca8 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:952 #12 0x7fbe7d6790d5 in link_program ../src/mesa/main/shaderapi.c:1336 #13 0x7fbe7d6790d5 in link_program_error ../src/mesa/main/shaderapi.c:1447 ... SUMMARY: AddressSanitizer: 2528456 byte(s) leaked in 1057 allocation(s). Fixes: 54f6e72 ("r300: better register allocator for vertex shaders") Signed-off-by: Patrick Lerda <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27792> (cherry picked from commit 4d00edd)
For instance, this issue is triggered with "piglit/bin/object-namespace-pollution glBitmap program -auto -fbo": Direct leak of 112 byte(s) in 7 object(s) allocated from: #0 0x7f472540e7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f471a9ce18f in rc_remove_unused_constants ../src/gallium/drivers/r300/compiler/radeon_remove_constants.c:101 #2 0x7f471a9b0836 in rc_run_compiler_passes ../src/gallium/drivers/r300/compiler/radeon_compiler.c:476 #3 0x7f471a9b0ad5 in rc_run_compiler ../src/gallium/drivers/r300/compiler/radeon_compiler.c:498 #4 0x7f471a9ec862 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:172 #5 0x7f471a9e1ab2 in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516 #6 0x7f471a9e6303 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:591 #7 0x7f471a9544fe in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1073 #8 0x7f4718f2ebe5 in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1070 #9 0x7f4718f374b5 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1116 #10 0x7f4718f38273 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1281 #11 0x7f4718f38273 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1345 #12 0x7f4718f389e9 in st_program_string_notify ../src/mesa/state_tracker/st_program.c:1378 #13 0x7f47199d9f99 in set_program_string ../src/mesa/main/arbprogram.c:413 Fixes: 1c2c4dd ("r300g: copy the compiler from r300c") Signed-off-by: Patrick Lerda <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27957> (cherry picked from commit 29df857)
…rors For instance, this issue is triggered with "piglit/bin/glslparsertest tests/spec/arb_bindless_texture/compiler/images/arith-bound-image.frag pass 3.30 GL_ARB_bindless_texture GL_ARB_shader_image_load_store": Direct leak of 176 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbe9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7) #1 0x7f84ba7e0801 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4391 #2 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759 #3 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836 #4 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #5 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #6 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #7 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #8 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) Direct leak of 136 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbff57 in operator new(unsigned long) (/usr/lib64/libasan.so.6+0xb2f57) #1 0x7f84b1a5f749 in LLVMCreateBuilderInContext (/usr/local/lib64/libLLVM-17.so+0xc84749) #2 0x7f84ba7817b0 in ac_llvm_context_init ../src/amd/llvm/ac_llvm_build.c:54 #3 0x7f84ba542b7a in si_llvm_context_init ../src/gallium/drivers/radeonsi/si_shader_llvm.c:120 #4 0x7f84ba542b7a in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:832 #5 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #6 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #7 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #8 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #9 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) Indirect leak of 176 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118 #2 0x7f84b81b9fee in rzalloc_size ../src/util/ralloc.c:152 #3 0x7f84b81b9fee in rzalloc_array_size ../src/util/ralloc.c:232 #4 0x7f84b81b05c7 in _mesa_hash_table_init ../src/util/hash_table.c:163 #5 0x7f84b81b05c7 in _mesa_hash_table_create ../src/util/hash_table.c:186 #6 0x7f84ba7e06ae in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4381 #7 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759 #8 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836 #9 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #10 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #11 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #12 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #13 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) Indirect leak of 176 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118 #2 0x7f84b81b9fee in rzalloc_size ../src/util/ralloc.c:152 #3 0x7f84b81b9fee in rzalloc_array_size ../src/util/ralloc.c:232 #4 0x7f84b81b05c7 in _mesa_hash_table_init ../src/util/hash_table.c:163 #5 0x7f84b81b05c7 in _mesa_hash_table_create ../src/util/hash_table.c:186 #6 0x7f84ba7e06e4 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4382 #7 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759 #8 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836 #9 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #10 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #11 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #12 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #13 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) Indirect leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118 #2 0x7f84b81b046c in _mesa_hash_table_create ../src/util/hash_table.c:182 #3 0x7f84ba7e06e4 in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4382 #4 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759 #5 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836 #6 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #7 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #8 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #9 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #10 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) Indirect leak of 128 byte(s) in 1 object(s) allocated from: #0 0x7f84c3fbe7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f84b81b9b3f in ralloc_size ../src/util/ralloc.c:118 #2 0x7f84b81b046c in _mesa_hash_table_create ../src/util/hash_table.c:182 #3 0x7f84ba7e06ae in ac_nir_translate ../src/amd/llvm/ac_nir_to_llvm.c:4381 #4 0x7f84ba53fdf4 in si_llvm_translate_nir ../src/gallium/drivers/radeonsi/si_shader_llvm.c:759 #5 0x7f84ba542bb7 in si_llvm_compile_shader ../src/gallium/drivers/radeonsi/si_shader_llvm.c:836 #6 0x7f84ba337b8e in si_compile_shader ../src/gallium/drivers/radeonsi/si_shader.c:2874 #7 0x7f84ba43a7c1 in si_init_shader_selector_async ../src/gallium/drivers/radeonsi/si_state_shaders.cpp:3176 #8 0x7f84b81c3448 in util_queue_thread_func ../src/util/u_queue.c:309 #9 0x7f84b821ea6a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 #10 0x7f84c2fea38a (/lib64/libc.so.6+0x8438a) SUMMARY: AddressSanitizer: 920 byte(s) leaked in 6 allocation(s). Fixes: d92d35c ("ac/llvm: add a return value to ac_nir_translate") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28099> (cherry picked from commit 0fd907f)
…er path A last memory leak related to constants_remap_table is happening. This memory leak is triggered by two deqp-gles2 tests. For instance, this issue is triggered with "deqp-gles2 --deqp-case=dEQP-GLES2.functional.uniform_api.random.13": Direct leak of 336 byte(s) in 1 object(s) allocated from: #0 0x7f1b4a5de7ef in __interceptor_malloc (/usr/lib64/libasan.so.6+0xb17ef) #1 0x7f1b401a2cdf in rc_remove_unused_constants ../src/gallium/drivers/r300/compiler/radeon_remove_constants.c:101 #2 0x7f1b40185386 in rc_run_compiler_passes ../src/gallium/drivers/r300/compiler/radeon_compiler.c:476 #3 0x7f1b40185625 in rc_run_compiler ../src/gallium/drivers/r300/compiler/radeon_compiler.c:498 #4 0x7f1b401c14d2 in r3xx_compile_fragment_program ../src/gallium/drivers/r300/compiler/r3xx_fragprog.c:172 #5 0x7f1b401b669a in r300_translate_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:516 #6 0x7f1b401baf73 in r300_pick_fragment_shader ../src/gallium/drivers/r300/r300_fs.c:592 #7 0x7f1b40128db7 in r300_create_fs_state ../src/gallium/drivers/r300/r300_state.c:1071 #8 0x7f1b3e67799d in st_create_fp_variant ../src/mesa/state_tracker/st_program.c:1073 #9 0x7f1b3e680285 in st_get_fp_variant ../src/mesa/state_tracker/st_program.c:1119 #10 0x7f1b3e6812fa in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1284 #11 0x7f1b3e6812fa in st_finalize_program ../src/mesa/state_tracker/st_program.c:1363 #12 0x7f1b3f13d501 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:754 #13 0x7f1b3f13d501 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:990 #14 0x7f1b3efeef75 in link_program ../src/mesa/main/shaderapi.c:1336 #15 0x7f1b3efeef75 in link_program_error ../src/mesa/main/shaderapi.c:1445 Fixes: 29df857 ("r300: fix constants_remap_table memory leak") Signed-off-by: Patrick Lerda <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28522> (cherry picked from commit 24a5165)
The pointer "xfb" is allocated with a clone of "so->nir" and lost without further processing. The function panfrost_shader_compile() was the one processing "xfb". The call of this function was removed with the commit 40372bd. This makes "xfb" not required anymore. For instance, this issue is triggered on a Mali-T820 with "piglit/bin/arb_transform_feedback2-change-objects-while-paused -auto": Indirect leak of 32776 byte(s) in 1 object(s) allocated from: #0 0xf78f30a6 in malloc (/usr/lib/libasan.so.6+0x840a6) #1 0xee9cd4ee in ralloc_size ../src/util/ralloc.c:118 #2 0xee9cf7ae in create_slab ../src/util/ralloc.c:801 #3 0xee9cf7ae in gc_alloc_size ../src/util/ralloc.c:840 #4 0xef74ab82 in nir_undef_instr_create ../src/compiler/nir/nir.c:888 #5 0xef76212c in clone_ssa_undef ../src/compiler/nir/nir_clone.c:328 #6 0xef76212c in clone_instr ../src/compiler/nir/nir_clone.c:438 #7 0xef7642d8 in clone_block ../src/compiler/nir/nir_clone.c:501 #8 0xef7642d8 in clone_cf_list ../src/compiler/nir/nir_clone.c:555 #9 0xef7657dc in clone_function_impl ../src/compiler/nir/nir_clone.c:632 #10 0xef766cb8 in nir_shader_clone ../src/compiler/nir/nir_clone.c:743 #11 0xf007673e in panfrost_create_shader_state ../src/gallium/drivers/panfrost/pan_shader.c:434 #12 0xeeb6766c in st_create_common_variant ../src/mesa/state_tracker/st_program.c:781 #13 0xeeb71d1c in st_get_common_variant ../src/mesa/state_tracker/st_program.c:834 #14 0xeeb72ea2 in st_precompile_shader_variant ../src/mesa/state_tracker/st_program.c:1320 #15 0xeeb72ea2 in st_finalize_program ../src/mesa/state_tracker/st_program.c:1421 #16 0xef3806ec in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:748 #17 0xef3806ec in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:984 #18 0xef2992f6 in link_program ../src/mesa/main/shaderapi.c:1336 #19 0xef2992f6 in link_program_error ../src/mesa/main/shaderapi.c:1445 Fixes: 40372bd ("panfrost: Implement a disk cache") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28743> (cherry picked from commit 4f5e9a2)
For instance, this issue is triggered with vs-to-fs-overlap.shader_test -auto -fbo: Direct leak of 24 byte(s) in 1 object(s) allocated from: #0 0x7fe64f58e9a7 in calloc (/usr/lib64/libasan.so.6+0xb19a7) waydroid#1 0x7fe642ca2839 in _mesa_symbol_table_ctor ../src/mesa/program/symbol_table.c:286 waydroid#2 0x7fe642ff003d in gl_nir_cross_validate_outputs_to_inputs ../src/compiler/glsl/gl_nir_link_varyings.c:728 waydroid#3 0x7fe642d7c7d8 in gl_nir_link_glsl ../src/compiler/glsl/gl_nir_linker.c:1357 waydroid#4 0x7fe642be6931 in st_link_glsl_to_nir ../src/mesa/state_tracker/st_glsl_to_nir.cpp:562 waydroid#5 0x7fe642be6931 in st_link_shader ../src/mesa/state_tracker/st_glsl_to_nir.cpp:944 waydroid#6 0x7fe642acab55 in link_program ../src/mesa/main/shaderapi.c:1336 waydroid#7 0x7fe642acab55 in link_program_error ../src/mesa/main/shaderapi.c:1447 waydroid#8 0x7fe6424aa389 in _mesa_unmarshal_LinkProgram src/mapi/glapi/gen/marshal_generated2.c:1911 waydroid#9 0x7fe641fd912b in glthread_unmarshal_batch ../src/mesa/main/glthread.c:139 waydroid#10 0x7fe641f48d48 in util_queue_thread_func ../src/util/u_queue.c:309 waydroid#11 0x7fe641fa442a in impl_thrd_routine ../src/c11/impl/threads_posix.c:67 Fixes: 7d1948e ("glsl: implement cross_validate_outputs_to_inputs() in nir linker") Signed-off-by: Patrick Lerda <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27071> (cherry picked from commit bacace8)
This change handles the case when "vertex_fetch_shader.cso" is null, it implements the previous behavior in this specific case. This situation is happening with clover. For instance, this issue is triggered with "piglit/bin/cl-custom-buffer-flags": ==6467==ERROR: AddressSanitizer: SEGV on unknown address 0x00000000000c (pc 0x7ff92908fe6e bp 0x7ffe86ae5ad0 sp 0x7ffe86ae5a30 T0) ==6467==The signal is caused by a READ memory access. ==6467==Hint: address points to the zero page. #0 0x7ff92908fe6e in evergreen_emit_vertex_buffers ../src/gallium/drivers/r600/evergreen_state.c:2123 #1 0x7ff92908444b in r600_emit_atom ../src/gallium/drivers/r600/r600_pipe.h:627 #2 0x7ff92908444b in compute_emit_cs ../src/gallium/drivers/r600/evergreen_compute.c:798 #3 0x7ff92908444b in evergreen_launch_grid ../src/gallium/drivers/r600/evergreen_compute.c:927 #4 0x7ff9349f9350 in clover::kernel::launch(clover::command_queue&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<unsigned long, std::allocator<unsigned long> > const&) ../src/gallium/frontends/clover/core/kernel.cpp:105 #5 0x7ff9349c331d in std::function<void (clover::event&)>::operator()(clover::event&) const /usr/include/c++/11.4.0/bits/std_function.h:590 #6 0x7ff9349c331d in clover::event::trigger() ../src/gallium/frontends/clover/core/event.cpp:54 #7 0x7ff9349c82f1 in clover::hard_event::hard_event(clover::command_queue&, unsigned int, clover::ref_vector<clover::event> const&, std::function<void (clover::event&)>) ../src/gallium/frontends/clover/core/event.cpp:138 #8 0x7ff9348daa47 in create<clover::hard_event, clover::command_queue&, int, clover::ref_vector<clover::event>&, clEnqueueNDRangeKernel(cl_command_queue, cl_kernel, cl_uint, const size_t*, const size_t*, const size_t*, cl_uint, _cl_event* const*, _cl_event**)::<lambda(clover::event&)> > ../src/gallium/frontends/clover/util/pointer.hpp:241 #9 0x7ff9348daa47 in clEnqueueNDRangeKernel ../src/gallium/frontends/clover/api/kernel.cpp:334 Fixes: 659b7eb ("r600: better tracking for vertex buffer emission") Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10079 Signed-off-by: Patrick Lerda <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29163> (cherry picked from commit f8a1d9f)
I don't know why Mesa still block it, but let's put this into good use. This commit includes :