Commit Graph

307 Commits

Author SHA1 Message Date
Mrozek, Michal ca33e029b7 Fix profiling calculation for CPU profiling path.
-There was a precision problem with timestamp calculation, all math was using
integers which are not very precise in overflow scenarios
-Change the logic to use doubles and cast back to uint64_t at the end.

Change-Id: Ia08d504a90a43df7330f398af966535ed944650d
2018-02-19 19:08:23 +01:00
Artur Harasimiuk 063e9623ba cleanup around MockGmmStatus
remove not needed global variable from mock device and refactor gmm
context initialization for ULTs

Change-Id: I594938a7df7dfaaf7a3cf73f8a13ad85a7b58401
2018-02-19 18:58:20 +01:00
Chodor, Jaroslaw 1e422813b8 Externally synchronized event
Adding support for externally synchronized
events inside async events handler

Change-Id: Iddc5d3ae25577b792d197aa5b5857618201a3449
2018-02-19 16:01:29 +01:00
Milczarek, Slawomir 5c746131f1 HW CSR with AUB dump to operate on real device (HW Info)
This commit ensures AUB files to be dumped for real device
in the configuration CSR HW + CSR AUB.

Change-Id: I7b5f740440aae062d2f5ad7ad8b9c3b4f2207ddd
2018-02-19 13:11:43 +01:00
Artur Harasimiuk a99d951c55 clGetPlatformIDs should check if platform initialization was successful
Change-Id: I3e9d78155e6a914ed0d755d81ddc13c4d3a8a291
2018-02-19 12:12:29 +01:00
hjnapiat 5909a6b3d3 Add support for GT-Pin Callbacks [3/n]
Change-Id: Iea4b49efc9a666fde310ece15a9c69686d22f627
2018-02-19 10:43:19 +01:00
Artur Harasimiuk 89627bd81e fail platform initialization when no device found
Change-Id: I76c8e12cd908be36cd8747346c6e543e3b748933
2018-02-16 16:53:37 +01:00
mplewka e738e6aa48 Hint for map/unmap when queue is blocked
Change-Id: I8b2c79fac77325e26e2ead663177cef09b17e00b
2018-02-16 15:57:44 +01:00
Artur Harasimiuk 1f35f51b5e move VariableBackup to helpers
this is used in more places, not only va sharing

Change-Id: Idb6430d47e387e449ce5f4ff728be7e1e57b18eb
2018-02-16 14:39:37 +01:00
Artur Harasimiuk c9180fec65 create infrastructure for gen specific performance counters
Change-Id: I6ef471ade14ce27b6e5949726b57453a6fe69abc
2018-02-16 12:13:30 +01:00
Artur Harasimiuk d7687e32c4 small cleanup around Linux specific ULTs
- move main file to linux/ folder
- don't use default listener. follow main ULTs behavior

Change-Id: I236a42eef9d7bb3f61112f847aec7fc3e9f7873e
2018-02-16 11:46:29 +01:00
Zdanowicz, Zbigniew 86bb715b95 HostPtr surface makeResident must be called once
Change-Id: I9cb04e3affdd8b8634466621b50326a088ecdcf9
2018-02-16 11:11:37 +01:00
Mrozek, Michal f9254c8de6 Add new performance flag to steer NoRingFlushes CreateContext flag.
Change-Id: I51426c1c51a1e4133f9bcc3127ecdc5af51048cd
2018-02-16 10:47:24 +01:00
Dunajski, Bartosz e0ca78ccea Map/unmap enqueue fixes [3/n]: Map params inconsistency
- Introducing MapInfo struct which will be used as container for multiple
  map operations
- Unified mapped offset and size for Buffers and Images
- Fixed incorrect map params for CPU and GPU path
- Missing API level checks


Change-Id: Ib4077c9e2c0c333b131ffd5ccbc4a1404920eb5b
2018-02-16 08:28:29 +01:00
Dunajski, Bartosz 87ed3d4fff Improve page table manager initialization
Change-Id: Ifdd74bf93a93fcdecaae5b1276c0fa83a9664987
2018-02-15 13:31:50 +01:00
Mrozek, Michal acb044dce3 Fix DC flush programming in non concurrent scenarios.
-If out of order flag was disabled then pipe control was not having dc flush.
-This could led to a batch buffer that doesn't end with dc flush.
-This change adds differentiation between pipe controls that may be erased and
pipe controls that are used as a part of epilogue command

Change-Id: Ic9c970c75c89ff524a0e40506eff6dd097760145
2018-02-15 09:42:11 +01:00
Mrozek, Michal 2d0af9d4a4 Make sure that local workgroup size is properly passed for IOH estimation.
Change-Id: I0ad5da4fffd1575f64d44803ce8eb4a6a0ab1532
2018-02-15 07:57:39 +01:00
Zdanowicz, Zbigniew 8a5b0ee518 Debug variable must override HardwareInfo capability at DeviceFactory
RT must override engineType at DeviceFactory, since Wddm CSR uses HardwareInfo
at its ctor.
AUB tests must override engineType at Device ctor since they bypass
DeviceFactory.

Change-Id: I73e4066e9b16aed0410fe39a82726d3baea2e67f
2018-02-14 17:29:30 +01:00
Zdanowicz, Zbigniew 45dedb37f3 For HostPtr surfaces of enqueue calls use GPU address
Change-Id: I67bf5076d23d43438f5e82c5cb6cbd3b9ed2f152
2018-02-14 15:44:27 +01:00
mplewka 94c996a452 Provide hint when create zero copy image
Change-Id: I526a81e0d14daba98574575e8c945214b0bda810
2018-02-14 12:56:04 +01:00
Artur Harasimiuk 92198537a6 enable gcc7 with address sanitizer
because of deffered deletion some variables are dereferenced after
leaving test scope. this causes invalid stack memory accesses reported
by GCC 7.

