Commit Graph

244 Commits

Author SHA1 Message Date
Zdunowski, Piotr 75a635fdc5 [1/n] Log allocation placement.
Change-Id: I9ab61e10dcb0fcbbaf859c077a64ce7a4f2c213c
2019-01-16 16:46:50 +01:00
Piotr Fusik 30dd15144c Add debug variable to disable host ptr tracking.
Change-Id: Ifc866e06a4519e7590d40d8ad136147ecc80225d
2019-01-11 12:06:52 +01:00
Mateusz Jablonski aee69779fa Minor renaming in a scope of multi os context allocations:
shareable -> multiOsContextCapable
resetTaskCount -> releaseUsageInOsContext
resetResidencyTaskCount -> releaseResidencyInOsContext
isUsedByContext -> isUsedByOsContext

Change-Id: If824246a0e393b962bd12f8c63d429a0fcfcda25
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-07 11:42:43 +01:00
Katarzyna Cencelewska ebd0889216 Fix for load function wglMakeCurrent
Load from glLibrary instead of wglLibrary

Change-Id: I426209407ddd9efdad0b26b47ff02382ccb7f5ab
2018-12-26 21:52:09 +01:00
Mateusz Jablonski 1e011f9a08 Allow to allocate shareable graphics allocation
Change-Id: I284b03b001e5b67c344d46f34048803ef9a57314
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-20 20:14:57 +01:00
Mateusz Jablonski c9e667d601 Simplify Memory Manager API [4/4]
- fill AllocationData in one place
- remove allocateGraphicsMemoryForSVM function
- refactor SVM manager tests

Change-Id: I6f4ecd70503da8031cced50ea98a54162fd8e5d3
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-20 09:01:33 +01:00
Hoppe, Mateusz f6790c42cf Refactor Graphics Allocation paths for Images
Change-Id: Ifa3084b18cac95289bbceeaf3669dd31567fbd3e
2018-12-19 13:49:53 +01:00
Katarzyna Cencelewska f18532c8c4 Refactor of glcl sharing
new pattern to load gl and wgl functions from dll

Change-Id: I71d7510a210462c09d50e03ce8a444770c017b8d
2018-12-17 23:04:28 +01:00
Mateusz Jablonski 8ec072d39c Simplify Memory Manager API [3/4]
- remove method allocateGraphicsMemory(size_t size)
- pass allocation type in allocation properties
- set allocation type in allocateGraphicsMemoryInPreferredPool

Change-Id: Ia9296d0ab2f711b7d78aff615cb56b3a246b60ec
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-17 10:42:16 +01:00
Pawel Wilma 5094c630f7 Force resource locking on transfer calls
Add debug variables to force resource locking on memory transfer calls
and to call makeResident() on mapVirtualAddress() call.

Change-Id: Ifa78d951fcb81812b10a98252bd414124dec9c74
2018-12-14 12:25:28 +01:00
Mateusz Jablonski a6be6533ea Simplify Memory Manager API [2/n]
- make AllocationData a protected structure
- use AllocationProperties instead of AllocationFlags
- refactor methods: allocateGraphicsMemory64kb, allocateGraphicsMemoryForSVM
- call AllocateGraphicsMemoryInPreferredPool in AllocateGraphicsMemory
  where there is no host ptr

Change-Id: Ie9ca47b1bccacd00f8486e7d1bf6fb3985e5cb12
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-11 13:12:00 +01:00
Dunajski, Bartosz c905dad62f Improve checkGpuUsageAndDestroy method to work with multiple CSRs
Change-Id: I7b8325116c90151c6339f95a81880c467e81748f
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-12-11 10:26:50 +01:00
Piotr Fusik 0b839722f4 Don't store preemption mode in Wddm.
Change-Id: I6088e5fec65b6910fefb42ec9735181867c44a1b
2018-12-10 14:48:52 +01:00
Mateusz Jablonski c8748b77a0 Simplify memory manager API [1/n]
pass struct with properties to allocate graphics memory methods:
for protected methods use AllocationData
for public methods use AllocationProperties

Change-Id: Ie1c3cb6b5e330bc4adac2ca8b0bf02d30ec76065
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-06 15:09:25 +01:00
Mrozek, Michal 2ca3e4c4e5 Ensure that allocations in 4GB heap have non 0 GPU address to patch.
- That address is used later to deduce that allocation is non null
- If we have address 0 it is incorrectly detected as null ptr on the GPU.

