summaryrefslogtreecommitdiff
path: root/platform/x11
AgeCommit message (Collapse)Author
2019-05-01Fixed game crash, regression of #26977Andrea Catania
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-05-01Merge pull request #27676 from qarmin/small_fixes_2Rémi Verschelde
Small fixes to static analyzer bugs
2019-04-30SCons: Always use env.Prepend for CPPPATHRémi Verschelde
Include paths are processed from left to right, so we use Prepend to ensure that paths to bundled thirdparty files will have precedence over system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30Merge pull request #26977 from bruvzg/fix_x11_window_posRémi Verschelde
Fix get_window_position / set_window_position on Linux
2019-04-29Merge pull request #28061 from guilhermefelipecgs/fix_19137Rémi Verschelde
[Input] Release keys/actions pressed if window loses focus
2019-04-27[Input] Release keys/actions pressed if window loses focusGuilherme Felipe
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com> Co-authored-by: Marcelo Fernandez <marcelofg55@gmail.com>
2019-04-26fix builds made with Clang on some Linux distrosMichele Valente
This is the same as #23542 (Fix binaries incorrectly detected as shared libraries on some linux distros) but for Clang. It should be fine with Clang 4 or higher.
2019-04-25Merge pull request #28402 from Valentactive/add-thinlto-support-x11Rémi Verschelde
Add option to use ThinLTO
2019-04-25add option to use ThinLTOMichele Valente
This adds ThinLTO support when using Clang and the LLD Linker, it's turned off by default. For now only support for Linux added as ThinLTO support on other platforms may still be buggy.
2019-04-24SCons: Review uses of CCFLAGS, CXXFLAGS and CPPFLAGSRémi Verschelde
Many contributors (me included) did not fully understand what CCFLAGS, CXXFLAGS and CPPFLAGS refer to exactly, and were thus not using them in the way they are intended to be. As per the SCons manual: https://www.scons.org/doc/HTML/scons-user/apa.html - CCFLAGS: General options that are passed to the C and C++ compilers. - CFLAGS: General options that are passed to the C compiler (C only; not C++). - CXXFLAGS: General options that are passed to the C++ compiler. By default, this includes the value of $CCFLAGS, so that setting $CCFLAGS affects both C and C++ compilation. - CPPFLAGS: User-specified C preprocessor options. These will be included in any command that uses the C preprocessor, including not just compilation of C and C++ source files [...], but also [...] Fortran [...] and [...] assembly language source file[s]. TL;DR: Compiler options go to CCFLAGS, unless they must be restricted to either C (CFLAGS) or C++ (CXXFLAGS). Preprocessor defines go to CPPFLAGS.
2019-04-23Merge pull request #26961 from ibrahn/fix-x11setcontext-access-freedHein-Pieter van Braam
fixed an access after free in OS_X11::set_context. (long version)
2019-04-23Merge pull request #27208 from Calinou/add-lld-linkerHein-Pieter van Braam
Add support for linking using LLD on X11
2019-04-22fixed an access after free in OS_X11::set_context.Ibrahn Sahir
Added constructor and assignment operator for CharString from const char* to simplify memory management when working with utf8/ascii strings for APIs taking char*. Reworked OS_X11::set_context to use CharString and avoid some manual memory management.
2019-04-22Merge pull request #27673 from qarmin/small_fixesRémi Verschelde
Small fixes, mostly duplicated code
2019-04-15Add Input::get_current_cursor_shapeGuilherme Felipe
[Clean up] Removed unused/unnecessary methods.
2019-04-09Fix jump over uninitialized value in OS Unix/X11Fabio Alessandrelli
2019-04-08Small fixes, mostly dupicated codeqarmin
2019-04-07Merge pull request #27067 from shartte/remove-context-glRémi Verschelde
Remove ContextGL
2019-04-06Remove unused importsHendrikto
2019-04-06Remove ContextGL since as an abstraction it's unused.Sebastian Hartte
2019-04-05SCons: add `methods.using_clang` to check used compilerRémi Verschelde
Also rename `use_gcc` to `using_gcc` to make it clear that it returns a config but does not alter it.
2019-04-04Small fixes to static analyzer bugsqarmin
2019-04-03SCons: Fix python3 compat for builtin_bullet=noRémi Verschelde
2019-03-20Revert accidental commitsPedro J. Estébanez
This reverts commit fb37284c027b494ed3ec21124001fcb729f42cc4. This reverts commit 4db0f51b9aa76cfc7649787fe1970af606ce8dab.
2019-03-20Create class for shared memory blocks [wip]Pedro J. Estébanez
2019-03-18Add support for linking using LLD on X11Hugo Locurcio
LLD is often faster than GNU ld and gold, resulting in a better development experience. This closes #15364.
2019-03-12[X11] Fix `get_window_position` to return absolute coordinates, change ↵bruvzg
`set_window_position` to take window decorations into account.
2019-03-12fix for access after free in OS_X11::set_context.Ibrahn Sahir
2019-03-06Merge pull request #26633 from akien-mga/driver-fallback-etcRémi Verschelde
Disable driver fallback to GLES2 by default
2019-03-05Replace usage of __bswap_16 with BSWAP16 (#25714).marxin
2019-03-05Disable driver fallback to GLES2 by defaultRémi Verschelde
GLES2 is not designed to be a drop-in replacement for the GLES3 backend, so the fallback mode has to be used knowingly. It *can* make sense for simple projects which make sure to handle the differences between both rendering backends, but most users should stick to one supported backend. By making it opt-in, we can now use this parameter to define whether to export ETC textures to Android and iOS when using GLES3 + Fallback. When using GLES3 without Fallback on Android, set the proper min GLES version in the AndroidManifest. Also made the option boolean and renamed it for clarity and to avoid conflict with the previous String option (which would always evaluate as "true" otherwise). Fixes #26569.
2019-03-03Add support for event accumlation (off by default, on for editor), fixes #26536Juan Linietsky
2019-03-02SCons: Reduce spam from x11:can_buildRémi Verschelde
When cross-compiling for non-X11 on Linux, it used to be quite spammy. Now it will only print errors if you miss more than just pkg-config and x11.
2019-02-28X11: Fix drag and drop from non-latin pathsRémi Verschelde
Fixes #25826. Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2019-02-27Fix -Wsign-compare warnings.marxin
I decided to modify code in a defensive way. Ideally functions like size() or length() should return an unsigned type.
2019-02-26-Remove harcoded opengl extension testing from OS, ask rasterizer instead.Juan Linietsky
-Fixed a bug where etc textures were imported broken
2019-02-23Come up with use_gcc.marxin
Add new method. Fix wrong version condition for -fpie.
2019-02-21Fix all -Wtype-limits warnings.marxin
2019-02-20Add -Wshadow=local to warnings and fix reported issues.marxin
Fixes #25316.
2019-02-14Merge pull request #25879 from hpvb/fix-25629Rémi Verschelde
Detect when primusrun/optirun is in use
2019-02-14Detect when primusrun/optirun is in useHein-Pieter van Braam
It seems that bumblebee doesn't like us creating multiple GL contexts to avoid this we now detect whether we're running with this software and don't do anything.
2019-02-14Don't crash if there's no application nameHein-Pieter van Braam
This fixes #25852
2019-02-12Platform: Ensure classes match their header filenameRémi Verschelde
Also drop some unused files. Renamed: - `platform/iphone/sem_iphone.h` -> `semaphore_iphone.h` (same for `osx`) - `platform/uwp/gl_context_egl.h` -> `context_egl_uwp.h` - in `platform/windows`: `context_gl_win.h`, `crash_handler_win.h`, `godot_win.cpp`, `joypad.h` and `key_mapping_win.h` all renamed to use `windows`. Some classes renamed accordingly too. - `EditorExportAndroid` and `EditorExportUWP` renamed to `EditorExportPlatformAndroid` and `EditorExportPlatformUWP` - `power_android` and `power_osx` renamed to `PowerAndroid` and `PowerOSX` - `OSUWP` renamed to `OS_UWP` Dropped: - `platform/windows/ctxgl_procaddr.h`
2019-02-12Drivers, main, servers: Ensure classes match their header filenameRémi Verschelde
Renamed: - `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h` (same for `coremidi` and `winmidi`) - `main/timer_sync.h` -> `main_timer_sync.h` - `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-01-30Fix many asan and ubsan reported issuesHein-Pieter van Braam
This allows most demos to run without any ubsan or asan errors. There are still some things in thirdpart/ and some things in AudioServer that needs a look but this fixes a lot of issues. This should help debug less obvious issues, hopefully. This fixes #25217 and fixes #25218
2019-01-28Properly detect when to use DRI_PRIMEHein-Pieter van Braam
We fork off twice once with and once without DIR_PRIME=1 set. We then use the vendor string to determine what GPU to use. We prefer (in order) 1) AMDGPU/AMDGPU-PRO/NVidia non-free driver 2) Intel driver 3) Nouveau 4) Software rendering If a driver can't be detected it will default to DRI_PRIME=0
2019-01-21Rename sanitizer option names.marxin
Make the sanitizer names more explicit (use_ubsan, use_asan, use_lsan). Comment has been adjusted to include GCC as supported compiler for these and exclude -fno-omit-frame-pointer option (should not cause any problems).
2019-01-09Don't use -ffast-math or other unsafe math optimizationsHein-Pieter van Braam
Godot supports many different compilers and for production releases we have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers all do slightly different things with -ffast-math and it is causing issues now. See #24841, #24540, #10758, #10070. And probably other complaints about physics differences between release and release_debug builds. I've done some performance comparisons on Linux x86_64. All tests are ran 20 times. Bunnymark: (higher is better) (bunnies) min max stdev average fast-math 7332 7597 71 7432 this pr 7379 7779 108 7621 (102%) FPBench (gdscript port http://fpbench.org/) (lower is better) (ms) fast-math 15441 16127 192 15764 this pr 15671 16855 326 16001 (99%) Float_add (adding floats in a tight loop) (lower is better) (sec) fast-math 5.49 5.78 0.07 5.65 this pr 5.65 5.90 0.06 5.76 (98%) Float_div (dividing floats in a tight loop) (lower is better) (sec) fast-math 11.70 12.36 0.18 11.99 this pr 11.92 12.32 0.12 12.12 (99%) Float_mul (multiplying floats in a tight loop) (lower is better) (sec) fast-math 11.72 12.17 0.12 11.93 this pr 12.01 12.62 0.17 12.26 (97%) I have also looked at FPS numbers for tps-demo, 3d platformer, 2d platformer, and sponza and could not find any measurable difference. I believe that given the issues and oft-reported (physics) glitches on release builds I believe that the couple of percent of tight-loop floating point performance regression is well worth it. This fixes #24540 and fixes #24841
2019-01-03Merge pull request #24477 from lupoDharkael/nouveauHein-Pieter van Braam
Don't enable DRI_PRIME if nouveau is loaded
2019-01-01Update copyright statements to 2019Rémi Verschelde
Happy new year to the wonderful Godot community!