Change-Id: I183be8ec3c815a41a75a1f71635d9afb560c7457
2018-02-14 10:37:22 +01:00
Dunajski, Bartosz 4f2a05ac88 Map/unmap enqueue fixes [2/n]: CPU operations on limited range
- Curently each non-zerocopy CPU operation on map/unmap make a full copy
  using hostPtr
- This commit adds functionality to select specific range of copy
- Multiple mapping with different size is not supported yet,
  so copy will be made on full range for now. This is for future usage.

Change-Id: I7652e85482ba6fffb2474169447baf9b080dcd1e
2018-02-13 16:29:01 +01:00
Jacek Danecki ff44e9922d Used ratified Khronos extension names
Change-Id: I15b62b6f5fb805efedec5cd9e14215a94d97c8f6
2018-02-13 13:33:27 +01:00
Mrozek, Michal 82a2afb611 Improve DC flush handling.
-Do not flush dc for every command in batched mode
-Do that only in immediate mode
-For commands that needs DC do not noop pipe controls
-Ensure that each command buffer in batching mode ends with dc flush.

Change-Id: I3cd9d1831c19b69c66092687922f20df7e330245
2018-02-13 11:37:11 +01:00
Mrozek, Michal d563059c14 Remove redundant code from flushWaitList.
Change-Id: Iab4cb856ce324a785b052b8638ef23aef43c9bc9
2018-02-13 10:40:33 +01:00
Zdanowicz, Zbigniew d6b5433f14 Lower Windows minimal address to 16kB
Change-Id: I138438943d438ace0b5d76e04f3af8d9541d532a
2018-02-12 18:04:56 +01:00
Zdanowicz, Zbigniew 5a175cf1cf Override engine type used by device in Device ctor
AUB tests do not use DeviceFactory class to create Device objects but still
need to have a functionality to override default engine type

Change-Id: I6841cb0a9c5726ac4308c742c78cf7a61829f168
2018-02-12 16:50:35 +01:00
Mrozek, Michal b5dab07aa2 Do not allow out of order execution for shared objects.
Change-Id: I2dbbd8f09485bd894774eb2c4548326475a41221
2018-02-12 10:36:23 +01:00
Dunajski, Bartosz 72b78d15ee Map/unmap enqueue fixes [1/n]: Unify Buffer and Image paths
Change-Id: I59bf18072c15367ff6caec5dbdc1350ea2d93281
2018-02-09 17:35:03 +01:00
Mrozek, Michal 6bb83fb95a Do not noop pipe controls if call is returning event on IOQ.
-For in order queue application can have fine grain granularity of completion
-For out of order queue application wants to execute workloads concurrently
-This change disables pipe control nooping for ioq calls when event returned.

Change-Id: Iaeaf677f768f7434b2efa1842b50653ab80777ad
2018-02-09 11:57:44 +01:00
Hoppe, Mateusz 012b8bd73c Adding initial PreemptionMode::Initial
- account for initial setting (when set mode was equal to initial(Disabled))
estimate size in cmdStreamCS, program MMIO

Change-Id: Ice218ae986583c8f3bab4f4f6979e38f03e30d7e
2018-02-08 16:21:52 +01:00
mplewka 4db1e3af6a Check zeroCopy flag for r/w images/buffers
Change-Id: I7047ae8458bdf3528d6014137522a37561d15ab6
2018-02-08 13:55:44 +01:00
Zdanowicz, Zbigniew a1db4ddd7a Retry Wddm mapGPUVA after failure when deferred deleter is set
mapGPUVA will fail when allocation is still in deferred deleter and using
the same base pointer to map, while there is no reserveGPUVA for SVM range.
In that case driver should drain deleter and retry mapGPUVA call

Change-Id: I4ded7d79e0cd935ec62d7fae785d66570c847535
2018-02-08 10:28:40 +01:00
Mateusz Jablonski ea021f8d69 Cmake refactor part 1: fix dependencies with including os_inc.h
Remove some not needed includes

Change-Id: I158ad663ccfcec4822e3768df9d05090c5e096f9
2018-02-08 09:40:40 +01:00
Mateusz Jablonski 0178b9862f Cmake refactor part 3:
Move defining genX sources logic to separated cmake file
Fix defining hw src include path

Change-Id: Id89125ab6f461fbcf5162157f76e0fbe0544fa69
2018-02-08 09:23:37 +01:00
Dunajski, Bartosz 3a305018ba GLK device ID support
Change-Id: I6cceb83739b39b6e97fa3c2d938739b204e23f22
2018-02-08 08:45:34 +01:00
Mrozek, Michal d8f2142faa Enable out of order execution for all submissions.
- This change enabled multiple independent command queues to execute
concurrently without stalling pipe controls in between
- This change removes L3 flushes between kernels
- Dependencies between commands are resolved via task level mechanism
- Out of order queues are not changing task level between submissions
- In order queues are increasing task level between submissions
- Whenever task level changes there is pipe control with cs stall emitted
between GPGPU_WALKERs

Change-Id: I558653b296424e4775d060df3072e2a50684b715
2018-02-08 08:22:04 +01:00
Mrozek, Michal c17a2f70fd Do not update tag on pipe control with level change.
- Tag should be updated only as a part of epilogue.
- Level change should only emit pipe control with cs stall

Change-Id: I6e04f794641818b0d046523776d3ce87aec9f606
2018-02-07 14:56:35 +01:00
Dunajski, Bartosz dbe3bdb8a3 Append LRI params for Translation Table callbacks
Change-Id: I8f0f81f9c49edf83f76b38cf886143ac018ec400
2018-02-07 13:04:20 +01:00
Mrozek, Michal 006d248de6 Always set DisableGpuTimeout.
Reg key for preemption may not be available, this doesn't mean that
preemption is off.