Change-Id: I45e1bb31f1788528327da35bfdcc13f3fa6beec2
2018-12-06 09:06:38 +01:00
Katarzyna Cencelewska a99939b08f Fix dumping of cl_cache
- change creatOsReader and constructor of RegistryReader
- move body of constructors of RegistryReader from .h to .cpp

Change-Id: I57cbf51a57cb1cb7f9cd2473af766a79cf2035d2
2018-12-05 15:02:04 +01:00
Dunajski, Bartosz b728526c4e Allow Device creating multiple CSRs [8/n]
Use OsContextId instead of DeviceIndex for residency

Change-Id: Ib2367b32b5b3e320252d8254f1042f1c3d497068
2018-12-04 15:36:59 +01:00
Mateusz Jablonski 7747db13e1 Deferred deleter: move to next deletion if current deletion cannot be applied
Change-Id: I7067bc2bc74f92518a33ccb9f9dce9b57cc28637
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-12-03 15:24:35 +01:00
Mrozek, Michal 09f3f4e856 Move heap32[0] to heap32[3].
Change-Id: Icea6eef5646894283725e29ce7ee930284af2673
2018-12-03 09:32:36 +01:00
Dunajski, Bartosz 0131e66a70 Allow Device creating multiple CSRs [6/n]
- Introduce default Engine query
- Improve Deferred Deleter usage
- Remove Tag Allocation from Device

Change-Id: Iaa88d8dc0166325acf9a157dcd2217ea408ee285
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-29 16:20:13 +01:00
Katarzyna Cencelewska 3e800d55e6 Add support for dumping cl_cache to specified directory
Change-Id: I782ff17d0d4b17d3d26db543eb7ae222f75ff8a1
2018-11-29 13:59:26 +01:00
Maciej Dziuban 1cd59e927a Store residency status for each osContext separately
Change-Id: I2f17f68dcef6db7b596a69579a435b7ccd24e44b
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-29 08:08:25 +01:00
Dunajski, Bartosz b0de2a11d2 Set OsContext as reference
Change-Id: I3b682fabde9c2ddb2c33a95aef77bf6ce400a21f
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 15:32:14 +01:00
Dunajski, Bartosz 2d77b86e70 Allow Device creating multiple CSRs [5/n]
- Move Engine type to OsContext
- Move OsContext to CSR
- Improve EngineMapper logic
- CompletionStamp cleanup

Change-Id: I935cb7169c8c48cd09837e20e3da06f6dd3437b9
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-27 14:25:04 +01:00
Mateusz Jablonski 352450adaa Pass number of os contexts to Graphics Allocation constructor
Mark unshareable allocations

Change-Id: Ie745dc639d8c6b01e2275d29ee1fb4c6343df2bc
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-21 17:38:02 +01:00
Maciej Dziuban c4239dcd3d Refactor WddmResidencyController methods implementations
- trimResidency
- trimResidencyToBudget
- makeResidentResidencyAllocations

Change-Id: Ibf81e31966c8d8347fd5caf2f6a4bf8fe75fab5f
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-21 12:05:37 +01:00
Stefanowski, Adam 96d07db545 Move wddm->init from wddmCSR to getDevices
Change-Id: If88f526792596108e038ec05c1d305e9452506f2
2018-11-20 09:40:57 +01:00
Mrozek, Michal c0f6af1df3 Use maxOsContextCount to initialize trimCandidateList for WDDM allocations.
Change-Id: Icc65d19ed45bb1aa1a3dba4de536cf85ab9b906b
2018-11-19 11:24:16 +01:00
Mateusz Jablonski 66492a53a4 Change type of residency task count to uint32_t
Move definitions of objectNotUsed and objectNotResident to GraphicsAllocation

Change-Id: I2aec604a865cc6c975e9d1121028cbdd35c0b18a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-16 16:04:48 +01:00
Maciej Dziuban 969d4da811 Cleanup WddmResidencyController related code
- Move trimCallback from WddmMemoryManager
- Refactor lastFenceValue accessors to be less generic

