We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c4b31c commit bdfb6cbCopy full SHA for bdfb6cb
src/amdilc/amdilc_spirv.c
@@ -18,7 +18,10 @@ static void putBuffer(
18
unsigned size = (buffer->wordCount + otherBuffer->wordCount) * sizeof(IlcSpvWord);
19
if (buffer->wordSize < size) {
20
// Grow the buffer exponentially to minimize allocations
21
- buffer->wordSize = sizeof(IlcSpvWord);
+ if (buffer->wordSize < sizeof(IlcSpvWord)) {
22
+ buffer->wordSize = sizeof(IlcSpvWord) * 1024;
23
+ }
24
+
25
while (buffer->wordSize < size) {
26
buffer->wordSize *= BUFFER_ALLOC_FACTOR;
27
}
0 commit comments