Change-Id: If7c8a8228fbfa9f01f95d61d4134bd398e4079f6
2018-02-06 19:21:06 +01:00
mplewka 21c1dce943 Enable zero copy for enqueueImage r/w with hints
Change-Id: I6d4379b4bebaca162f859ea790f6a77475f7e94e
2018-02-06 19:00:15 +01:00
Zdunowski, Piotr 1cfe5344fc Enable throttle hints extension.
Change-Id: I996fce8dbc792d77dc85df143ba5c0aa1cad83e5
2018-02-06 17:01:37 +01:00
Dunajski, Bartosz bdee42ca16 devices.m separation for Linux
Change-Id: Ia8e430db4dfcefc1b19e23e9cd7113bf87f0a7af
2018-02-06 15:24:20 +01:00
Zdunowski, Piotr 6ef0581a02 Device caps fixes.
Change-Id: I07cfd98f525ce2b87bc5f96060ed31fb9fc48783
2018-02-06 14:24:16 +01:00
Milczarek, Slawomir 89be67b570 Add support for DAF injection
This commit adds support for Debug Assistance Functionality (DAF)
aka "Driver Aubcapture" to debug builds on Windows.

Change-Id: I7e859d32af17a6fcee23868392df6cd1390e4afd
2018-02-05 16:08:52 +01:00
Mrozek, Michal caaeabcd09 Set flushstamp only if client provides it.
- Fix a data race where setting flush stamp with default value was
setting the flushtamp to initialized state

Change-Id: Ifc6bdd341b5fe2f2cf4e28bbff271b9a90915db5
2018-02-05 15:55:26 +01:00
Mrozek, Michal 28758fc336 [2/n] Optimize CPU code
-Do not inc/dec reference count for flush stamps while used only for
update
-FlushStamp doesn't need to be atomic,replace with atomic bool flag
to prevent usage while uniinitialized
-Clean not needed private new

Change-Id: Idad2b318f988de1e7af7642047c67f931e9772aa
2018-02-05 11:02:17 +01:00
Dunajski, Bartosz 80eefc79f3 Fix normalizing factor for SNORM formats
Change-Id: I4febe3a557762b94c0c4445015c948d45a4390d2
2018-02-02 16:10:48 +01:00
Mrozek, Michal 5167e3da69 [1/n] optimize CPU code.
Limit the amount of atomic operations while decrementing ref count from 2 to 1

Change-Id: I0e9e9f07abd1aa62a3967ce4f83ffe2cc288765a
2018-02-02 15:58:37 +01:00
Dunajski, Bartosz 844f956244 Remove redundant/recursive checks in unmap operations
- Some of the paths were made only for ULTs
- Params like mappedPtr were ignored
- Improve confusing method names
- Fix for memory leak in map shared buffer path (not tested code)

Change-Id: I8a69035f1d1c340f2d131a6f8d7e13116e3ddabc
2018-02-02 10:36:09 +01:00
Zdanowicz, Zbigniew 292f8fae90 Use alignedSize for map range and to calculate trim budget
Change-Id: Iceaf5c1d7fd1abfa6bdb08c97a439dba3bbccdf4
2018-02-01 19:20:27 +01:00
Jacek Danecki 73e2e72d07 waSamplerCacheFlushBetweenRedescribedSurfaceReads fix
Change-Id: Id322f58ce6997c8710ed2d8faf4f3c3f3d2ef0c3
2018-02-01 15:37:18 +01:00
Mrozek, Michal e35a066f79 Change the instruction heap size to be at least 512KB.
- Instruction heap is currently heavily used as every kernel copies ISA into
 it.
- It dries out very fast and each change to new heap requires whole pipeline
drain that prevents concurrency
- Problem is even larger when sip kernel is used as it limits the total heap
size
- In order to maximize heap re-use and to limit the count of pipeline drains
this change introduces new minimal size for instruction heap 512 KB.

Change-Id: Ic54e9ef4448b1d35dab01b084ee1d59b509642cb
2018-02-01 13:10:39 +01:00
Dunajski, Bartosz 8974af4de8 SNORM formats support
Change-Id: I4138a3e96788aab2a8f3af108dcbfa6f81006bf9
2018-02-01 11:18:01 +01:00
Brandon Fliflet e719ec4c47 disable dumping of buffers or images by regkey in AUBs
Change-Id: I0dc6cf5a9c4df3e2f2057870045a2f10a4a80720
2018-02-01 09:51:48 +01:00
Zdanowicz, Zbigniew bf270c4643 Use reserved memory to map GPU VA when cpu memory doesnt meet restrictions
Change-Id: I9f255a3f2ce6b1c22110e7da6e90c013f1f598e6
2018-01-31 18:05:11 +01:00
Mrozek, Michal 37c7e27276 Fix heap size programming.
- In various scenarios code was not programming the max heap size correctly
- It was possible for SSH to overcome the limit
- Size was programmed smaller then it really was, which resulted in smaller
reuse, which led to SBA reprogramming which led to lower performance in ooq
scenarios
- This change fixes the heap size programming by always utilizing full
allocation size and always limiting SSH at proper value

Change-Id: Ib703d2b0709ed8227a293def3a454bf1bb516dfd
2018-01-31 17:35:32 +01:00
Mateusz Jablonski 285ecbd9cb Add method to append gen specific surface state params
Add method to check if image format has alpha channel

