Search Issue Tracker
By Design
Votes
0
Found in
2019.4.14f1
2019.4.23f1
2020.3
2021.1
2021.2
Issue ID
1329568
Regression
Yes
Mesh generated using Graphics.DrawProcedural is not rendered when using some graphics APIs
Steps to reproduce:
1. Open the attached project
2. Open the "MinimalTest" Scene
Expected results: text below the green cube is rendered in a square
Actual result: the square is not being rendered and the following warning is logged "Shader requires vertex data and is not compatible with DrawIndexedNullGeometry."
Reproducible with: 2019.4.14f1, 2020.3.9f1, 2021.1.8f1, 2021.2.0a18
Not reproducible with: 2019.4.13f1
Could not test with: 2018.4.35f1 - issues with the users script prevented from testing
Notes:
- Reproduces in Windows Editor or Windows Standalone build when using Vulkan, Direct3D12 graphics APIs
- Does not reproduce in Windows Editor or Windows Standalone build when using Direct3D11, OpenGLCore, OpenGLES3 graphics APIs
- In Android builds when using OpenGLES3 seems to only reproduce in devices using Mali GPU, when using Vulkan reproduced on all tested devices
- Reproduces in Android build on following devices when using OpenGLES3 graphics API:
N/A, Huawei - (NOH-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G78
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
VLNQA00012, Samsung Galaxy S6 (SM-G920F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00096, Samsung Galaxy S8 (SM-G950F), Android 8.0.0, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00335, Samsung Galaxy S20 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
- Does not reproduce in Android build on following devices when using OpenGLES3 graphics API:
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00022, Xiaomi Redmi Note 3 (Redmi Note 3), Android 6.0.1, CPU: Snapdragon 617 MSM8952, GPU: Adreno (TM) 510
N/A, Google Pixel 3 XL (Pixel 3 XL), Android 11, CPU: NOT FOUND, GPU: Adreno (TM) 630
VLNQA00334, Xiaomi Mi A3 (Mi A3), Android 11, CPU: Snapdragon 665 SM6125, GPU: Adreno (TM) 610
VLNQA00229, Oneplus OnePlus6T (ONEPLUS A6013), Android 9, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00294, Oppo Reno Z 中国版 (PCDM10), Android 9, CPU: Mediatek MT6779 Helio P90, GPU: PowerVR Rogue GM9446
VLNQA00317, Vivo V1924A (V1924A), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
- Reproduces in Android build on following devices when using Vulkan graphics API:
N/A, Google Pixel 3 XL (Pixel 3 XL), Android 11, CPU: NOT FOUND, GPU: Adreno (TM) 630
VLNQA00001, Google Pixel 2 (Pixel 2), Android 11, CPU: Snapdragon 835 MSM8998, GPU: Adreno (TM) 540
VLNQA00316, Samsung Galaxy Note10 (SM-N970F), Android 9, CPU: Exynos 9 Series 9825, GPU: Mali-G76
N/A, Huawei - (NOH-NX9), Android 10, CPU: NOT FOUND, GPU: Mali-G78
VLNQA00012, Samsung Galaxy S6 (SM-G920F), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00334, Xiaomi Mi A3 (Mi A3), Android 11, CPU: Snapdragon 665 SM6125, GPU: Adreno (TM) 610
VLNQA00096, Samsung Galaxy S8 (SM-G950F), Android 8.0.0, CPU: Exynos 9 Octa 8895, GPU: Mali-G71
VLNQA00229, Oneplus OnePlus6T (ONEPLUS A6013), Android 9, CPU: Snapdragon 845 SDM845, GPU: Adreno (TM) 630
VLNQA00294, Oppo Reno Z 中国版 (PCDM10), Android 9, CPU: Mediatek MT6779 Helio P90, GPU: PowerVR Rogue GM9446
VLNQA00317, Vivo V1924A (V1924A), Android 9, CPU: Snapdragon 855 SM8150, GPU: Adreno (TM) 640
VLNQA00286, Meizu - (PRO 5), Android 7.0, CPU: Exynos 7 Octa 7420, GPU: Mali-T760
VLNQA00335, Samsung Galaxy S20 5G (SM-G986B), Android 10, CPU: Exynos 990, GPU: Mali-G77
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Highlighter.Highlight does not find window when using class name as window title
- Highlighter.Highlight highlights a different component when multiple components have the same property path
- Highlighter.Highlight does not find elements in an array or list when the array or list is collapsed
- [URP][NRP] RenderPass, BeginSubPass, and EndRenderPass errors are thrown when Native RenderPass is enabled
- D3D11 swapchain error pop-up appears and the Editor shuts down when Generating Lighting with Probe Volumes present
Resolution Note:
Graphics.DrawProcedural is designed to work with shaders that do not require vertexbuffers. As in the shader is defined like this:
void vert(out appdata v, out Input o)
In the example case it was:
void vert(inout appdata v, out Input o), which means that the shader expects to have a vertexbuffer. inout and in explicitly means that the shader wants to read from appdata, so there must be a vertexbuffer.
So no in qualifiers in the declaration. If there are any in qualifiers we need to generate a fake vertexbuffer, which DX11 does automatically. But if we do that everywhere it will trash the performance and thus makes the whole function not worth having.
Surface shader system apparently needs vertexbuffers, so they are not compatible with the DrawProcedural.
There are some workarounds that can work, but they're not supported nor guaranteed to work. As an example if you just assign to all variables, basically in this case add
v.vertex.w = 0; into the shader it, in this case, causes our compiler to optimize it away which makes it work. But there is no guarantee it will always work.
For development purposes one can use Vulkan or DX12 backends on Windows to more easily see these kinds of issues where DX11 transparently adds things in the background.