# PowerVR GM 9446: vkCmdDrawIndexed crash

**URL:** <https://forums.imgtec.com/t/powervr-gm-9446-vkcmddrawindexed-crash/3854>\
**Category:** Uncategorized\
**Created:** [December 7, 2023, 3:15pm UTC](https://forums.imgtec.com/t/powervr-gm-9446-vkcmddrawindexed-crash/3854 "2023-12-07T15:15:02Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![AlejandroC](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@AlejandroC](https://forums.imgtec.com/u/AlejandroC)\
**Post date:** [January 3, 2024, 3:55pm UTC](https://forums.imgtec.com/t/powervr-gm-9446-vkcmddrawindexed-crash/3854/9 "2024-01-03T15:55:28Z")

</div>

Hi andreyogld3d,

Regarding a possible shader compilation failure, it would lead to a graphics pipeline creation error, unless the shader compilation fails silently which is unlikely.

Just in case I extracted the vertex and fragment shaders used in the only two draw calls in the app you are testing, _vkCmdDrawIndexed(24576, 1)_ and _vkCmdDrawIndexed(6, 570)_. I tested all four with our offline shader compilers (which are now public by the way, you can get them from the _Profiling Compilers_ download in [Downloads - Imagination Developers](https://developer.imaginationtech.com/downloads) ). I was able to compile the shaders with no problem. I used _glslangValidator.exe_ from Vulkan 1.3.211.0 and target environment Vulkan 1.1

```auto
glslangValidator.exe --target-env vulkan1.1 -V vertex_shader_0.vert -o vertex_shader_0.spv

# BVNC GPU HW indentificator 24.50.208.504 is Series 9 XM GM9445, MT6779 Helio P90
ProfilingCompilerCLIWrapper.exe -a spv -b 24.50.208.504 -i vertex_shader_0.spv . -x -t v

```

Since I cannot seem to reproduce the issue even with a quite close driver version, I would say something else is involved. One case could be numerical precission affecting the conditions to exit the while loop.

I would recommend to follow an incremental approach. For the vkCmdDrawIndexed(24576, 1) draw call I would follow the steps below, trying to identify at what point the issue happens so it can be related to the latest code fragments added:

- Start with a plain color fragment shader.
- Use just one of the two textures combined in the shader.
- Use the two textures.
- Add the shadow mapping part.

Please let me know if after those steps you still do not get the issue identified.

Best regards,  
Alejandro

---

_[View the full topic](https://forums.imgtec.com/t/powervr-gm-9446-vkcmddrawindexed-crash/3854)._