Change-Id: I138f766c17654917b0357b1ec2250a8489738bef
2018-01-31 17:18:41 +01:00
Mateusz Jablonski 1d135a6a03 Fix calculating required cmd size
Change-Id: I3b409ca5eacc20f068b66df1fec5502dac41763d
2018-01-31 14:58:39 +01:00
Mrozek, Michal 9f048c8ce7 Add flag -fpreserve-vec3-type to internal options.
This flags informs compiler to not promote vec3 to vec4.

Change-Id: I98d04954ccf07c625c64831087adf1d5abd38bf5
2018-01-31 12:36:24 +01:00
Mateusz Jablonski 4aaa726758 Add method to add gen specific sampler state params
Change-Id: I6ea3747deabc9bc2aca38dce1ddfcca5158b9f41
2018-01-31 08:44:00 +01:00
Dale Stimson 5f98d9f9ff Add braces to avoid ambiguous 'else'
For the new Linux/Fedora configuration with introduction of gcc 7.2,
compilation of this file issues a new warning due to the correct
diagnosis of an ambiguous 'else'.  As warnings are being treated as
errors, this aborts the build.

The diagnostic:
    vpg-compute-neo/unit_tests/elflib/elflib_tests.cpp:123:12:
    error: suggest explicit braces to avoid ambiguous 'else'
    [-Werror=dangling-else]
	     if (nonfailingAllocation == failureIndex)
		^

Diagnosis: The diagnostic suggested that this:
    if (nonfailingAllocation == failureIndex)
	ASSERT_NE(nullptr, pWriter);
should be changed to:
    if (nonfailingAllocation == failureIndex) {
	ASSERT_NE(nullptr, pWriter);
    }

This is a valid suggestion.  The same is true for EXPECT_EQ.

Pick the files in repository
ssh://gerrit-gfx.intel.com:29418/mirrors/github/google/googletest
for tracing the definition. (There are many versions of gtest.h under
the ufo tree).

Starting in file include/gtest/gtest.h, the definition of ASSERT_NE can
be traced back towards its origin as follows:

ASSERT_NE               include/gtest/gtest.h
GTEST_ASSERT_NE         include/gtest/gtest.h
ASSERT_PRED_FORMAT2     include/gtest/gtest_pred_impl.h
GTEST_PRED_FORMAT2_     include/gtest/gtest_pred_impl.h
GTEST_ASSERT_           include/gtest/gtest_pred_impl.h

where GTEST_ASSERT_ indeed *should* be enclosed in braces.

  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
    ; \
  else \
    on_failure(gtest_ar.failure_message())

The correct fix would be to place the braces in the macro definition.
However, as file gtest.h comes from Google, and as there are 37
different versions of it in the source tree, this workaround will
address the macro invocations.  Should it be desirable, it is left
to others to correct gtest.h and friends.

Change-Id: I870d38ba623fc7564f894c7b1ea7512b74244ee2
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>
2018-01-30 18:23:41 +01:00
Mrozek, Michal e6603a56f4 Create sip kernel when device is created
- This moves expensive sip kernel creation outside of enqueueNDRangeKernel

Change-Id: I4d09df46d993fa8f751468ed3adcff056e05ce13
2018-01-30 16:49:01 +01:00
Milczarek, Slawomir 7c038eb7a4 Add AUB generation in parallel to execution on GPU
This commit adds basic for parallel AUB generation and execution on GPU.

Change-Id: I3c77557a9578db05c87be6db7a5e3006f7c4b053
2018-01-29 17:24:26 +01:00
Dunajski, Bartosz 6ab39150e0 clGetDeviceIDsFromVA_APIMediaAdapterINTEL support
Change-Id: I3d43f00795c36562585bee7b4ee96123389586c7
2018-01-29 13:57:05 +01:00
Zdanowicz, Zbigniew f5513b6a1d Handle host pointer not meeting memory manager criteria
Change-Id: I65eec6083f1d8bb7b5f46e1a2e015aa6fd7f3d9f
2018-01-29 11:40:32 +01:00
Zdanowicz, Zbigniew e42d43953d Restrict system memory allocations to certain address range
Change-Id: Ibe8c1183368ce48f2c820d0f1a71f0b15703ffcd
2018-01-26 15:16:41 +01:00
Dunajski, Bartosz 3532c6373f D3D sharable 2D texture: Map Aux GpuVa and set renderCompressed if possible
Change-Id: I508965d07f456af74ecef6e980337f42f5967b43
2018-01-26 08:38:59 +01:00
Zdanowicz, Zbigniew 4ad96b75f5 Make base class for gmm_memory
Change-Id: I307f616be27d5fed126f0e36bff0d182ab7a8b53
2018-01-26 08:35:41 +01:00
mplewka 377fc8d20b Enable zero copy for enqueueReadBufferRect with hint
Change-Id: I4e7d89edfcff2674e7c163d70ad974d3464bf64f
2018-01-25 13:17:59 +01:00
mplewka 251de14ee6 Enable zero copy for enqueueWriteBufferRect with hint
Change-Id: I411f00b98056307906c02d34e793cefe460735ba
2018-01-25 11:48:10 +01:00
Dunajski, Bartosz f3f53ed14b Missing UnifiedAuxSurface check in MCS scenarios
Change-Id: I3b53ddea21997604481ece554cd24a6809523ab8
2018-01-25 10:25:12 +01:00
Mrozek, Michal 6b368803fc Add support for legacy kernel MOCS selection.
- Detect if driver is operating on patched legacy kernel.
- If turbo patch is detected, assume legacy custom kernel.
- Add simplified MOCS selection logic to GMM helper

