I prepared a playground example here which shows 10 videotextures playing simultaneously https://playground.babylonjs.com/#DYW6PM#3
The issue is that in our BJS app, we could conceivably have more than 10, in fact, assuming our end-users computers can handle it, the more the better.
The problem here is that when I increase (totalVideoMeshes) from 10 to say 100, the canvas/tab will freeze and go unresponsive, but I don’t see any errors in the console or anywhere else, and my only recourse is to close the tab and open a new one.
Depending on the scene sometimes the lock ups will happen at 50, or 60, or 70, but at some point, things lock up, and I don’t really know where to “draw the line” so to speak.
Maybe someone can shed some light on the underlying cause(s), and ideas for how to optimize or prevent/handle this situation? (maybe monitoring GPU resource usage, or some such mechanism?)
Not sure if this is helpful at all but I thought to check chrome://gpu and this is what I see under Log Messages.
[13643:13704:1108/100648.814047:ERROR:validation_errors.cc(106)] : Invalid message: VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 1)
[13643:13704:1108/100648.814114:ERROR:gpu_child_thread.cc(67)] : Mojo error in GPU process: Validation failed for gpu.mojom.GpuChannel [VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 1)]
[13643:13704:1108/100648.841626:ERROR:interface_endpoint_client.cc(665)] : Message 208270303 rejected by interface gpu.mojom.GpuChannel
[13643:13704:1108/100648.841721:ERROR:validation_errors.cc(106)] : Invalid message: VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 1)
[13643:13704:1108/100648.841757:ERROR:gpu_child_thread.cc(67)] : Mojo error in GPU process: Validation failed for gpu.mojom.GpuChannel [VALIDATION_ERROR_UNEXPECTED_NULL_POINTER (null field 1)]
[13643:13704:1108/100648.841804:ERROR:interface_endpoint_client.cc(665)] : Message 208270303 rejected by interface gpu.mojom.GpuChannel
Update: At face value I don’t think it’s a resource consumption thing… when I watch CPU/GPU and RAM/VRAM utilization, I don’t see anything that really jumps out at me, but maybe I’m missing something
Also, I updated my playground example so you can progressively add more textures to the scene, in this version you can hit the “Enter” key to add 10 at a time https://playground.babylonjs.com/#DYW6PM#5 until it eventually freezes