diff options
| author | Omar Rizwan <omar@omar.website> | 2023-09-29 00:50:05 +0000 |
|---|---|---|
| committer | Omar Rizwan <omar@omar.website> | 2023-09-29 00:51:13 +0000 |
| commit | 96c865eecb7e5aa0481cd7cf2fdfdb7c42801830 (patch) | |
| tree | f4e271aaffd354fbff8d43bb4ff631c20f38f041 | |
| parent | language: Backport fully lexical fn (diff) | |
| download | folk-96c865eecb7e5aa0481cd7cf2fdfdb7c42801830.tar.gz folk-96c865eecb7e5aa0481cd7cf2fdfdb7c42801830.zip | |
Gpu: Die if we exceed max images
| -rw-r--r-- | pi/Gpu.tcl | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1351,6 +1351,10 @@ namespace eval ::Gpu { static int nextImageId = 0; static bool didInitializeDescriptors = false; int imageId = nextImageId++; + if (imageId >= $GPU_MAX_IMAGES) { + fprintf(stderr, "Gpu: Exceeded GPU_MAX_IMAGES\n"); + exit(22); + } { VkDescriptorImageInfo imageInfo = {0}; imageInfo.imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; |