Change-Id: I01b31ccb81a5ecc04d07912061326428b07a59bf
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-16 08:34:18 +01:00
Mateusz Jablonski 0e0a280803 Create structure UsageInfo for task count and residency task count
Change-Id: I0899c88d9e567a09ba46461ae69cf6c80f713e67
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-15 14:07:05 +01:00
Mateusz Jablonski 1a89a0103a Register trim callback after creating monitored fence
Change-Id: Ib0510a0aed180c7bfe883a60632fd642664e1085
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-15 12:47:01 +01:00
Maciej Dziuban 9bdedc62dd Move residency functions to WddmResidencyController
Change-Id: Ic73a51546b3325515f293808550376fa6b57dec3
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-15 11:17:27 +01:00
Maciej Dziuban b0acc5ecde Move isMemoryBudgetExhausted to WddmResidencyController
Change-Id: Ic9da29ab954835e93cfbcd6690c1764d99939613
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-06 23:09:20 +01:00
Mateusz Jablonski 815ae851b7 Graphics Allocation: store task count per context id
Move definition of allocations list method to internal_allocation_storage.cpp

Change-Id: I4c6038df8fd1b9335e8a74edbab33b78f9293d8f
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-06 12:43:47 +01:00
Maciej Dziuban 42b2ed6a90 Register trimCallback with WddmResidencyController as Context
Change-Id: Ibc34aac17e79df3a3096c29c34506039e2c5bdcc
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-05 17:43:20 +01:00
Maciej Dziuban ef02827cd9 Add tests for locking in trimResidency()
Change-Id: Iddbecedae9cf21a4e5232dcac5d145962623e7d6
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-11-05 15:58:06 +01:00
Stefanowski, Adam c202c95634 Stop creating osInterface in WddmCSR and DrmCSR constructors
Change-Id: Ic8ca21824882dfae5df3fe05c7ec1ff96311f286
2018-10-31 15:01:50 +01:00
Mrozek, Michal 8bec1906ec Remove alignedCpuPtr from WddmAllocation
- also switch to make_unique in wddm memory manager functions.

Change-Id: I2f7cf412a993040439466f1971d935fb8429ce7c
2018-10-31 14:07:39 +01:00
Kowalczuk, Jakub 1822fb0747 Control enabling of local memory based on OS and HW Capabilities part 2
- add EnableLocalMemory debug variable
- separate OSInterface::osEnableLocalMemory for dll and unit tests

Change-Id: I78a1f60364eece28b30ce3e91418e7d72ba3e0d9
2018-10-31 13:59:42 +01:00
Mrozek, Michal 200228b506 Replace cpuPtrAllocated flag with driverAllocatedCpuPointer.
Change-Id: Ic0ce165d0e583701e1128595a3d9dabd0a61a84b
2018-10-31 12:37:20 +01:00
Mrozek, Michal 7ece16ee7a Graphics Allocation cleanup.
- remove one constructor
- start using mock graphics allocation in tests

Change-Id: Idb8f4a35dbc2cae8d6bf667bab5542d8e91d6e0d
2018-10-31 11:54:24 +01:00
Maciej Godek f9ba697587 Sharing queries for DX10/DX11
Change-Id: Ia4f176a38bb2dbfe215efe17b13a533ee83510d3
2018-10-31 11:52:46 +01:00
Maciej Dziuban 9c696f1d29 Create STL-friendly SpinLock implementation
Change-Id: Ic04d34d2962ad6953fe3282a10f6cba16c0e07b3
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-31 08:38:32 +01:00
Mrozek, Michal 5b2e16651f Remove alignedSize from WddmAllocation.
Change-Id: I3b610515e4d5db16ce6a604e7e2f4b85b657bef2
2018-10-31 08:30:50 +01:00
Mrozek, Michal 1dc3a94ac8 Remove not needed code.
Change-Id: I5b0fd2960ed7777bc7603013071a431af6d435c5
2018-10-30 15:40:08 +01:00
Maciej Dziuban dc4de3c31b Move trimResidency functions to WddmResidencyController
Change-Id: I046fd34d5336b767ed38eda31e58e4a35ceee5f8
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-29 12:19:50 +01:00
Milczarek, Slawomir 7b1d19eaec Moved header with engine node definitions
Change-Id: Iaa78bb0584589e354b1bb469b729844121decb8f
2018-10-27 14:51:02 -07:00
Mateusz Jablonski d5c9816428 Remove store allocation methods from memory manager
Move setGPUAddress method to WddmAllocation

Change-Id: I91d877c3791e9eff69276e4258e3ce9c3111ca45
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 10:53:43 +02:00
Mateusz Jablonski 129380c1a6 Cleanup host ptr manager
Change-Id: I0fc9df41a08255eef8072666c1c5c16806e0f7cf
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-26 08:26:38 +02:00