summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-08-20 10:03:06 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-08-20 10:03:06 +0200
commit033054f182677e64085ed78ce33534d0e0b2e2df (patch)
treeff62cbcaae10bc549860b4a1b2393be67e97486c /drivers
parentc367e671bbdbde881f367799780783ffa4e85442 (diff)
parentbde165ccb3dc26c8414ae6e4ab659014d9428ad0 (diff)
downloadredot-engine-033054f182677e64085ed78ce33534d0e0b2e2df.tar.gz
Merge pull request #95838 from olawlor/vertex65536bugfix
Fix GLES3 crash with Mesh surface with exactly 65536 vertices
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gles3/storage/mesh_storage.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles3/storage/mesh_storage.cpp b/drivers/gles3/storage/mesh_storage.cpp
index 2da025b82e..b55a2e0a8a 100644
--- a/drivers/gles3/storage/mesh_storage.cpp
+++ b/drivers/gles3/storage/mesh_storage.cpp
@@ -301,7 +301,7 @@ void MeshStorage::mesh_add_surface(RID p_mesh, const RS::SurfaceData &p_surface)
Vector<uint8_t> ir = new_surface.index_data;
wr = wf_indices.ptrw();
- if (new_surface.vertex_count < (1 << 16)) {
+ if (new_surface.vertex_count <= 65536) {
// Read 16 bit indices.
const uint16_t *src_idx = (const uint16_t *)ir.ptr();
for (uint32_t i = 0; i + 5 < wf_index_count; i += 6) {