Change-Id: I1ae821336205e473f00d72ddbfebee828427dfc7
2018-01-25 09:10:04 +01:00
Zdunowski, Piotr 0b6b12ea57 Globally enable priority hints extension.
Change-Id: I9f3b8d3cf1bedb41d9e0622ff514bf76b4518d8c
2018-01-24 20:07:31 +01:00
hjnapiat 5b0ebe25d5 Add support for GT-Pin Callbacks [2/n]
Change-Id: Ibdb76361be2a0e48888b46e9ed6dfe6b0ed49862
2018-01-24 16:25:02 +01:00
Mateusz Jablonski 9477f03f34 Program media sampler
Remove not needed includes in unit_tests/libult/genX.cpp files

Change-Id: Iac9957d0b148f80ba9432cabb881c3560d77702f
2018-01-24 15:57:51 +01:00
Mrozek, Michal 274c8084a3 For devices with small HW thread count, limit the available pool of LWS.
Change-Id: Ib3c0fea3e0422dae3bc93b891aab087ad597776e
2018-01-24 14:30:39 +01:00
Dunajski, Bartosz 5bee3c3312 Program CCS Aux params even if MCS allocation is available
Change-Id: I9ae5c1685fa9913e93a7660120da97ba777add31
2018-01-24 11:03:11 +01:00
Mateusz Jablonski 8d68788807 Remove not used files
Change-Id: I3c232d09023b7a327a5857c46fb9dfdbe63cdb6e
2018-01-23 12:47:20 +01:00
Pawel Wilma 369dcff34a Rename build type Release-Internal to ReleaseInternal
Change-Id: I2ec03a046ad84a571067230a011e38526bc8fdaa
2018-01-22 15:02:59 +01:00
mplewka 2c2bbbcdbb Add support for zero-copy r/w buffer
Change-Id: Ie9f3f2211d107eb338bd97692d36e9c7d7a0feab
2018-01-22 09:40:51 +01:00
kkasper b08de2733e Fix status returned by clSetKernelArg.
- In case of mismatched access qualifiers it would return
  CL_INVALID_KERNEL_ARGS. This is not correct, CL_INVALID_ARG_VALUE
  should be returned instead.

Change-Id: I0dc929e22269b4e34e347502c6cc4067e67ba165
2018-01-19 13:38:52 +01:00
Mrozek, Michal 0066daf495 Add support for deletion of allocations that may be in use by GPU.
- fix deletion of constant program surface
- fix deletion of global program surface
- move program_data tests to shared code
- make program_data tests SKU agnostic

Change-Id: Icf3e9fd035416072699336c4f86e49703ef48cc5
2018-01-19 12:34:49 +01:00
Mrozek, Michal 292d6c9bed Do not force stateless when m32 flag is passed.
Change-Id: I1915ffc82c35aa9ffe3fd4b108f717318fd1a67c
2018-01-19 07:57:35 +01:00
Mrozek, Michal c6233e1d06 Add support for deferred deletion of private surface.
- If it is in use add it to temporary allocation list
- If it is not in use destroy in place

Change-Id: I6304d1a3b641243f3f7eadff8e38d8515b132f68
2018-01-18 19:53:24 +01:00
Milczarek, Slawomir 3e84c4df7a Introduced a new graphics allocation type of ALLOCATION_TYPE_NON_AUB_WRITABLE.
This commit moves the allocation's aubfile write permission property
from OS agnostic MemoryAllocation to general GraphicsAllocation class.

Change-Id: I82ca2716d6b65d314460bd9f5d33e1113f9d7c07
2018-01-18 18:36:14 +01:00
Dunajski, Bartosz 8b9713582a Aux programming fixes + ULT improvements
- Dont program clear color aux params for multisampled images (depth or MCS)
- Mock Gmm PageTable manager default actions
- Local Wddm for WddmCsr tests to make expects on creation
- Set Gmm PageTable manager for Wddm Memory Manager tests without WddmCsr

Change-Id: I8ccfddb06340bc81184e07eff5a7078756d28571
2018-01-18 14:40:56 +01:00
Mateusz Jablonski 13ac81f465 Change pipeline select programing
- Program one PS with gpgpu selection and media sampler
- Program PS only when media sampler requirement changed
  or when preamble was not sent

Change-Id: I85ba3f74087733e79d048e120aeb8b4b04796e00
2018-01-18 14:39:47 +01:00
Mrozek, Michal ae1213a98d Fix use after free problem.
- freeGraphicsMemory checks for command stream receiver in device and
uses it if it is present.

Change-Id: I8e3f2202dc694bd8903b04780e550dc1fd115ef4
2018-01-18 12:04:46 +01:00
Dunajski, Bartosz 3b626a0290 Force Disable ftrCompression on Linux
Change-Id: Ia5dc4b323571442ee52551d93869163fc3f45834
2018-01-18 09:16:28 +01:00
Zdanowicz, Zbigniew 75a902bf2c Wddm freeGraphicsMemory should handle null GraphicsAllocation same as Drm
Change-Id: Idafdaf654f630d41b890f87c6e8c14833b18f714
2018-01-18 08:24:07 +01:00
Zdunowski, Piotr 5e7eccefe5 Improve error handling for shared objects.
Change-Id: I86fccb26cbf327b49c1b4992eeb3d25e52d3bced
2018-01-17 21:32:36 +01:00
Mrozek, Michal e2680d395c Fix incorrect pointer programming when offseted SVM pointers are used.
Change-Id: Idf8b6d9c116cf6fb8cfd069158e9eef4d981b272
2018-01-17 21:22:06 +01:00
Mrozek, Michal e923c2211b Add Unrecoverable if GraphicsAllocation in use is being destroyed.
Change-Id: I74a54ef023c62e12d711db07d79942166e002188
2018-01-17 18:36:33 +01:00
Dunajski, Bartosz a9a24e82e5 Prefer render compression for tiled images
Change-Id: I1ae1cf9a5cfdc54ab4d889456e252cd1f9860883
2018-01-17 15:18:47 +01:00
Koska, Andrzej be0306ca68 Adding support for passing proper extensions list from cloc to compilers
Change-Id: I89249cd6ccae9996cd33d7ba26007c778207f028
2018-01-17 12:47:44 +01:00
Chodor, Jaroslaw 044fd1ab81 Fixing IntDescr programing for blocked cmd and MT
Fixing InterfaceDescriptor programming for
blocked commands when MidThread preemption is
enabled
Additionally, fixing couple of tests that block
global preemption enabling in ULTs

