summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-1412-82/+152
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-1414-0/+49
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-1475-1102/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Enforce use of bool literals instead of integersRémi Verschelde2020-05-142-2/+2
| | | | | Using clang-tidy's `modernize-use-bool-literals`. https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-bool-literals.html
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-1420-184/+89
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Fix DummyRenderer after new lightmapper merge.Fabio Alessandrelli2020-05-111-3/+35
|
* Merge pull request #38386 from reduz/new-lightmapperRémi Verschelde2020-05-113-1/+20
|\ | | | | New GPU lightmapper
| * New lightmapperJuan Linietsky2020-05-103-1/+20
| | | | | | | | | | | | | | -Added LocalVector (needed it) -Added stb_rect_pack (It's pretty cool, we could probably use it for other stuff too) -Fixes and changes all around the place -Added library for 128 bits fixed point (required for Delaunay3D)
* | Restore RasterizerDummy.Fabio Alessandrelli2020-05-101-6/+58
|/
* Style: clang-format: Disable AllowShortCaseLabelsOnASingleLineRémi Verschelde2020-05-103-116/+236
| | | | Part of #33027.
* Style: clang-format: Disable AllowShortIfStatementsOnASingleLineRémi Verschelde2020-05-103-8/+11
| | | | | | | Part of #33027, also discussed in #29848. Enforcing the use of brackets even on single line statements would be preferred, but `clang-format` doesn't have this functionality yet.
* Improve shader time roll overPedro J. Estébanez2020-04-301-3/+2
| | | | | | - Resurrect it for GL ES 2 - Add it to the Vulkan rasterizer - Expose the setting from the `RenderingServer`, since it does not belong in any specific rasterizer
* Merge pull request #37795 from Chaosus/shader_fix_const_order2Rémi Verschelde2020-04-291-7/+8
|\ | | | | Fix shader constant sorting
| * Fix shader constant sortingYuri Roubinsky2020-04-111-7/+8
| |
* | [Vulkan] Use `VK_LAYER_KHRONOS_validation` instead of deprecated ↵bruvzg2020-04-261-23/+30
| | | | | | | | `VK_LAYER_LUNARG_standard_validation`.
* | Merge pull request #36083 from Calinou/dummy-loader-add-extensionsRémi Verschelde2020-04-231-3/+27
|\ \ | | | | | | Add more extensions to the dummy texture loader
| * | Add more extensions to the dummy texture loaderHugo Locurcio2020-04-081-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | This should make headless exporting work in projects using textures in any format. Error messages should no longer appear when running a project that used image formats that were previously not present in the list.
* | | Add proper type to most public API uses of ArrayJuan Linietsky2020-04-212-11/+11
| | |
* | | Exposed RenderingDevice to script APIJuan Linietsky2020-04-204-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added an easier way to load native GLSL shaders. Extras: Had to fix no-cache for subresources in resource loader, it was not properly working, making shaders not properly reload. Note: The precommit hooks are broken because they don't seem to support enums from one class being used in another. Feel free to fix this after merging this PR.
* | | Merge pull request #38056 from clayjohn/GLES2-depth-bufferRémi Verschelde2020-04-201-1/+1
|\ \ \ | | | | | | | | Use proper depth buffer format for rgba shadows
| * | | Use proper depth buffer format for rgba shadowsclayjohn2020-04-201-1/+1
| | | |
* | | | Ability to create local RenderingDevice instances.Juan Linietsky2020-04-184-73/+256
|/ / /
* | | Fixes leaks in ResourceCache, Vulkan and X11qarmin2020-04-152-0/+14
| | |
* | | Merge pull request #37881 from qarmin/leak_vulkanRémi Verschelde2020-04-141-0/+2
|\ \ \ | | | | | | | | Fixes leaks with Vulkan device and instance
| * | | Fixes leaks with Vulkan device and instanceqarmin2020-04-141-0/+2
| | | |
* | | | Implement decalsJuan Linietsky2020-04-141-4/+4
|/ / / | | | | | | | | | | | | | | | Also implemented decal atlas, so projectors and other stuff can be added. Sidenote: Had to make RID hashable, so some unrelated includes changed in order to include it in hashfuncs.h
* | | Implement MSAAJuan Linietsky2020-04-123-1/+155
| | |
* | | Merge pull request #37808 from reduz/port-effects-to-computeJuan Linietsky2020-04-112-31/+57
|\ \ \ | |_|/ |/| | Moved most of the effect code to compute.
| * | Moved most of the effect code to compute.Juan Linietsky2020-04-112-31/+57
| | | | | | | | | | | | | | | Simplifies it and improves performance. Improves image barrier handling per mipmap on RenderingDeviceVulkan
* | | Shows proper scene render time in editor infoJuan Linietsky2020-04-101-1/+34
|/ / | | | | | | Also fixed GPU profiler, which was not working on nvidia hardware.
* | Fix extra warnings in Android buildPouleyKetchoupp2020-04-101-0/+8
| |
* | Merge pull request #36919 from nekomatata/android-vulkan-renderingRémi Verschelde2020-04-094-6/+24
|\ \ | |/ |/| Vulkan rendering support on Android
| * Display Server supportPouleyKetchoupp2020-04-083-2/+12
| |
| * Vulkan rendering for AndroidPouleyKetchoupp2020-04-033-6/+14
| |
* | Avoid material rebinds when using skeletonsclayjohn2020-04-071-9/+9
| |
* | Merge pull request #37586 from qarmin/vulkan_allocator_leakRémi Verschelde2020-04-071-0/+1
|\ \ | | | | | | Fix leak with Vulkan allocator
| * | Fix leak with Vulkan allocatorqarmin2020-04-041-0/+1
| |/
* | Merge pull request #37635 from qarmin/leak_vertexRémi Verschelde2020-04-061-0/+7
|\ \ | | | | | | Fixed leak with vertex_formats
| * | Fixed leak with vertex_formatsqarmin2020-04-061-0/+7
| |/
* / Vulkan: Use VK_NULL_HANDLE for handles, fixes 32-bit buildsRémi Verschelde2020-04-063-10/+11
|/ | | | | | | | | | | | | | Some Vulkan types are defined as "non dispatchable handles" and use a different typedef on 32-bit and 64-bit systems (struct pointer on 64-bit, `uint64_t` otherwise). https://github.com/KhronosGroup/Vulkan-Headers/blob/0e78ffd1dcfc3e9f14a966b9660dbc59bd967c5c/include/vulkan/vulkan_core.h#L59-L65 Contrarily to `NULL`, `nullptr` can't be converted to `uint64_t` so build was now failing on 32-bit after converting the codebase from using `NULL` to `nullptr`. Fixes #37620.
* Replace NULL with nullptrlupoDharkael2020-04-0236-613/+613
|
* Fix res:// trimmed to s:// on WindowsPedro J. Estébanez2020-04-011-1/+7
|
* doc: Sync classref with DisplayServer/Window changesRémi Verschelde2020-03-311-1/+1
|
* SCons: Format buildsystem files with psf/blackRémi Verschelde2020-03-3018-103/+113
| | | | | | | | | | | | | | | | | | | | | Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
* Renaming of servers for coherency.Juan Linietsky2020-03-2715-856/+856
| | | | | | | | | | VisualServer -> RenderingServer PhysicsServer -> PhysicsServer3D Physics2DServer -> PhysicsServer2D NavigationServer -> NavigationServer3D Navigation2DServer -> NavigationServer2D Also renamed corresponding files.
* Added a Window node, and made it the scene root.Juan Linietsky2020-03-264-28/+27
| | | | Still a lot of work to do.
* Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky2020-03-265-10/+10
|
* Merge pull request #37219 from RajatGoswami/missing-include-guardsRémi Verschelde2020-03-231-3/+7
|\ | | | | Adding missing include guards to header files identified by LGTM
| * Adding missing include guards to header files identified by LGTM.Rajat Goswami2020-03-231-3/+7
| | | | | | | | This addresses the issue godotengine/godot#37143
* | Merge pull request #37179 from clayjohn/VULKAN-sky-shaderRémi Verschelde2020-03-222-0/+8
|\ \ | | | | | | Implement Sky Shaders