KhronosGroup / KhronosGroup/SPIRV-Tools

Optimizer: crash when overflowing

Open
#6,260 3 comments 0 reactions 1 assignee Claimed by @s-perron View on GitHub
component:optimization
Dominant language
C++
Stars
1.4k
Forks
709
Avg merge
1d 22h
Merged PRs (30d)
28

Description

Not sure this is related to #5753.
Up stream report: https://projects.blender.org/blender/blender/issues/144614

Optimizing [48744-0x000001d18b9e86a0-0x81098.dmp](https://github.com/user-attachments/files/21852550/48744-0x000001d18b9e86a0-0x81098.dmp) crashes. This is related to the number of object ids it requires during optimization.

```
spirv-opt.exe 48744-0x000001d18b9e86a0-0x81098.dmp -O -o opt.spv
```

To fix this the next commands are needed

```
spirv-opt.exe 48744-0x000001d18b9e86a0-0x81098.dmp --max-id-bound=99999999 -O -o bad.spv --compact-ids
```

However as we use shaderc as a frontend we don't have access to these parameters.

I would expect that the optimizer would not crash but would be able to normally exit. This way shaderc could be able to report this and Blender would be able to replace the shader with a default.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.