Change-Id: I454c9608f8606f23d7446785ac24c7c7d8701ae0
2018-01-17 12:19:07 +01:00
Mrozek, Michal 41f0ac3019 Check if we do not access outside of array.
Change-Id: I3357b745d36398ad52777054f64a7915278c0463
2018-01-17 09:33:57 +01:00
Zdanowicz, Zbigniew 602474f868 Command streamers should use device default engine type
Change-Id: I7286f15ba78001729ea489a43576d96f109d44f0
2018-01-16 22:37:44 +01:00
Dunajski, Bartosz d11474beab Gmm utils separation
Change-Id: I9f2bdf249aa04b2ada216eee92771880202f5576
2018-01-16 18:44:05 +01:00
Mateusz Jablonski be6f211910 Add pipeline select mask bits getter in preamble helper
Change-Id: I783c911ad69916a979e58256a8705d22a86f6a41
2018-01-16 16:51:17 +01:00
Artur Harasimiuk 3883f790cc Instrumentation refactoring
Use bool instead of int where it should be.
Tweak naming.
Removed unused members

Change-Id: I468be28d78e9da7c7fa1632e362ed077929fb91a
2018-01-16 16:15:44 +01:00
Mrozek, Michal dd601ff73a Utilize shortened version of optimal HW thread count in nx4 scenarios.
- also clean early return if simd size = 0

Change-Id: I9b01df091ab6dd6a3066d1a8762c7fb1530c2804
2018-01-16 14:47:07 +01:00
Milczarek, Slawomir 92ebb0c3c1 AubCSR to operate in batched dispatch mode (by default)
This commit changes the default dispatch mode for AUB CSR
from the immediate dispatch to the batched dispatch mode.

Change-Id: Idca914475a9a38788fd94e16eb6db4c0afb1bdd6
2018-01-16 13:24:40 +01:00
Mrozek, Michal ee250be942 Fix num thread per slice computation.
- It should use thread count not EU count.
- change variable name to reflect that we work on sublices.
- fix test description, add missing test
- change hasBarrier variable to be boolean

Change-Id: I627bdf17b661d2f9b5eb3d8cd6ca53eba5d46b81
2018-01-16 13:06:31 +01:00
Zdanowicz, Zbigniew 474b6a2a23 Enable Mid-Thread preemption for Gen9
Change-Id: Iacec1c8fa899d4fbf0cbb9cc292990546871ca6a
2018-01-16 12:55:35 +01:00
Mrozek, Michal 8ee2c54a50 Disable squared algorithm.
Change-Id: Ibecbd75b97596e56efc92445f46a4f2a4768a351
2018-01-16 11:20:26 +01:00
Dunajski, Bartosz 3df51c3e88 Aux format support check for render compressed resources
Change-Id: Ief7c5cc436c781e5b90cf71b17bf7c15c63c5c14
2018-01-16 09:50:46 +01:00
hjnapiat 111897132e Switch to new version of GT-Pin headers
Change-Id: I909d1c578b4b9c3d7e24d3e33a9bfd86a815ab14
2018-01-15 20:20:53 +01:00
Mrozek, Michal af77720f9c Fix resource destruction scheme on device closure.
- Call waitForTaskCountAndCleanAllocationList with latest flushed task count
to reflect what was actually sent to HW.

- refactor cleanAllocationList to waitForTaskCountAndCleanAllocationList

Change-Id: I5301185c5fce212e39eb017b952b43c279559cf4
2018-01-15 18:45:48 +01:00
Milczarek, Slawomir 7c42353c4c Add support for batched dispatch to userspace AUBs
This commit as aimed to add support for batched dispatch,
but doesn't make it the default mode for AubCSR yet.

Change-Id: I4dc366ec5f01adf2c4793009da2100ba0230c60a
2018-01-12 15:40:56 +01:00
Mateusz Jablonski 502e9c2d15 Async deleter: move releasing cpu/gpu pointers to main thread
Change-Id: I3c3c9fb6200c38ecf1fc8910380531d6a5f1e875
2018-01-12 13:16:59 +01:00
Mrozek, Michal 7640201585 Allow squared algorithm to work together with base one.
Change-Id: I9087957bb427a422b1be632f6375c96b8f91a492
2018-01-12 12:05:04 +01:00
hjnapiat 031b537e2b Allow defining tests that should not be executed
- Uses GTest option --gtest_filter=<pattern> to define tests
   that should not be executed.
- This allows making experiments with tests as prototyping, debugging etc.

Change-Id: Iabcd06dc1311a2edb0ad67564c542fec3a9b2e98
2018-01-12 11:45:18 +01:00
Dunajski, Bartosz c939419ccc preferRenderCompression flag for GMM resources creation
Change-Id: I718fa21d0feb825e0a3215408c78fa49d094a15f
2018-01-12 11:01:57 +01:00
Dunajski, Bartosz b0c07bf27f Transfer more ftr/wa flags to GMM
Change-Id: Iab7a27c96a9d8529c7583cc3dc975a5c2dbeb0ed
2018-01-12 08:57:52 +01:00
Kowalczuk, Jakub 877370ef6d Fixing relesae-internal build
Delete variables: gtest_lib and gmock_lib in CMakeLists

