From 4759db261fc94eca51a6442bfeb0f997fc81d31e Mon Sep 17 00:00:00 2001 From: Cherser-s <29800876+Cherser-s@users.noreply.github.com> Date: Thu, 29 Dec 2022 19:11:45 +0300 Subject: [PATCH] amdilc: increase minimum buffer size for source and destination modifiers --- src/amdilc/amdilc_decoder.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/amdilc/amdilc_decoder.c b/src/amdilc/amdilc_decoder.c index 56756a19..994da9e0 100644 --- a/src/amdilc/amdilc_decoder.c +++ b/src/amdilc/amdilc_decoder.c @@ -174,7 +174,7 @@ static void reserveSources( unsigned size = (kernel->srcCount + srcCount) * sizeof(Source); if (kernel->srcSize < size) { if (kernel->srcSize == 0) { - kernel->srcSize = sizeof(Source); + kernel->srcSize = sizeof(Source) * 128; } while (kernel->srcSize < size) { kernel->srcSize *= BUFFER_ALLOC_FACTOR; @@ -194,7 +194,7 @@ static void reserveDestinations( unsigned size = (kernel->dstCount + dstCount) * sizeof(Destination); if (kernel->dstSize < size) { if (kernel->dstSize == 0) { - kernel->dstSize = sizeof(Destination); + kernel->dstSize = sizeof(Destination) * 128; } while (kernel->dstSize < size) { kernel->dstSize *= BUFFER_ALLOC_FACTOR; @@ -214,7 +214,7 @@ static unsigned reserveExtras( unsigned currentExtrasCount = kernel->extraCount; if (kernel->extraSize < size) { if (kernel->extraSize == 0) { - kernel->extraSize = sizeof(Token); + kernel->extraSize = sizeof(Token) * 128; } while (kernel->extraSize < size) { kernel->extraSize *= BUFFER_ALLOC_FACTOR;