summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-09-27Fix invalid comparison warnings: [-Wbool-compare] and [-Wenum-compare]Rémi Verschelde
Fixes the following GCC 5 warnings and actual bugs: ``` drivers/unix/net_socket_posix.cpp:562:28: warning: comparison between 'enum IP::Type' and 'enum NetSocket::Type' [-Wenum-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: comparison of constant '17' with boolean expression is always true [-Wbool-compare] modules/gdscript/gdscript_function.cpp:792:26: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/gdscript/gdscript_parser.cpp:5082:58: warning: comparison of constant '6' with boolean expression is always false [-Wbool-compare] modules/gdscript/gdscript_parser.cpp:5082:58: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] modules/mbedtls/stream_peer_mbed_tls.cpp:286:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] modules/mbedtls/stream_peer_mbed_tls.cpp:313:45: warning: comparison between 'enum StreamPeerTCP::Status' and 'enum StreamPeerSSL::Status' [-Wenum-compare] ```
2018-09-27Fix warnings for comparison between signed and unsigned integers ↵Rémi Verschelde
[-Wsign-compare] Also turn off -Wsign-compare warnings in the future, we do not consider them important. Fixes the following GCC 5 warnings: ``` core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] editor/plugins/sprite_editor_plugin.cpp:100:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ``` The following warnings were not fixed, as they implied casting for no gain: ``` core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] ```
2018-09-25Fix gizmo handles in GLES2 backendJuan Linietsky
2018-09-23Fix build after 65fd37c1, using Math_PIRémi Verschelde
Also fix style in shaders.
2018-09-23-Rewrote GLES2 lighting and shadows and optimized state changes, did many ↵Juan Linietsky
optimizations, added vertex lighting. -Did some fixes to GLES3 too
2018-09-22Fix Winsock UDP ECONNRESET/ENETRESET bugFabio Alessandrelli
Since Windows 2000: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may result in a WSAECONNRESET error. Since Windows Vista(?)/Windows Server 2008: Calling recv/recvfrom when an ICMP reply was received from a previous send/sendto, may also result in a WSAENETRESET error. Both those features are disabled by this commit using disabling SIO_UDP_CONNRESET and SIO_UDP_NETRESET on newly created UDP sockets.
2018-09-22Detect POLLERR revents too in NetSocketPosix.Fabio Alessandrelli
Usually indicate an RST was received by a TCP socket.
2018-09-22Use select instead of WSAPoll on Windows.Fabio Alessandrelli
WSAPoll is broken by design. It was announced as the new way to introduce compatibility to posix sockets, their implementation was broken, and they decided not to fix it. You can read the full story here: https://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/
2018-09-18Fix lighting of rotated particles in 2DJFonS
Custom instance transform was not taken into account for normal map calculation. Also renamed `extra_matrix2` to `extra_matrix_instance` for more clarity.
2018-09-13Merge pull request #21806 from JFonS/inspector_uniform_defaultsJuan Linietsky
Set uniform default values in inspector
2018-09-13Set uniform default values in inspectorJFonS
2018-09-13Properly initialize Winsock on startupFabio Alessandrelli
Also fix typo in _get_last_error which caused Winsock connect to fail.
2018-09-13Merge pull request #21982 from luzpaz/misc-typosRémi Verschelde
Misc. typos
2018-09-12Misc. typosluz.paz
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12Removed unused function RasterizerSceneGLES3::_copy_to_front_bufferWilson E. Alvarez
2018-09-12Unify StreamPeerTCP/TCP_Server with NetSocket APIFabio Alessandrelli
2018-09-12Unify PacketPeerUDP using NetSocketFabio Alessandrelli
2018-09-12New NetSocket interface, BSD/Win implementationFabio Alessandrelli
Unified BSD and Winsock sockets into a single implementation of a generic NetSocket interface. This is some ground work for few network improvements: - Reuse as much code as possible between Posix and Windows. - Provide a single point of implementation for exotic sdks (consoles). - Provide platform agnostic StreamPeerTCP and PacketPeerUDP in core. - Implement connect for UDP allowing for DTLS implementation.
2018-09-12ENet wrapper properly detect disconnect on pollFabio Alessandrelli
Now PacketPeerUDP.get_available_packet_count() return -1 if the socket is in error state.
2018-09-12Properly reset socket blocking state on closeFabio Alessandrelli
2018-09-12Make core/ includes absolute, remove subfolders from include pathRémi Verschelde
This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
2018-09-10Fix possible crash when switching audio device on WASAPI driverMarcelo Fernandez
2018-09-08Fixed a theoretical condition where prealpha prevents lightingBastiaan Olij
2018-09-06Ability for Light2D to use a proxy texture, fixes #17067Juan Linietsky
2018-09-05Merge pull request #21782 from eska014/gles3-get-texture-errRémi Verschelde
Fix missing texture-download error with OpenGL ES
2018-09-05Fix missing texture-download error with OpenGL ESLeon Krause
2018-09-03Respect splash fullsize option on GLES2volzhs
2018-08-29Ported CPU particles to 2DJuan Linietsky
2018-08-27Revert "Try closing gracefully before terminating process"Rémi Verschelde
2018-08-27Merge pull request #21387 from hpvb/fix-15324Rémi Verschelde
Fall back to GLES2 if GLES3 is not working
2018-08-27Revert "Fix some 3D texture issues"Juan Linietsky
2018-08-27Merge pull request #21469 from akien-mga/glsl-clang-formatRémi Verschelde
Style: Enable clang-format on GLSL shaders
2018-08-27Merge pull request #21467 from elasota/fix-3d-texturesRémi Verschelde
Fix some 3D texture issues
2018-08-27Style: Enable clang-format on GLSL shadersRémi Verschelde
As of clang-format 6.0.1, putting the `/* clang-format off */` hint around our "invalid" `[vertex]` and `[shader]` statements isn't enough to prevent a bogus indent of the next comments and first valid statement, so we need to enclose that first valid statement in the unformatted chunk.
2018-08-26Partial fixes for 3D texture issueselasota
2018-08-26Merge pull request #21411 from Crazy-P/fixes-several-resource-leaksRémi Verschelde
Fixes several resource leaks listed on coverity
2018-08-26Fall back to GLES2 if GLES3 is not workingHein-Pieter van Braam
This adds a static is_viable() method to all rasterizers which has to be called before initializing the rasterizer. This allows us to check what rasterizer to use in OS::initialize together with the GL context initialization. This commit also adds a new project setting "rendering/quality/driver/driver_fallback" which allows the creator of a project to specify whether or not fallback to GLES2 is allowed. This setting is ignored for the editor so the editor will always open even if the project itself cannot run. This will hopefully reduce confusion for users downloading projects from the internet. We also no longer crash when GLES3 is not functioning on a platform. This fixes #15324
2018-08-26Fixes several resource leaks in ...Crazy-P
- gdscript - gdscript_compiler - regex - android/export - gles3/rasterizer (scene and storage)
2018-08-25Prevent CoreAudio driver failing on finish if Dummy driver was selectedMarcelo Fernandez
2018-08-24Fix generation of env map, closes #18880Juan Linietsky
2018-08-24Merge pull request #20712 from marcelofg55/midi_open_closeJuan Linietsky
Add OS::open_midi_inputs and OS::close_midi_inputs
2018-08-24Merge pull request #21364 from akien-mga/shaders-styleRémi Verschelde
Style: Fix code formatting in GLSL shaders
2018-08-24Added a more minimal test to avoid crash in #20677 but I dont think this is ↵Juan Linietsky
the cause
2018-08-24Make some debug prints verbose-only, remove othersRémi Verschelde
2018-08-24Merge pull request #21351 from akien-mga/print_verboseRémi Verschelde
Add print_verbose to print to stdout only in verbose mode
2018-08-24Style: Fix code formatting in GLES2 shadersRémi Verschelde
2018-08-24Style: Fix code formatting in GLES3 shadersRémi Verschelde
2018-08-24Merge pull request #21357 from karroffel/gles2-shader-language-f-to-pay-respectsThomas Herzog
[GLES2] fix wrong shader compiler output
2018-08-24Merge pull request #21318 from karroffel/gles2-shader-fixesThomas Herzog
[GLES2] attempt to fix some android problems
2018-08-24[GLES2] fix wrong shader compiler outputThomas Herzog
The `f` postfix was working fine on dekstop GL but not on some mobile drivers.