Change-Id: Ie2d6e4ca34acef60aaa1b14d0526eb0fbf293097
2018-01-11 18:02:34 +01:00
Dunajski, Bartosz 97021d74a8 Ftr/Wa table separation
Change-Id: I21034f6ec09d8b91dd6cd16135fbe5a19298dcad
2018-01-11 08:55:06 +01:00
Chodor, Jaroslaw d290955a57 Preemption - SIP command programming
Change-Id: I4c7c805a77a9decb8f13d39055bfb2590209ca3e
2018-01-10 16:43:29 +01:00
Zdanowicz, Zbigniew 8efafc1efb Adjust default engine type according to feature availability
Change-Id: I1645dfabe69a7697c1e17950c4d82e77f98984bf
2018-01-10 13:53:15 +01:00
Mateusz Jablonski 4f884496a6 Some minor fixes:
- Fix SUPPORT_X and TESTS_X flags in cmake
  Previously it was possible to enable TESTS_X with disabled SUPPORT_X

- Remove genX dirs from include paths

Change-Id: I70aa6ee4df6cc1ca641cce2e99b66f92f99fd4e1
2018-01-10 12:56:40 +01:00
hjnapiat 9564c5c2c1 Move few files from GTPIN to GENX directories
- This fixes issue with difference in shared code
- Also renames variable in ULT

Change-Id: Icedfc26ee4b0fdde80ab88445cbbee3a4bbc379e
2018-01-10 12:12:52 +01:00
Mrozek, Michal c8d9846d50 Enhance search pattern for early LWS finding path.
- Allows to find larger LWS in multiple cases.

Change-Id: I645f5bca5c8ccdcf8e0d4861e47fcbcad0395e7a
2018-01-10 08:20:02 +01:00
Wojciech Woloszyn 8ece8ab420 Enable CFL
Change-Id: I268a6d86fe69859064698d7de0c4c9949fda29a4
2018-01-10 00:56:44 +01:00
Mrozek, Michal 94ae9a3d1b Add debug functionality to dump LWS sizes.
- Refactor of LWS tests.

Change-Id: Ic47c88996a658f2168cc425f4598e91eced4756d
2018-01-09 15:41:11 +01:00
hjnapiat 17c6142191 Add support for GT-Pin Callbacks [1/n]
- Also fixes bug when returning version of supported GT-Pin interface

Change-Id: Ib471a11a3b51d69240dcd2f800a8e28eefdeed57
2018-01-09 14:26:47 +01:00
Dunajski, Bartosz 11e7a5f1d9 Pass FtrWddm2GpuMmu flag to GMM
Change-Id: Ie52f1889a2ce1ab7abab8ac39a5dc6f0e60c6bcf
2018-01-09 13:04:34 +01:00
Chodor, Jaroslaw f235ba015e Refactoring preemption tests
Change-Id: I7e34f12e7d974e24cc63aaaad77d293b744d1c74
2018-01-09 09:50:00 +01:00
Zdanowicz, Zbigniew 6cf7ac41c2 Mock call should follow GDI call convention
Change-Id: Ibd217539c091e972bcc079b086f6aadb9ae18d22
2018-01-09 09:29:54 +01:00
Mateusz Jablonski f12b5861fd Drain deferred deletions when cannot allocate memory for tiled image
Change-Id: I68b15269da4b5a58e02571a9c594c52b9a95edeb
2018-01-09 09:20:10 +01:00
Mrozek, Michal 45990a8181 Remove not needed methods.
Change-Id: If8be6e18054381cabba129fc0d05802f32cc0d34
2018-01-08 17:09:09 +01:00
Mrozek, Michal b00819cafe Add refcount on MemObj in blocked scenarios.
- Prevents destruction of MemObj while it may still be in use.
- Add UNRECOVERABLE to check whether object is deleted while having
dependencies, fix all problems is tests due to that fact.
- Fix special queue setting, clean interfaces.

Change-Id: I2a467e80df00ea1650decdcfa6866acf10b441f8
2018-01-08 16:03:24 +01:00
Chodor, Jaroslaw c838a7dfc6 Refactoring preemption fixture
Change-Id: I7f520a591a251d68fb3443d221ab8b628a450398
2018-01-08 15:43:32 +01:00
Koska, Andrzej 4e9c1178a3 Add -all on the begining of extensionsList
-all resets all compiler settings.

Change-Id: I8eec4beffa27673918d741f4b0d9d894f40a2cee
2018-01-08 10:45:55 +01:00
Chodor, Jaroslaw 1fd771e5a5 Refactor SIP acquiring
Acquire SIP by device, not by context

Change-Id: Iac850db1d65c52ebc8a331039046c0dd6acf1d4e
2018-01-08 03:31:45 +01:00
Chodor, Jaroslaw f6eb2617b9 Adding isAligned impl for numeric types
Supports numeric types (e.g. size_t)
Supports constexpr evaluation

Change-Id: I6942bdaa12c39df95dcdee84e5d5851c9ec89be8
2018-01-08 02:41:11 +01:00
Chodor, Jaroslaw 9ca3e8b1ab Containers improvements
Adding proper implementation for StackVec::resize()
Adding operator= to StackVec and ArrayRef

Change-Id: I9a988e64c2008a8e3c4b54b0814c4ccb9448bca3
2018-01-07 23:48:19 +01:00
Zdanowicz, Zbigniew 21f92d8258 Add preemption WA to make CSR surface uncacheable
Change-Id: Ia468c6f5df16522c3bc9aae22802895f2badc431
2018-01-05 22:44:26 +01:00
Mrozek, Michal e9fd40db13 Do not update task count with not ready status.
- queue blocked status is handled by virtual event not task count.

