summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.h2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.h2
-rw-r--r--drivers/gles3/shader_gles3.cpp10
-rw-r--r--drivers/gles3/shaders/canvas.glsl4
-rw-r--r--drivers/unix/ip_unix.cpp1
-rw-r--r--drivers/unix/packet_peer_udp_posix.cpp2
-rw-r--r--drivers/unix/packet_peer_udp_posix.h2
-rw-r--r--drivers/unix/tcp_server_posix.cpp2
-rw-r--r--drivers/unix/tcp_server_posix.h2
9 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.h b/drivers/gles3/rasterizer_canvas_gles3.h
index 26003f543f..29f889cc88 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.h
+++ b/drivers/gles3/rasterizer_canvas_gles3.h
@@ -42,6 +42,7 @@ public:
float projection_matrix[16];
float time;
+ uint8_t padding[12];
};
RasterizerSceneGLES3 *scene_render;
@@ -102,6 +103,7 @@ public:
float light_height;
float light_outside_alpha;
float shadow_distance_mult;
+ uint8_t padding[4];
} ubo_data;
GLuint ubo;
diff --git a/drivers/gles3/rasterizer_scene_gles3.h b/drivers/gles3/rasterizer_scene_gles3.h
index f6509e0041..0cdaef44a9 100644
--- a/drivers/gles3/rasterizer_scene_gles3.h
+++ b/drivers/gles3/rasterizer_scene_gles3.h
@@ -141,6 +141,7 @@ public:
float fog_height_min;
float fog_height_max;
float fog_height_curve;
+ uint8_t padding[8];
} ubo_data;
@@ -150,6 +151,7 @@ public:
float transform[16];
float ambient_contribution;
+ uint8_t padding[12];
} env_radiance_data;
diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp
index f1077e2d20..e7a26c0354 100644
--- a/drivers/gles3/shader_gles3.cpp
+++ b/drivers/gles3/shader_gles3.cpp
@@ -273,6 +273,11 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
//vertex precision is high
strings.push_back("precision highp float;\n");
strings.push_back("precision highp int;\n");
+#ifndef GLES_OVER_GL
+ strings.push_back("precision highp sampler2D;\n");
+ strings.push_back("precision highp samplerCube;\n");
+ strings.push_back("precision highp sampler2DArray;\n");
+#endif
#if 0
if (cc) {
@@ -371,6 +376,11 @@ ShaderGLES3::Version *ShaderGLES3::get_current_version() {
//fragment precision is medium
strings.push_back("precision highp float;\n");
strings.push_back("precision highp int;\n");
+#ifndef GLES_OVER_GL
+ strings.push_back("precision highp sampler2D;\n");
+ strings.push_back("precision highp samplerCube;\n");
+ strings.push_back("precision highp sampler2DArray;\n");
+#endif
#if 0
if (cc) {
diff --git a/drivers/gles3/shaders/canvas.glsl b/drivers/gles3/shaders/canvas.glsl
index 1c950c82d9..f0dc14c35a 100644
--- a/drivers/gles3/shaders/canvas.glsl
+++ b/drivers/gles3/shaders/canvas.glsl
@@ -532,11 +532,11 @@ FRAGMENT_SHADER_CODE
#ifdef USE_RGBA_SHADOWS
-#define SHADOW_DEPTH(m_tex,m_uv) dot(texture2D((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
+#define SHADOW_DEPTH(m_tex,m_uv) dot(texture((m_tex),(m_uv)),vec4(1.0 / (256.0 * 256.0 * 256.0),1.0 / (256.0 * 256.0),1.0 / 256.0,1) )
#else
-#define SHADOW_DEPTH(m_tex,m_uv) (texture2D((m_tex),(m_uv)).r)
+#define SHADOW_DEPTH(m_tex,m_uv) (texture((m_tex),(m_uv)).r)
#endif
diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp
index 30d2377a04..f55b75c1d9 100644
--- a/drivers/unix/ip_unix.cpp
+++ b/drivers/unix/ip_unix.cpp
@@ -100,6 +100,7 @@ IP_Address IP_Unix::_resolve_hostname(const String &p_hostname, Type p_type) {
hints.ai_family = AF_UNSPEC;
hints.ai_flags = AI_ADDRCONFIG;
};
+ hints.ai_flags &= !AI_NUMERICHOST;
int s = getaddrinfo(p_hostname.utf8().get_data(), NULL, &hints, &result);
if (s != 0) {
diff --git a/drivers/unix/packet_peer_udp_posix.cpp b/drivers/unix/packet_peer_udp_posix.cpp
index 74ceb3946a..3170b121b9 100644
--- a/drivers/unix/packet_peer_udp_posix.cpp
+++ b/drivers/unix/packet_peer_udp_posix.cpp
@@ -127,7 +127,7 @@ int PacketPeerUDPPosix::get_max_packet_size() const {
return 512; // uhm maybe not
}
-Error PacketPeerUDPPosix::listen(int p_port, IP_Address p_bind_address, int p_recv_buffer_size) {
+Error PacketPeerUDPPosix::listen(int p_port, const IP_Address &p_bind_address, int p_recv_buffer_size) {
ERR_FAIL_COND_V(sockfd != -1, ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);
diff --git a/drivers/unix/packet_peer_udp_posix.h b/drivers/unix/packet_peer_udp_posix.h
index a52b8b8e95..d8b08818b0 100644
--- a/drivers/unix/packet_peer_udp_posix.h
+++ b/drivers/unix/packet_peer_udp_posix.h
@@ -67,7 +67,7 @@ public:
virtual int get_max_packet_size() const;
- virtual Error listen(int p_port, IP_Address p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536);
+ virtual Error listen(int p_port, const IP_Address &p_bind_address = IP_Address("*"), int p_recv_buffer_size = 65536);
virtual void close();
virtual Error wait();
virtual bool is_listening() const;
diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp
index 865e9aa1d6..a8554d07a3 100644
--- a/drivers/unix/tcp_server_posix.cpp
+++ b/drivers/unix/tcp_server_posix.cpp
@@ -69,7 +69,7 @@ void TCPServerPosix::make_default() {
TCP_Server::_create = TCPServerPosix::_create;
};
-Error TCPServerPosix::listen(uint16_t p_port, const IP_Address p_bind_address) {
+Error TCPServerPosix::listen(uint16_t p_port, const IP_Address &p_bind_address) {
ERR_FAIL_COND_V(listen_sockfd != -1, ERR_ALREADY_IN_USE);
ERR_FAIL_COND_V(!p_bind_address.is_valid() && !p_bind_address.is_wildcard(), ERR_INVALID_PARAMETER);
diff --git a/drivers/unix/tcp_server_posix.h b/drivers/unix/tcp_server_posix.h
index 659b389fe2..947050ab8a 100644
--- a/drivers/unix/tcp_server_posix.h
+++ b/drivers/unix/tcp_server_posix.h
@@ -41,7 +41,7 @@ class TCPServerPosix : public TCP_Server {
static TCP_Server *_create();
public:
- virtual Error listen(uint16_t p_port, IP_Address p_bind_address = IP_Address("*"));
+ virtual Error listen(uint16_t p_port, const IP_Address &p_bind_address = IP_Address("*"));
virtual bool is_connection_available() const;
virtual Ref<StreamPeerTCP> take_connection();