7
7
8
8
#include " shared/source/command_container/command_encoder.h"
9
9
#include " shared/source/command_container/encode_surface_state.h"
10
+ #include " shared/source/command_container/implicit_scaling.h"
10
11
#include " shared/source/command_stream/linear_stream.h"
11
12
#include " shared/source/gmm_helper/gmm_helper.h"
12
13
#include " shared/source/gmm_helper/gmm_lib.h"
13
14
#include " shared/source/helpers/definitions/command_encoder_args.h"
14
15
#include " shared/source/helpers/gfx_core_helper.h"
15
16
#include " shared/source/helpers/in_order_cmd_helpers.h"
17
+ #include " shared/source/helpers/pipe_control_args.h"
16
18
#include " shared/source/memory_manager/graphics_allocation.h"
17
19
#include " shared/source/memory_manager/memory_manager.h"
18
20
#include " shared/source/os_interface/product_helper.h"
@@ -475,4 +477,51 @@ HWTEST2_F(CommandEncoderTests, whenForcingLowQualityFilteringAndAppendSamplerSta
475
477
EXPECT_EQ (SAMPLER_STATE::LOW_QUALITY_FILTER_DISABLE, state.getLowQualityFilter ());
476
478
productHelper.adjustSamplerState (&state, *defaultHwInfo);
477
479
EXPECT_EQ (SAMPLER_STATE::LOW_QUALITY_FILTER_ENABLE, state.getLowQualityFilter ());
480
+ }
481
+
482
+ HWTEST2_F (CommandEncoderTests, whenAskingForImplicitScalingValuesThenAlwaysReturnStubs, IsAtMostGen12lp) {
483
+ using WalkerType = typename FamilyType::DefaultWalkerType;
484
+
485
+ MockExecutionEnvironment executionEnvironment{};
486
+ auto rootExecEnv = executionEnvironment.rootDeviceEnvironments [0 ].get ();
487
+
488
+ uint8_t buffer[128 ] = {};
489
+ LinearStream linearStream (buffer, sizeof (buffer));
490
+
491
+ WalkerType walkerCmd = {};
492
+
493
+ DeviceBitfield deviceBitField = 1 ;
494
+ uint32_t partitionCount = 1 ;
495
+
496
+ Vec3<size_t > vec3 = {1 , 1 , 1 };
497
+
498
+ EXPECT_EQ (0u , ImplicitScalingDispatch<FamilyType>::template getSize<WalkerType>(false , false , deviceBitField, vec3, vec3));
499
+
500
+ void *ptr = nullptr ;
501
+ ImplicitScalingDispatch<FamilyType>::dispatchCommands (linearStream, walkerCmd, &ptr, deviceBitField, RequiredPartitionDim::x, partitionCount, false , false , false , false , 0 , *defaultHwInfo);
502
+ EXPECT_EQ (0u , linearStream.getUsed ());
503
+
504
+ EXPECT_TRUE (ImplicitScalingDispatch<FamilyType>::getPipeControlStallRequired ());
505
+
506
+ EXPECT_EQ (0u , ImplicitScalingDispatch<FamilyType>::getBarrierSize (*rootExecEnv, false , false ));
507
+
508
+ PipeControlArgs pcArgs = {};
509
+ ImplicitScalingDispatch<FamilyType>::dispatchBarrierCommands (linearStream, deviceBitField, pcArgs, *rootExecEnv, 0 , 0 , false , false );
510
+ EXPECT_EQ (0u , linearStream.getUsed ());
511
+
512
+ EXPECT_EQ (0u , ImplicitScalingDispatch<FamilyType>::getRegisterConfigurationSize ());
513
+
514
+ ImplicitScalingDispatch<FamilyType>::dispatchRegisterConfiguration (linearStream, 0 , 0 );
515
+ EXPECT_EQ (0u , linearStream.getUsed ());
516
+
517
+ EXPECT_EQ (0u , ImplicitScalingDispatch<FamilyType>::getOffsetRegisterSize ());
518
+
519
+ ImplicitScalingDispatch<FamilyType>::dispatchOffsetRegister (linearStream, 0 );
520
+ EXPECT_EQ (0u , linearStream.getUsed ());
521
+
522
+ EXPECT_EQ (static_cast <uint32_t >(sizeof (uint64_t )), ImplicitScalingDispatch<FamilyType>::getImmediateWritePostSyncOffset ());
523
+
524
+ EXPECT_EQ (static_cast <uint32_t >(GfxCoreHelperHw<FamilyType>::getSingleTimestampPacketSizeHw ()), ImplicitScalingDispatch<FamilyType>::getTimeStampPostSyncOffset ());
525
+
526
+ EXPECT_FALSE (ImplicitScalingDispatch<FamilyType>::platformSupportsImplicitScaling (*rootExecEnv));
478
527
}
0 commit comments