Search Unity

DrawMeshInstancedIndirect throws "not supported" error despite being supported

Discussion in 'Android' started by unity_17victork, Nov 24, 2021.

  1. unity_17victork

    unity_17victork

    Joined:
    Nov 24, 2021
    Posts:
    3
    Hello,
    I am attempting to use DrawMeshInstancedIndirect for optimization of my game and it runs great in editor and on most other devices, however I am running into an issue where unity throws `invalidoperationexception: instancing is not supported`

    Using SystemInfo.supportsInstancing on device returns true.

    The device also runs OpenGL est 3.2

    Phone model is Samsung SM-G991B (Samsung s21 5g).

    What is interesting, is that when attempting to run the same application on a different model of the same phone (SM-G991U1) it runs perfectly fine. The difference between the two models is their GPU, but both of them are supposed to support instancing.

    What could be the cause of this?

    Here is system info specs from the device that gets an error:
    Model: Samsung SM-G991B
    Device Type: Handheld
    Copy Texture Support: Basic, Copy3D, DifferentTypes, TextureToRT, RTToTexture
    Graphics Device Name: Mali-G78
    Graphics Device Type: OpenGLES3
    Graphics Device Vendor: ARM
    Graphics Device Version: OpenGL ES 3.2 v1.r32p1-01bet2-mbs2v39_0.f99ba4208fdd3cd75b7876c6eee932cf
    Graphics Memory Size: 2048
    Graphics Multi Threading: True
    Graphics Shader Level: 50
    Graphics UV starts at Top: False
    Has Dynamic Uniform Array Indexing in Fragment Shaders: True
    Has Hidden Surface Removal on GPU: False
    Max Cubemap Size: 16383
    Max Texture Size: 16383
    NPOT Support: Full
    Operating System: Android OS 12 / API-31 (SP1A.210812.016/G991BXXU3BUK8)
    Operating Family System: Other
    Processor Count: 8
    Processor Frequency: 2912
    Processor Type: ARM64 FP ASMID AES
    Supported Render Target Count: 8
    Supports 2D Array Textures: True
    Supports 32 Bits Index Buffer: True
    Supports 3D Render Textures: True
    Supports 3D Textures: True
    Supports Accelerometer: True
    Supports Async Compute: False
    Supports Async GPU Readback: False
    Supports Audio: True
    Supports Compute Shaders: True
    Supports Cubemap Array Textures: True
    Supports GPU Fence: True
    Supports Gyroscope: True
    Supports Hardware Quad Topology: True
    Supports Instancing: True
    Supports Location Service: True
    Supports Mip Streaming: True
    Supports Motion Vectors: True
    Supports Multisample Auto Resolve: True
    Supports Multisampled Textures: 1
    Supports Raw Shadow Depth Sampling: True
    Supports Separated Render Target Blend: True
    Supports Shadows: True
    Supports Sparse Textures: False
    Supports Texture Wrap Mirror Once: 0
    Supports Vibration: True
    System Memory Size: 7196
    Uses Reversed Z Buffer: False
     
  2. florianpenzkofer

    florianpenzkofer

    Unity Technologies

    Joined:
    Sep 2, 2014
    Posts:
    479
    Strange, this is exception is only thrown based on `SystemInfo.supportsInstancing` like:
    Code (CSharp):
    1.   if (!SystemInfo.supportsInstancing)
    2.                 throw new InvalidOperationException("Instancing is not supported.");
    What's the version of Unity?
    Can you please report a bug with repro project?
     
  3. unity_17victork

    unity_17victork

    Joined:
    Nov 24, 2021
    Posts:
    3
    It turns out that the tester's device didn't get that specific error, and instead just had the DMII call not go through without any logs or errors. Sorry for the confusion