Remove isCleanLeftoverMemoryRequired() + refactor sampler support path
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
parent
6073702941
commit
52b63be026
|
@ -167,7 +167,6 @@ struct CommandQueueHw : public CommandQueueImp {
|
||||||
inline void dispatchTaskCountPostSyncByMiFlushDw(bool isDispatchTaskCountPostSyncRequired, NEO::LinearStream &commandStream);
|
inline void dispatchTaskCountPostSyncByMiFlushDw(bool isDispatchTaskCountPostSyncRequired, NEO::LinearStream &commandStream);
|
||||||
NEO::SubmissionStatus prepareAndSubmitBatchBuffer(CommandListExecutionContext &ctx, NEO::LinearStream &innerCommandStream);
|
NEO::SubmissionStatus prepareAndSubmitBatchBuffer(CommandListExecutionContext &ctx, NEO::LinearStream &innerCommandStream);
|
||||||
|
|
||||||
inline bool isCleanLeftoverMemoryRequired();
|
|
||||||
inline void cleanLeftoverMemory(NEO::LinearStream &outerCommandStream, NEO::LinearStream &innerCommandStream);
|
inline void cleanLeftoverMemory(NEO::LinearStream &outerCommandStream, NEO::LinearStream &innerCommandStream);
|
||||||
inline void updateTaskCountAndPostSync(bool isDispatchTaskCountPostSyncRequired);
|
inline void updateTaskCountAndPostSync(bool isDispatchTaskCountPostSyncRequired);
|
||||||
inline ze_result_t waitForCommandQueueCompletionAndCleanHeapContainer();
|
inline ze_result_t waitForCommandQueueCompletionAndCleanHeapContainer();
|
||||||
|
|
|
@ -1046,7 +1046,7 @@ NEO::SubmissionStatus CommandQueueHw<gfxCoreFamily>::prepareAndSubmitBatchBuffer
|
||||||
*(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd;
|
*(MI_BATCH_BUFFER_END *)buffer = GfxFamily::cmdInitBatchBufferEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get() || isCleanLeftoverMemoryRequired()) {
|
if (ctx.isNEODebuggerActive(this->device) || NEO::DebugManager.flags.EnableSWTags.get() || csr->getLogicalStateHelper()) {
|
||||||
cleanLeftoverMemory(outerCommandStream, innerCommandStream);
|
cleanLeftoverMemory(outerCommandStream, innerCommandStream);
|
||||||
} else if (this->alignedChildStreamPadding) {
|
} else if (this->alignedChildStreamPadding) {
|
||||||
void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding);
|
void *paddingPtr = innerCommandStream.getSpace(this->alignedChildStreamPadding);
|
||||||
|
@ -1226,9 +1226,4 @@ void CommandQueueHw<gfxCoreFamily>::programRequiredStateComputeModeForCommandLis
|
||||||
csrState.stateComputeMode.setProperties(cmdListFinal.stateComputeMode);
|
csrState.stateComputeMode.setProperties(cmdListFinal.stateComputeMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <GFXCORE_FAMILY gfxCoreFamily>
|
|
||||||
bool CommandQueueHw<gfxCoreFamily>::isCleanLeftoverMemoryRequired() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
#include "shared/source/helpers/hw_helper.h"
|
#include "shared/source/helpers/hw_helper.h"
|
||||||
#include "shared/source/helpers/pipe_control_args.h"
|
#include "shared/source/helpers/pipe_control_args.h"
|
||||||
#include "shared/source/helpers/state_base_address.h"
|
#include "shared/source/helpers/state_base_address.h"
|
||||||
#include "shared/source/helpers/state_base_address_xehp_and_later.inl"
|
|
||||||
#include "shared/source/os_interface/hw_info_config.h"
|
#include "shared/source/os_interface/hw_info_config.h"
|
||||||
|
|
||||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.h"
|
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.h"
|
||||||
|
|
|
@ -60,7 +60,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandListTests, whenCommandListIsCreatedThenPCAnd
|
||||||
|
|
||||||
auto cmdSba = genCmdCast<STATE_BASE_ADDRESS *>(*itor);
|
auto cmdSba = genCmdCast<STATE_BASE_ADDRESS *>(*itor);
|
||||||
|
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if (device->getNEODevice()->getDeviceInfo().imageSupport) {
|
||||||
auto dsh = commandContainer.getIndirectHeap(NEO::HeapType::DYNAMIC_STATE);
|
auto dsh = commandContainer.getIndirectHeap(NEO::HeapType::DYNAMIC_STATE);
|
||||||
EXPECT_TRUE(cmdSba->getDynamicStateBaseAddressModifyEnable());
|
EXPECT_TRUE(cmdSba->getDynamicStateBaseAddressModifyEnable());
|
||||||
EXPECT_TRUE(cmdSba->getDynamicStateBufferSizeModifyEnable());
|
EXPECT_TRUE(cmdSba->getDynamicStateBufferSizeModifyEnable());
|
||||||
|
@ -129,7 +129,7 @@ HWTEST2_F(CommandListTests, whenCommandListIsCreatedAndProgramExtendedPipeContro
|
||||||
ASSERT_NE(cmdList.end(), itor);
|
ASSERT_NE(cmdList.end(), itor);
|
||||||
|
|
||||||
auto cmdSba = genCmdCast<STATE_BASE_ADDRESS *>(*itor);
|
auto cmdSba = genCmdCast<STATE_BASE_ADDRESS *>(*itor);
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if (device->getNEODevice()->getDeviceInfo().imageSupport) {
|
||||||
auto dsh = commandContainer.getIndirectHeap(NEO::HeapType::DYNAMIC_STATE);
|
auto dsh = commandContainer.getIndirectHeap(NEO::HeapType::DYNAMIC_STATE);
|
||||||
EXPECT_TRUE(cmdSba->getDynamicStateBaseAddressModifyEnable());
|
EXPECT_TRUE(cmdSba->getDynamicStateBaseAddressModifyEnable());
|
||||||
EXPECT_TRUE(cmdSba->getDynamicStateBufferSizeModifyEnable());
|
EXPECT_TRUE(cmdSba->getDynamicStateBufferSizeModifyEnable());
|
||||||
|
|
|
@ -152,7 +152,9 @@ size_t HardwareCommandsHelper<GfxFamily>::sendInterfaceDescriptorData(
|
||||||
interfaceDescriptor.setBindingTablePointer(static_cast<uint32_t>(bindingTablePointer));
|
interfaceDescriptor.setBindingTablePointer(static_cast<uint32_t>(bindingTablePointer));
|
||||||
|
|
||||||
if constexpr (GfxFamily::supportsSampler) {
|
if constexpr (GfxFamily::supportsSampler) {
|
||||||
interfaceDescriptor.setSamplerStatePointer(static_cast<uint32_t>(offsetSamplerState));
|
if (device.getDeviceInfo().imageSupport) {
|
||||||
|
interfaceDescriptor.setSamplerStatePointer(static_cast<uint32_t>(offsetSamplerState));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EncodeDispatchKernel<GfxFamily>::adjustBindingTablePrefetch(interfaceDescriptor, numSamplers, bindingTablePrefetchSize);
|
EncodeDispatchKernel<GfxFamily>::adjustBindingTablePrefetch(interfaceDescriptor, numSamplers, bindingTablePrefetchSize);
|
||||||
|
|
|
@ -233,7 +233,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCsrWhenCollectState
|
||||||
uint64_t commandOffset = 0xa;
|
uint64_t commandOffset = 0xa;
|
||||||
uint64_t generalStateBase = 0xff;
|
uint64_t generalStateBase = 0xff;
|
||||||
|
|
||||||
mockCsr->collectStateBaseAddresPatchInfo(baseAddress, commandOffset, &dsh, &ioh, &ssh, generalStateBase);
|
mockCsr->collectStateBaseAddresPatchInfo(baseAddress, commandOffset, &dsh, &ioh, &ssh, generalStateBase, deviceUsesDsh);
|
||||||
|
|
||||||
ASSERT_EQ(mockHelper->patchInfoDataVector.size(), expectedCallsCount);
|
ASSERT_EQ(mockHelper->patchInfoDataVector.size(), expectedCallsCount);
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ HWTEST2_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCsrWhenCollectState
|
||||||
EXPECT_EQ(patch.sourceAllocationOffset, 0u);
|
EXPECT_EQ(patch.sourceAllocationOffset, 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
//DSH
|
// DSH
|
||||||
if (deviceUsesDsh) {
|
if (deviceUsesDsh) {
|
||||||
PatchInfoData dshPatch = mockHelper->patchInfoDataVector[dshPatchIndex];
|
PatchInfoData dshPatch = mockHelper->patchInfoDataVector[dshPatchIndex];
|
||||||
EXPECT_EQ(dshPatch.sourceAllocation, dsh.getGraphicsAllocation()->getGpuAddress());
|
EXPECT_EQ(dshPatch.sourceAllocation, dsh.getGraphicsAllocation()->getGpuAddress());
|
||||||
|
@ -250,19 +250,19 @@ HWTEST2_F(CommandStreamReceiverFlushTaskGmockTests, givenMockCsrWhenCollectState
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (TestTraits<gfxCoreFamily>::iohInSbaSupported) {
|
if constexpr (TestTraits<gfxCoreFamily>::iohInSbaSupported) {
|
||||||
//IOH
|
// IOH
|
||||||
PatchInfoData iohPatch = mockHelper->patchInfoDataVector[iohPatchIndex];
|
PatchInfoData iohPatch = mockHelper->patchInfoDataVector[iohPatchIndex];
|
||||||
|
|
||||||
EXPECT_EQ(iohPatch.sourceAllocation, ioh.getGraphicsAllocation()->getGpuAddress());
|
EXPECT_EQ(iohPatch.sourceAllocation, ioh.getGraphicsAllocation()->getGpuAddress());
|
||||||
EXPECT_EQ(iohPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INDIRECTOBJECTBASEADDRESS_BYTEOFFSET);
|
EXPECT_EQ(iohPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::INDIRECTOBJECTBASEADDRESS_BYTEOFFSET);
|
||||||
}
|
}
|
||||||
|
|
||||||
//SSH
|
// SSH
|
||||||
PatchInfoData sshPatch = mockHelper->patchInfoDataVector[sshPatchIndex];
|
PatchInfoData sshPatch = mockHelper->patchInfoDataVector[sshPatchIndex];
|
||||||
EXPECT_EQ(sshPatch.sourceAllocation, ssh.getGraphicsAllocation()->getGpuAddress());
|
EXPECT_EQ(sshPatch.sourceAllocation, ssh.getGraphicsAllocation()->getGpuAddress());
|
||||||
EXPECT_EQ(sshPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::SURFACESTATEBASEADDRESS_BYTEOFFSET);
|
EXPECT_EQ(sshPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::SURFACESTATEBASEADDRESS_BYTEOFFSET);
|
||||||
|
|
||||||
//GSH
|
// GSH
|
||||||
PatchInfoData gshPatch = mockHelper->patchInfoDataVector[gshPatchIndex];
|
PatchInfoData gshPatch = mockHelper->patchInfoDataVector[gshPatchIndex];
|
||||||
EXPECT_EQ(gshPatch.sourceAllocation, generalStateBase);
|
EXPECT_EQ(gshPatch.sourceAllocation, generalStateBase);
|
||||||
EXPECT_EQ(gshPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::GENERALSTATEBASEADDRESS_BYTEOFFSET);
|
EXPECT_EQ(gshPatch.targetAllocationOffset, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::GENERALSTATEBASEADDRESS_BYTEOFFSET);
|
||||||
|
|
|
@ -126,31 +126,33 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
|
||||||
|
|
||||||
PreemptionHelper::programInterfaceDescriptorDataPreemption<Family>(&idd, args.preemptionMode);
|
PreemptionHelper::programInterfaceDescriptorDataPreemption<Family>(&idd, args.preemptionMode);
|
||||||
|
|
||||||
if constexpr (Family::supportsSampler) {
|
uint32_t samplerCount = 0;
|
||||||
uint32_t samplerStateOffset = 0;
|
|
||||||
uint32_t samplerCount = 0;
|
|
||||||
|
|
||||||
if (kernelDescriptor.payloadMappings.samplerTable.numSamplers > 0) {
|
if (args.device->getDeviceInfo().imageSupport) {
|
||||||
auto heap = ApiSpecificConfig::getBindlessConfiguration() ? args.device->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH) : container.getIndirectHeap(HeapType::DYNAMIC_STATE);
|
if constexpr (Family::supportsSampler) {
|
||||||
UNRECOVERABLE_IF(!heap);
|
uint32_t samplerStateOffset = 0;
|
||||||
|
|
||||||
samplerCount = kernelDescriptor.payloadMappings.samplerTable.numSamplers;
|
if (kernelDescriptor.payloadMappings.samplerTable.numSamplers > 0) {
|
||||||
samplerStateOffset = EncodeStates<Family>::copySamplerState(
|
auto heap = ApiSpecificConfig::getBindlessConfiguration() ? args.device->getBindlessHeapsHelper()->getHeap(BindlessHeapsHelper::GLOBAL_DSH) : container.getIndirectHeap(HeapType::DYNAMIC_STATE);
|
||||||
heap, kernelDescriptor.payloadMappings.samplerTable.tableOffset,
|
UNRECOVERABLE_IF(!heap);
|
||||||
kernelDescriptor.payloadMappings.samplerTable.numSamplers, kernelDescriptor.payloadMappings.samplerTable.borderColor,
|
|
||||||
args.dispatchInterface->getDynamicStateHeapData(),
|
samplerCount = kernelDescriptor.payloadMappings.samplerTable.numSamplers;
|
||||||
args.device->getBindlessHeapsHelper(), hwInfo);
|
samplerStateOffset = EncodeStates<Family>::copySamplerState(
|
||||||
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
heap, kernelDescriptor.payloadMappings.samplerTable.tableOffset,
|
||||||
container.getResidencyContainer().push_back(args.device->getBindlessHeapsHelper()->getHeap(NEO::BindlessHeapsHelper::BindlesHeapType::GLOBAL_DSH)->getGraphicsAllocation());
|
kernelDescriptor.payloadMappings.samplerTable.numSamplers, kernelDescriptor.payloadMappings.samplerTable.borderColor,
|
||||||
|
args.dispatchInterface->getDynamicStateHeapData(),
|
||||||
|
args.device->getBindlessHeapsHelper(), hwInfo);
|
||||||
|
if (ApiSpecificConfig::getBindlessConfiguration()) {
|
||||||
|
container.getResidencyContainer().push_back(args.device->getBindlessHeapsHelper()->getHeap(NEO::BindlessHeapsHelper::BindlesHeapType::GLOBAL_DSH)->getGraphicsAllocation());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
idd.setSamplerStatePointer(samplerStateOffset);
|
idd.setSamplerStatePointer(samplerStateOffset);
|
||||||
EncodeDispatchKernel<Family>::adjustBindingTablePrefetch(idd, samplerCount, bindingTableStateCount);
|
}
|
||||||
} else {
|
|
||||||
EncodeDispatchKernel<Family>::adjustBindingTablePrefetch(idd, 0u, bindingTableStateCount);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EncodeDispatchKernel<Family>::adjustBindingTablePrefetch(idd, samplerCount, bindingTableStateCount);
|
||||||
|
|
||||||
uint64_t offsetThreadData = 0u;
|
uint64_t offsetThreadData = 0u;
|
||||||
const uint32_t inlineDataSize = sizeof(INLINE_DATA);
|
const uint32_t inlineDataSize = sizeof(INLINE_DATA);
|
||||||
auto crossThreadData = args.dispatchInterface->getCrossThreadData();
|
auto crossThreadData = args.dispatchInterface->getCrossThreadData();
|
||||||
|
|
|
@ -86,7 +86,8 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||||
const LinearStream *dsh,
|
const LinearStream *dsh,
|
||||||
const LinearStream *ioh,
|
const LinearStream *ioh,
|
||||||
const LinearStream *ssh,
|
const LinearStream *ssh,
|
||||||
uint64_t generalStateBase);
|
uint64_t generalStateBase,
|
||||||
|
bool imagesSupported);
|
||||||
|
|
||||||
void collectStateBaseAddresIohPatchInfo(uint64_t commandBufferAddress, uint64_t commandOffset, const LinearStream &ioh);
|
void collectStateBaseAddresIohPatchInfo(uint64_t commandBufferAddress, uint64_t commandOffset, const LinearStream &ioh);
|
||||||
|
|
||||||
|
|
|
@ -444,7 +444,8 @@ CompletionStamp CommandStreamReceiverHw<GfxFamily>::flushTask(
|
||||||
EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs, false, hwInfo, isRcs());
|
EncodeWA<GfxFamily>::encodeAdditionalPipelineSelect(commandStreamCSR, dispatchFlags.pipelineSelectArgs, false, hwInfo, isRcs());
|
||||||
|
|
||||||
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
|
||||||
collectStateBaseAddresPatchInfo(commandStream.getGraphicsAllocation()->getGpuAddress(), stateBaseAddressCmdOffset, dsh, ioh, ssh, newGSHbase);
|
collectStateBaseAddresPatchInfo(commandStream.getGraphicsAllocation()->getGpuAddress(), stateBaseAddressCmdOffset, dsh, ioh, ssh, newGSHbase,
|
||||||
|
device.getDeviceInfo().imageSupport);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -998,10 +999,11 @@ void CommandStreamReceiverHw<GfxFamily>::collectStateBaseAddresPatchInfo(
|
||||||
const LinearStream *dsh,
|
const LinearStream *dsh,
|
||||||
const LinearStream *ioh,
|
const LinearStream *ioh,
|
||||||
const LinearStream *ssh,
|
const LinearStream *ssh,
|
||||||
uint64_t generalStateBase) {
|
uint64_t generalStateBase,
|
||||||
|
bool imagesSupported) {
|
||||||
|
|
||||||
typedef typename GfxFamily::STATE_BASE_ADDRESS STATE_BASE_ADDRESS;
|
typedef typename GfxFamily::STATE_BASE_ADDRESS STATE_BASE_ADDRESS;
|
||||||
if constexpr (GfxFamily::supportsSampler) {
|
if (imagesSupported) {
|
||||||
PatchInfoData dynamicStatePatchInfo = {dsh->getGraphicsAllocation()->getGpuAddress(), 0u, PatchInfoAllocationType::DynamicStateHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::DYNAMICSTATEBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default};
|
PatchInfoData dynamicStatePatchInfo = {dsh->getGraphicsAllocation()->getGpuAddress(), 0u, PatchInfoAllocationType::DynamicStateHeap, baseAddress, commandOffset + STATE_BASE_ADDRESS::PATCH_CONSTANTS::DYNAMICSTATEBASEADDRESS_BYTEOFFSET, PatchInfoAllocationType::Default};
|
||||||
flatBatchBufferHelper->setPatchInfoData(dynamicStatePatchInfo);
|
flatBatchBufferHelper->setPatchInfoData(dynamicStatePatchInfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -251,6 +251,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, giveNumBindingTableZeroWhe
|
||||||
|
|
||||||
EXPECT_EQ(idd.getBindingTablePointer(), 0u);
|
EXPECT_EQ(idd.getBindingTablePointer(), 0u);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SamplerSupportedMatcher {
|
struct SamplerSupportedMatcher {
|
||||||
template <PRODUCT_FAMILY productFamily>
|
template <PRODUCT_FAMILY productFamily>
|
||||||
static constexpr bool isMatched() {
|
static constexpr bool isMatched() {
|
||||||
|
@ -265,6 +266,11 @@ HWTEST2_F(CommandEncodeStatesTest, giveNumSamplersOneWhenDispatchKernelThensampl
|
||||||
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
using SAMPLER_STATE = typename FamilyType::SAMPLER_STATE;
|
||||||
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
|
||||||
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
|
using WALKER_TYPE = typename FamilyType::WALKER_TYPE;
|
||||||
|
|
||||||
|
if (!pDevice->getDeviceInfo().imageSupport) {
|
||||||
|
GTEST_SKIP();
|
||||||
|
}
|
||||||
|
|
||||||
uint32_t numSamplers = 1;
|
uint32_t numSamplers = 1;
|
||||||
SAMPLER_STATE samplerState;
|
SAMPLER_STATE samplerState;
|
||||||
memset(&samplerState, 2, sizeof(SAMPLER_STATE));
|
memset(&samplerState, 2, sizeof(SAMPLER_STATE));
|
||||||
|
@ -421,10 +427,12 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
|
||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if constexpr (FamilyType::supportsSampler) {
|
||||||
if (EncodeSurfaceState<FamilyType>::doBindingTablePrefetch()) {
|
if (pDevice->getDeviceInfo().imageSupport) {
|
||||||
EXPECT_NE(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
if (EncodeSurfaceState<FamilyType>::doBindingTablePrefetch()) {
|
||||||
} else {
|
EXPECT_NE(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
||||||
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
} else {
|
||||||
|
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -447,7 +455,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
|
||||||
|
|
||||||
EXPECT_EQ(0u, idd.getBindingTableEntryCount());
|
EXPECT_EQ(0u, idd.getBindingTableEntryCount());
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if constexpr (FamilyType::supportsSampler) {
|
||||||
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
if (pDevice->getDeviceInfo().imageSupport) {
|
||||||
|
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -469,7 +479,9 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, CommandEncodeStatesTest, givenForceBtpPrefetchModeD
|
||||||
|
|
||||||
EXPECT_NE(0u, idd.getBindingTableEntryCount());
|
EXPECT_NE(0u, idd.getBindingTableEntryCount());
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if constexpr (FamilyType::supportsSampler) {
|
||||||
EXPECT_NE(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
if (pDevice->getDeviceInfo().imageSupport) {
|
||||||
|
EXPECT_NE(INTERFACE_DESCRIPTOR_DATA::SAMPLER_COUNT_NO_SAMPLERS_USED, idd.getSamplerCount());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -316,7 +316,7 @@ HWTEST2_F(CommandEncodeStatesTest, givenCommandContainerWithDirtyHeapsWhenSetSta
|
||||||
auto itorCmd = find<STATE_BASE_ADDRESS *>(commands.begin(), commands.end());
|
auto itorCmd = find<STATE_BASE_ADDRESS *>(commands.begin(), commands.end());
|
||||||
auto pCmd = genCmdCast<STATE_BASE_ADDRESS *>(*itorCmd);
|
auto pCmd = genCmdCast<STATE_BASE_ADDRESS *>(*itorCmd);
|
||||||
|
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if (pDevice->getDeviceInfo().imageSupport) {
|
||||||
EXPECT_EQ(dsh->getHeapGpuBase(), pCmd->getDynamicStateBaseAddress());
|
EXPECT_EQ(dsh->getHeapGpuBase(), pCmd->getDynamicStateBaseAddress());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(dsh, nullptr);
|
EXPECT_EQ(dsh, nullptr);
|
||||||
|
@ -356,7 +356,7 @@ HWTEST_F(CommandEncodeStatesTest, givenCommandContainerWhenSetStateBaseAddressCa
|
||||||
ASSERT_NE(itorCmd, commands.end());
|
ASSERT_NE(itorCmd, commands.end());
|
||||||
|
|
||||||
auto cmd = genCmdCast<STATE_BASE_ADDRESS *>(*itorCmd);
|
auto cmd = genCmdCast<STATE_BASE_ADDRESS *>(*itorCmd);
|
||||||
if constexpr (FamilyType::supportsSampler) {
|
if (pDevice->getDeviceInfo().imageSupport) {
|
||||||
EXPECT_NE(dsh->getHeapGpuBase(), cmd->getDynamicStateBaseAddress());
|
EXPECT_NE(dsh->getHeapGpuBase(), cmd->getDynamicStateBaseAddress());
|
||||||
} else {
|
} else {
|
||||||
EXPECT_EQ(dsh, nullptr);
|
EXPECT_EQ(dsh, nullptr);
|
||||||
|
|
Loading…
Reference in New Issue