Change-Id: I8979ba55d2319a75393c639b234dcd86cf2792ae
2018-01-05 14:01:17 +01:00
Mrozek, Michal 3eb856b192 Add reference on kernel in blocked scenarios.
- Prevents kernel destruction while it may still be in use.

Change-Id: I1f87d09c5cabf29644a1b06b63f1789dbb15985a
2018-01-05 10:19:04 +01:00
Mrozek, Michal 57137fea84 Fix heap programming in blocked scenarios.
- When command queue is blocked, all heaps are being stored in temporary
allocations, command buffers are being pre-programmed, heaps are being set
on those temporary allocations with the assumption that all heaps start with
offset 0.
- Problem was when the actual submissions happened, all those temporary heaps
were just copied to appended command queue heaps, so when something was there
then new stuff was copied right after it. It means that all state was
incorrect as the offsets are not valid anymore and will point to wrong
location.

- This change releases command queue heaps when blocked command is being
submitted to make sure they will be programmed with the proper offset in newly
allocate command queue heap.

Change-Id: I3e30be13caf4df8621ddb18f8448ffaf0f1278d1
2018-01-04 10:45:49 +01:00
Mrozek, Michal ec59a900e1 Fix for deadlock in mapImage scenarios.
- due to the fact that device mutex was obtained to prevent threaded access to
image there was a problem when other thread was also doing readImage call
That thread got read Image kernel mutex first and then it was acquiring device
mutex, which was taken by other thread doing mapImage call.

- In current code device mutex is not taken to service mapImage call, instead
image is being guarded by its own mutex.

Change-Id: Ic4c5a019708d7ec5b240bc5b08c5a65173827392
2018-01-03 12:33:12 +01:00
Zdanowicz, Zbigniew 5cfb102359 Add Preemption WA waModifyVFEStateAfterGPGPUPreemption for WALKER replay issue
Change-Id: I046e7296157b4b527ad65733ea417fbc364aac9c
2018-01-02 17:45:40 +01:00
hjnapiat ca45fce7b3 Add all necessary Runtime Services for GT-Pin
Change-Id: If357dd5c40d629fbba548a603805e5860984b2ed
2018-01-02 09:30:10 +01:00
Zdunowski, Piotr b006972d07 Improve error handling for shared handles in wddm.
Change-Id: I93d33d89cb4b6333924c362b54e0638174e44091
2017-12-29 16:10:16 +01:00
Hoppe, Mateusz e8fb931ef1 Use 64KB pages for SVM allocations when 64KB pages are enabled
- clSVMAlloc allocates 64KB pages as memory storage for both
fine grain and coarse grain allocation

Change-Id: I2068ffb9f5577761f739df47b54bc382e971949c
2017-12-28 11:25:43 +01:00
Mrozek, Michal 2b91ea85c6 Fortify events
- add some debug breaks
- clean cmd ownership, there can't be situation when event holds 2 commands
- cmd meaning cleanup
- remove not needed try catch clause

Change-Id: I5ad6877e7235de2d7f48818467cb4b92655aab97
2017-12-22 15:05:28 +01:00
Artur Harasimiuk 6afb024f6f limit maximum memory allocation in ULTs
We shouldn't test using huge amount of memory. Execution environment may
have less memory. it also increases memory pressure and overall system
load during parallel ULT execution.
Let's cap max to currently used maximum and then we can refactor tests
to use less.

Change-Id: I869f77d59344faef5399896727f1b0381932bde0
2017-12-22 15:04:32 +01:00
Hoppe, Mateusz a9f30a5059 Fix for Execution model PageFaults
- adding PC with MediaStateClear and MEDIA_VFE_STATE in
EMCleanupSection

Change-Id: I0ee0e121bc2fcc09ac79cb3b601591247326482a
2017-12-22 11:49:56 +01:00
Mrozek, Michal 03646887bf Make UNRECOVERABLE_IF fail in tests.
- Fix tests that were triggering the UNRECOVERABLE scenario
- Change UNRECOVERABLE to DEBUG_BREAK in some places

Change-Id: I479baac4941b485af9ea81a61a1a03d2f3f42e6a
2017-12-22 11:26:06 +01:00
mplewka b503597ffa Enable new algorithm computing local work sizes
Change-Id: If0addb5f36ee0b667370489b11837be716d70782
2017-12-22 10:42:36 +01:00
hjnapiat b1823f31ee Diminish size of memory chunk allocated in ULT test
Change-Id: If57f0334c709a7fc23e4d78eff4f9b913d9154d3
2017-12-21 18:05:24 +01:00
Zdanowicz, Zbigniew 3c9b82e9cc Disable Mid-thread preemption for VME kernels when device does not support it
Change-Id: I925c0ad8f76cf0b41426155448f34ff7700d0444
2017-12-21 16:22:35 +01:00
Mrozek, Michal 2a00a15141 [n/n] Remove event registry.
Change-Id: Ie7da0f2dc944583771aaa80648217602ccff99ce
2017-12-21 14:46:27 +01:00
Artur Harasimiuk b0a41b81bb cmake cleanup
moving build targets for better layout in solution explorer.

Change-Id: I6514f321f15991f88833e02b3c8af6327d35b74b
2017-12-21 10:29:13 +01:00
Mrozek, Michal 3284efff86 Do not use peekIsCompleted in isQueueBlocked.
- This causes event tree update if virtual event is holding commands or
callbacks
- That causes race between other threads that may be updating the tree

Change-Id: Ic80a8b71ed1e1c1deab8af1bc64f8ce81c21de1b
2017-12-21 08:13:43 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00