Fix checking required DSH Size

This change simplifies calculating required DSH Size
and replaces wrong debug break conditiong causing
debug assertion fails in many tests with simple
check "calculatedDSHSize > allocatedDSHSize".

Related-To: NEO-6077

Signed-off-by: Krystian Chmielewski <krystian.chmielewski@intel.com>
This commit is contained in:
Krystian Chmielewski
2022-01-12 14:47:27 +00:00
committed by Compute-Runtime-Automation
parent ff79c84115
commit 79c8605ed2
2 changed files with 13 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2020-2021 Intel Corporation
* Copyright (C) 2020-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -1139,8 +1139,8 @@ NEO::DecodeError populateKernelDescriptor(NEO::ProgramInfo &dst, NEO::Elf::Elf<N
auto generatedDshPos = kernelDescriptor.generatedHeaps.size();
uint32_t generatedDshSize = 0U;
if (maxSamplerIndex >= 0) {
static constexpr auto maxSamplerStateSize = 16U;
static constexpr auto maxIndirectSamplerStateSize = 64U;
constexpr auto maxSamplerStateSize = 16U;
constexpr auto maxIndirectSamplerStateSize = 64U;
kernelDescriptor.kernelAttributes.flags.usesSamplers = true;
auto &samplerTable = kernelDescriptor.payloadMappings.samplerTable;