Commit Graph

643 Commits

Author SHA1 Message Date
Stefanowski, Adam 16aee8cc46 [2/n] Move Hardware Info to Execution Environment
- remove hwInfo from the csr functions where it was passed as a parameter,
now csr functions have access to hwInfo by Execution Environment

Change-Id: I756ae63d9728c9c963571147bab97f9e1c15797b
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-22 10:08:26 +01:00
Artur Harasimiuk 1ce597a5c7 removed redundant pragma
Change-Id: Idba8e00de19be70d08b82903090a3d3ee62743c5
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2019-03-21 15:59:40 +01:00
Maciej Dziuban cd62be59e1 Add allBufferArgsStateful field to Kernel
Change-Id: I885ede725830964374421eff621cf01cecc4b17e
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2019-03-21 14:24:36 +01:00
Mateusz Jablonski 6abc3f7d9b Add logic to create wddm allocation with many handles
Change-Id: I1eeffddf7108183ad867d2b05d313f0cf6941c01
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-21 11:28:55 +01:00
Piotr Fusik db9afd06cd Remove EngineInstanceT.
Change-Id: I08543b5f4ef5e91e6beb8390d448e53702cd9dac
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-20 10:56:22 +01:00
Mateusz Jablonski 5367440fab Refactor Wddm map gpu address method
Change-Id: I9d3d8675bf80af4079e25b84ba6e09b7883c9e28
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-20 08:40:47 +01:00
Piotr Fusik 8c95b45e2f Remove engineIndex.
Change-Id: I58f7cf2c394686409dc45e315d1b5af33db2a28e
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-19 15:26:49 +01:00
Venevtsev, Igor ddf3aa186d Use HEAP_STANDARD for Limited-range allocations
Change-Id: I8b35cda2b5542e98a83021b4ce1c9f5118e6697d
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-03-19 10:18:21 +01:00
Piotr Fusik 429487fad0 Add constructor parameter to select low priority context.
Change-Id: Ieb3fa008a2f1b54052e393516038c88f00944fa0
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-18 15:09:59 +01:00
Milczarek, Slawomir 49c428d1ff AUB allocation dumps with pollForCompletion
Change-Id: I610a56d7b8d1b6f1f0d6029ce6d2e62742885698
Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
2019-03-15 16:13:31 +01:00
Mateusz Hoppe 16e1a05375 Test for DrmMemoryManager allocateGraphicsMemoryInDevicePool
Change-Id: If04321fc1045d01c0001e27eed8b2a128b830f25
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-03-14 19:25:15 +01:00
Maciej Dziuban 38aa884edd Select GMM_RESOURCE_USAGE_OCL_BUFFER_CONST policy for read-only OCL buffers
Change-Id: I338d1a1cf90c5b48009357d79b036d6d50e54b4a
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2019-03-14 16:09:27 +01:00
Zbigniew Zdanowicz cdb52400c4 Add new functions reserving address range to Memory Manager
Change-Id: I947203c24495c9e5a206b95bb0c69440824586b6
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-03-14 15:06:11 +01:00
Piotr Fusik 25e6494443 Use std::bitset for deviceBitfield.
Change-Id: I9078ffbb38967b753980cb1c5ebcab00f5292598
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-14 08:36:01 +01:00
Jacek Danecki 4997dffcf8 fix compilation on clang 4 and clang 5
https://github.com/intel/compute-runtime/pull/142

Change-Id: I1a4fecd3dd6dd4739d352f7b811b95403fe68951
Signed-off-by: Jacek Danecki <jacek.danecki@intel.com>
2019-03-13 19:51:30 +01:00
Mateusz Jablonski 395e79fee8 Add support for many GMMs in Graphics Allocation
Change-Id: I955b8dd50b502f91700c5529d0a0a291632aa157
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-13 15:44:45 +01:00
Mateusz Hoppe 573d2e0eec Add enableLocalMemory param to DrmMemoryManager ctor
- add linux dll tests for createMemoryManager()

Change-Id: I6e111e7a480d895a8520507af6b6a699f9dca160
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-03-12 22:22:37 +01:00
Piotr Fusik ec72787b98 Remove MemoryManager::allocateGraphicsMemoryForHostPtr.
Change-Id: I629f2299a183fc135135dbaff89216b966554a95
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-12 15:51:32 +01:00
Venevtsev, Igor 74f1896c03 Expose GfxPartition to shared MemoryManager
Change-Id: I039e463f90e88c0ed8e9505cc770c373420ff567
Signed-off-by: Venevtsev, Igor <igor.venevtsev@intel.com>
2019-03-12 09:25:50 +01:00
Stefanowski, Adam 341fcfc091 [1/n] Move Hardware Info to Execution Environment
- remove gmm_environment_fixture
- remove hwInfo parameter from ExecutionEnvironment methods

Change-Id: Ieb0f9b5b89191fbbaf7676685c77644d42d69c26
Signed-off-by: Adam Stefanowski <adam.stefanowski@intel.com>
2019-03-12 08:39:26 +01:00
Maciej Dziuban 79d0878e64 Wait for resource not being used in freeGraphicsMemory
Change-Id: I201d914569fc0cf6f9eb616d456a670b0b8741ab
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2019-03-11 12:18:38 +01:00
Mateusz Jablonski 3f690e1758 Dont unlock/evict wddm allocations during releasing memory
Change-Id: Ib934867886a883a22fde2f0c03e16338dc215e65
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-11 10:20:09 +01:00
Jobczyk, Lukasz 4386d10e40 Reverse logic of creating Memory Manager - part 2
-remove MM initialization from Device::CreateEngines method

Change-Id: Iaee268b002cb0f0a4edd07907c12da6dd6076b3a
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-08 14:52:55 +01:00
Jobczyk, Lukasz 878fd43a1a Reverse logic of creating Memory Manager - part 1
-remove CSR::createMemoryManager method
-create MM from platform before creating devices

Change-Id: I0e7f091c53b0e60ae7101e82a305253af626330e
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-03-08 09:47:29 +01:00
Mateusz Jablonski 5b22a50b28 Allow to create WddmAllocation with multiple handles
Change-Id: Iac9df91b08a6ce610b985586dfb6b5f63dc668cb
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-07 13:29:00 +01:00
Piotr Fusik a2c05a241d Set allocationType in constructors.
Change-Id: I66738be1239acdaf282f813aed46066bc5023112
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-03-06 16:07:28 +01:00
Mateusz Jablonski e721f7c08c Cleanup Wddm interface 3/3
don't pass the entire WddmAllocation when only handle is needed

Change-Id: I208a64c81767589a2ac8aba0e717d54426209ecd
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-06 10:03:38 +01:00
Mateusz Jablonski 4605a48170 Cleanup Wddm interface 2/n
don't pass the entire WddmAllocation to createAllocation methods

Change-Id: Ibd4c684a362edbe3b2c520b73b71246fed5a9399
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-06 09:30:14 +01:00
Mateusz Jablonski 03527f496d Cleanup Wddm interface 1/n
pass const D3DKMT_HANDLE * to makeResident/evict/destroyAllocation calls
remove gpuPtr from WddmAllocation

Change-Id: Ia5ca162946a2d893d4f56c37f8027eab02af90b0
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-05 17:28:29 +01:00
Maciej Plewka e53a8e8709 Add postSyncAddress to flush after walker
Change-Id: I7fdfaf8e0acc365998cc74306ab715ea3d9c7d72
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-03-04 14:47:53 +01:00
Dunajski, Bartosz 0939743874 Pass OsContextWin object during Wddm context creation
Change-Id: Iba8d801bb6af4e9d28681caddb9c487500a42c8c
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-03-04 09:11:59 +01:00
Dunajski, Bartosz 86dabbf6d5 Improve OsContext construction
Change-Id: Ibf9293344cc5c0ae1b2cc011e87d9e3626f3a066
2019-03-01 08:35:38 +01:00
Zbigniew Zdanowicz 10a25e405a Remove debug flag ForceMultiEngineQueue
Change-Id: Iabf38999a03be3422c25c12978808731df77a899
Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
2019-02-28 16:06:36 +01:00
Piotr Fusik 426a7b6efe Pass by const reference.
Change-Id: I68dc9d2a77da8cc7f81759c4e72d32e2e7f71a1d
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-28 14:12:13 +01:00
Mateusz Jablonski 6fb28dd828 Refactor GraphicsAllocation class
move most of members to protected section
merge related members into structs

Change-Id: Ief2e092aa5e61ca6f13308f9d9b1937ea6c913b4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-02-28 14:09:11 +01:00
Piotr Fusik 8febabfbd6 DrmAllocation constructor accepts allocationType.
Change-Id: I6a6457948ada7eb59537d17b966278d114f802c6
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-27 16:58:22 +01:00
Mrozek, Michal fca7b4e044 Remove Drm32Bit allocator.
- not used anymore.

Change-Id: Ibb7da1758feb67224ac0b172c72f45c2f1c229d9
2019-02-27 14:28:16 +01:00
Filip Hazubski 8b57d28116 clang-format: enable sorting includes
Include files are now grouped and sorted in following order:
1. Header file of the class the current file implements
2. Project files
3. Third party files
4. Standard library

Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-27 11:50:07 +01:00
Mateusz Hoppe d5d177dd58 Override AllocateGraphicsMemoryInDevicePool in DrmMemoryManager
Change-Id: I54da682ecb055e71af0968872ddb0ec7726c3adc
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
2019-02-27 10:05:46 +01:00
Piotr Fusik d79f1afdc2 GraphicsAllocation constructor accepts allocationType and memoryPool.
Change-Id: I5044ed26ba0cb0fc9ca7077595f5ab56353ab58c
2019-02-26 13:29:25 +01:00
Zdunowski, Piotr 842fb5dadc [4/n] Log allocation placement.
Change-Id: I300be5f09b6ee77aa89584a6bddf4c7e57aa54f1
2019-02-26 10:21:42 +01:00
Piotr Fusik 378bd28bab Change the signature of MemoryManager::createGraphicsAllocation.
Change-Id: Ia82235ff2831fd5b3436d488a5946bb49d63ce91
2019-02-25 16:08:35 +01:00
dongwonk e030c9907e Abort if can't load from test-file
Change-Id: Id9deef8f088ad7a20770fbb6e49c1fbd4ac96cfb
Signed-off-by: dongwonk <dongwon.kim@intel.com>
2019-02-23 10:14:05 +01:00
Milczarek, Slawomir 278bb83c56 Enable AUB sub-capture in AubStream captures (1/n)
Change-Id: I6bd0605d06cf4dc3937e2dbeba7ed7037ae91476
2019-02-21 22:40:40 +01:00
dongwonk 56972935ad graphic memory allocation with alignment in limited Range heap
Change-Id: Iccfb0fdc2f161e30bfdd26154110185277f176f5
Signed-off-by: dongwonk <dongwon.kim@intel.com>
2019-02-21 10:10:47 -08:00
Piotr Fusik 4ec5be0c99 Simplify code by removing AllocationOrigin.
Change-Id: Ie73cefc1ae1ee846fb9a5ef1054af01cd1867a4d
2019-02-21 16:29:05 +01:00
Hoppe, Mateusz 98db6147d8 Pass full aubfile name to initAubCenter when using TBX with AubDump
Change-Id: I9184ce38cd9a066259bbf3a5b8a56694d4e309b4
2019-02-21 12:39:10 +01:00
Jablonski, Mateusz 9e7c30cb06 Choose Standard or Standard64 heap depending on 64KB suitablity of resource
Change-Id: I633b1bef1cdef2c5149909c997adc85434bcaf73
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-21 12:18:26 +01:00
Katarzyna Cencelewska c9a8f9b1be GlSharingFunction tests update
Add mock of opengl32.dll to check that sharing functions are loaded

Change-Id: I361707ee9a506e84db51d4fa9c98823db2550fae
2019-02-20 16:05:32 +01:00
Dunajski, Bartosz 5dae27877e Improve MockCommandQueueHw
Change-Id: I6e33cd48590abd75e768a77a1811f2b374e22bca
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-20 10:21:20 +01:00
Dunajski, Bartosz 64fbfb21bf Improve iterating over existing CommandStreamReceivers
Change-Id: I12a10852d43c625ec5521ae91918fcb12e1a6aec
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-19 11:48:56 +01:00
Jablonski, Mateusz 05d02a6fe7 Change DevicesBitfield type to struct
Change-Id: I7a005b07737cdd21efc174a2ee2be0f6b7f9068d
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-18 13:57:50 +01:00
Piotr Fusik 9af011809f Make HeapIndex and GraphicsAllocation::origin not specific to Windows.
Change-Id: Ie5a26b45c0b5eff0daf047361d8c992bd3c65ba7
2019-02-18 08:47:49 +01:00
dongwonk fb993d6107 limited range and internal 32bit allocators with correct base and size
correct add 1 to the current size, gpuRange as gpuRange
only specifies the end address of the pool, not the actual
size, which causes alignment issue of all the offsets of
allocated objects. Also, a page was added in the beginning
of the limited range memory pool to avoid the base address
of it to be 0x0 that is interpreted as invalid address by
heap allocator (This makes the size reduced by pageSize)

Internal 32bit allocator is also initialized in proper way
with corrected base address.

v2: added 'givenMemoryManagerLimimedRangeAllocator' unit
    test
v3: adjust size to be freed when DrmMemoryManager instance
    is destroyed to 4GB
v4: - defined external 32bit allocator for limited Range
    allocation case.
    - softpinning object on the correct GPU address

Change-Id: Idaa0206d4133a1476cceb5a48ff8c8528742c76a
Signed-off-by: dongwonk <dongwon.kim@intel.com>
2019-02-17 19:19:52 +01:00
Pawel Wilma 8272b3f3de Add missing numGrfRequired in blocked kernel DispatchFlags
Change-Id: Ic1ddd532d8420c9a797a561cc5cb8ee74831eeaa
2019-02-16 11:37:48 +01:00
Dunajski, Bartosz 958d931cd9 Allow to create HardwareContextController for multiple Devices
Change-Id: Ib066c937809536196182ca87359c487570cc2e89
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-14 16:00:00 +01:00
Jobczyk, Lukasz b44c60ddc0 Use GPU addresses when setting up scheduler kernel's SVM args
Change-Id: Ia2d67d031ffce2413dd8c73d87c9d3d8f3d71ede
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-02-14 07:21:31 +01:00
Hoppe, Mateusz 0f36265f55 Pass CsrType to initAubCenter
- create AubManager with correct mode

Change-Id: I89c9c3c7edf553854b8b82788cec3dec53a62d79
2019-02-13 09:48:05 +01:00
Jablonski, Mateusz db8c2bc57e Unify write memory in simulated csr when aub manager is available
Change-Id: I28d0496b1b1fb973af4869e5626082142b5818dd
Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
2019-02-12 14:43:26 +01:00
Milczarek, Slawomir e318156d9d Create AubManager with product family in parameter
Change-Id: I3d5a2b04278d3dcec75eb2a787ec98d1ca2304ea
2019-02-12 14:01:23 +01:00
Piotr Fusik f014f27370 Support the EnableLocalMemory debug variable in CSR.
Change-Id: I902b06ab0b4a3df477d12804ba74b2727d8863f6
2019-02-12 13:09:23 +01:00
Mrozek, Michal 0e7fd2ffed Add multiEngine field to command queue with debug variable to override it.
Change-Id: I3c1e424a7ad545e166e178d1726595e6d9502ca7
2019-02-12 12:22:24 +01:00
Kamil Diedrich a7b46ccdbd Add RAII for cl_objects
- add removeVirtualEvent to cmdQueue fixture
- add const keyword in event functions

Change-Id: I11354eb8fceb15ae2c58bddd327863a15aab6393
2019-02-12 11:19:35 +01:00
Maciej Plewka 5abda619a1 Set pitch and qPitch for unified multisample images
Change-Id: I4eaf8678077f7ecd7f5f9ec860a3e59b7e89e78c
2019-02-11 15:52:18 +01:00
Dunajski, Bartosz 12da1b0616 Remove osContextCount parameter from GraphicsAllocation
Change-Id: I23b650e97f107008b1122a1ecea48722fe129863
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-11 15:44:37 +01:00
Chodor, Jaroslaw 43856e88b5 Refactor around cache flush and command queue
Change-Id: I277e27cbc60fbbb015c0024f171697408879ec0b
2019-02-10 17:59:33 +01:00
Hoppe, Mateusz cb37f2a779 Add /we4189 switch to CMAKE_CXX_FLAGS for MSVC.
- treat unused local variables warnings as error in Debug

Change-Id: I2da08b72e0f0083d3cdf932fbf92ef4981a88615
2019-02-08 12:06:04 +01:00
Pawel Wilma 947794f166 Fix for setting context flags in AubDump
Change-Id: Ia5fba17aac19fbcbfa6676557d1af0889f538b90
2019-02-07 16:28:53 +01:00
Kamil Diedrich 62e56d2398 Disable L3cache when resolve argument
Change-Id: I4bb3a18d67254eef8aa4a0ce6b29401726f0b47e
2019-02-06 15:51:31 +01:00
Chodor, Jaroslaw 048098ce66 Refactor around cache flush after walker
Change-Id: If5c7399df91bd076b684bcab83f50b4852e53429
2019-02-06 11:12:55 +01:00
Maciej Dziuban ea8aa29e12 Change pollForCompletion() insertion locations
Poll is done on:
- Aub CSR destruction
- expectMemory
- blocking calls

Poll is not done on flush

Change-Id: I1a776a932cb608c01f0de249e7cef26b00147f31
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2019-02-05 14:33:42 +01:00
Maciej Plewka d58b9840b8 Fix surfaceState for multisample images
Change-Id: I2d4b17e162f61892ca1a86c241a722ef0c51ee42
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2019-02-05 12:44:57 +01:00
Filip Hazubski d30cc221df Update disabling caching for a resource
Change-Id: I00eac0add01f75a1b82d04cf42652c15b776a457
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-01 10:50:21 +01:00
Dunajski, Bartosz 32ecd91401 Add parameters to HardwareContext read call
Change-Id: Iba70d4b90d76199df6f0bf90c95adb7dc059c715
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-02-01 10:22:15 +01:00
Chodor, Jaroslaw 7d04159f76 Refactor around cache flush
Change-Id: Iff32af0111375f4ffc804c82e6d753d57fe94e80
2019-01-31 22:19:06 +01:00
Jobczyk, Lukasz c1cb1f9be6 Add profiling calculation from timestamp packets
Change-Id: Ie7f8c703ca5ea5eb1f5207871ef94cbc7ece18b7
Signed-off-by: Jobczyk, Lukasz <lukasz.jobczyk@intel.com>
2019-01-31 13:32:52 +01:00
Dunajski, Bartosz 783f408f9f Dont pass EngineType or Index as parameter in Aub/Tbx CSR
Change-Id: I4583a09a9fa5dd5b0508132c86156c91aaf24c28
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-31 10:30:05 +01:00
Mateusz Jablonski c04ba163a0 Simplify selecting heap in Wddm::mapGpuVirtualAddressImpl method
Change-Id: Id6eb5b0df1c705b5fadde62d20513fe15edf1e27
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-30 16:38:46 +01:00
Mateusz Jablonski f157943610 Allocate internal allocations through preferred pool
Change-Id: Ib17431ceefc1eb72f86625e0998f679baaa7cb0d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-30 11:18:15 +01:00
Venevtsev, Igor 303014582a Extend semaphore synchronization for different command stream receivers.
Change-Id: Ic904b8c1e052adbb7b2ef82a6dec74ec69837f9f
2019-01-30 09:33:41 +01:00
Mateusz Jablonski 8056d7c5f0 Cleanup headers included in wddm.h
Change-Id: Ibb9b84b8f1ea2c69ddd134451b06f0e505c841b4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-29 12:43:29 +01:00
Milczarek, Slawomir b11e0825c9 AUB capture with support for allocation dumps
Change-Id: I90a2b75043c33af92e4557be37cde4b9699582c6
2019-01-28 21:20:08 +01:00
Dunajski, Bartosz c878590162 Remove EngineInstance parameter from pollForCompletion call
Change-Id: I07652db2de656032cdb3452239b671edbe876b75
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-28 16:49:25 +01:00
Pawel Wilma d56daf1726 Pass devicesBitField to gmm
Change-Id: Icad8a95d37d487fb7d01410c606baad67f681651
2019-01-28 14:51:09 +01:00
Mateusz Jablonski b94917659a Use mem obj offset when returning cpu ptr for read write
Change-Id: Ia624559f94e6af0ed602687814e3c11f6693f8a6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-25 14:52:15 +01:00
Mateusz Jablonski 128bf4552f Remove debug flag ForceResourceLockOnTransferCalls
Unlock locked resoures in freeGraphicsMemory method

Change-Id: I2baae7b7f9d8260f19a4b083849c5bf0d1a764f3
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-25 14:03:29 +01:00
Hoppe, Mateusz d7ce6ef8d1 Allocate images through preferred pool call
Change-Id: I79c9c1a0a95a8a3e26ed690530b71ef504cc7ff8
2019-01-25 09:05:25 +01:00
Mateusz Jablonski f90cfb9199 Fix typo: freeGpuVirtualAddres -> freeGpuVirtualAddress
Change-Id: I6cbec2bd4ec5863e2c5df75aa60b3a7a0dbb94c6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-24 16:08:00 +00:00
Mateusz Jablonski f332bf369e Set allocation's lock state only in lockResource and unlockResource methods
Change-Id: I60f35801287166f5bdb0dfcd31ff0118c56ec22a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-24 15:15:27 +01:00
Milczarek, Slawomir b2fe74ca9d AUB capture with writeMemory on aubManager
Change-Id: Ie954b0d0f72b093f12ef33c93af5a3dc845559dc
2019-01-23 13:54:28 +01:00
Dunajski, Bartosz 996d4f8387 Update GMM API to query TileMode for SurfaceState programming
Change-Id: I7cef2d8651037874811f8e3fefabc70470eec5bb
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-23 08:35:15 +01:00
Milczarek, Slawomir 21f855b719 AubStream update (1/n)
Change-Id: I6579e7af2015493490c5edcc413dcb2e6c804b9f
2019-01-22 12:19:21 +01:00
Piotr Fusik 40870f9c7d Retry mmap with a smaller size.
Change-Id: If8ea046af789394c1f58be9cc3a2b8100cee214a
2019-01-22 11:04:16 +01:00
Mateusz Jablonski ad3bfd84cb Add functionality to make resident before locking resource
Change-Id: I0963c1edcb43f409e9dd62cb46a0da1f2b05667b
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-22 08:28:12 +01:00
Katarzyna Cencelewska 72f17d6435 Add check that Intel OpenGl is used
before return device_id in clGetGlContextInfoKHR
Change-Id: Ic6dce407a1666909d468d89a8576c907abc63b61
2019-01-22 08:10:46 +01:00
Zdanowicz, Zbigniew 158f200476 Add HW commands const definitions
Change-Id: If2e9d7f7f707b7b8c7bd8dbd3853ab3b6dad0c9a
2019-01-18 12:13:25 +01:00
Dunajski, Bartosz 0c2f5aa491 Change width programming for GMM
Change-Id: If2a1a0d582cbebb209de182895d1f6decedcfb73
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-18 09:53:27 +01:00
Pawel Wilma dcbdbd92b9 Wait for paging frence after calling makeResident() on mapGpuVa
Change-Id: I289c4be891b2d7c1b50a0100cbdde8688f3068d5
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2019-01-17 10:41:28 +01:00
Dunajski, Bartosz 1de0bda212 Initialize HardwareContext with valid deviceIndex and engineIndex
Change-Id: I8848936340e8f4b33ac5ed5d0ae85d9f580171ca
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-15 15:33:42 +01:00
Mateusz Jablonski 06600f169b Define GPGPU engines per gen
Change-Id: Ie0e565d11184c5355b5bf09f5b10a567deb5c106
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-15 12:05:19 +01:00
Dunajski, Bartosz 8ae7de7b0e Create HardwareContext only when osContext is available
Change-Id: I8bcf2cb20f0e1e6b9da98b477f5be206407a7a57
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2019-01-13 15:12:07 +01:00
Mrozek, Michal 537697dcfd Update interfaces.
Change-Id: Ib038a98f51fdc8850ac5ee7d922c399535682081
2019-01-10 08:56:35 +01:00
Mateusz Jablonski b5d9ed77a6 Correct destruction logic of shared allocations
wait for all os contexts that used the allocation
when os context is not ready then flush related command stream receiver

Change-Id: I5fb2c16c1d398c59fbd02e32ebbbb9254583244e
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-01-08 14:32:21 +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
Milczarek, Slawomir ba2b8f05fc AubManager to accept memory bank size in bytes
Change-Id: Ie98cb7c0c0eaf93c9a2312aa87428173421609a9
2019-01-02 15:56:36 +01:00
Filip Hazubski 9d9b11734d Enhance processing Queue properties
Change-Id: I53ab00bdbfb6b11a7d9fdcaec816eead625ae737
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-01-02 14:52:02 +01:00
Hoppe, Mateusz a31c446d9f Allocate non USE_HOST_PTR and non-buffer images in preferred pool.
Change-Id: Ia486c7b32932202162d6587d06dc61023e38fff6
2018-12-31 14:37:44 +01:00
Dunajski, Bartosz 8029639898 Pin allocation with specific DrmContextId at creation time
Change-Id: Ic132fb70b1da2cf3b7c70ab899822705adb83edc
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-12-27 09:35:58 +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
Milczarek, Slawomir 541ab5af50 TBX CSR with an option to create and operate on hardware context
Change-Id: Ib5febc8e36e61195a5fcce91e1783117717ff6cb
2018-12-20 10:59:53 +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
Zdanowicz, Zbigniew 3dca095ccf Add cache flush command after WALKER command
Change-Id: I3983dc6c0797047e17cc8189655a22a22e85892b
2018-12-19 13:15:33 +01:00
Kowalczuk, Jakub ba66999f28 Add DebugFlag capability to force disabling/enabling local memory
Change-Id: Ic59780d200cc4b0e1a764b436aa7273c3ca8c728
2018-12-19 12:00:30 +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
Hoppe, Mateusz 82078074bc Add createAubManager function
- unit tests are using mocked version of createAubManager
- dynamic library, aub and tbx tests are using functional
version using aub_stream

Change-Id: I12d69d84d00645009b026df266b8b64adebb86d4
2018-12-12 08:23:18 +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
Piotr Fusik 0b839722f4 Don't store preemption mode in Wddm.
Change-Id: I6088e5fec65b6910fefb42ec9735181867c44a1b
2018-12-10 14:48:52 +01:00
Mrozek, Michal 3719c7a767 Limit AUB SSH size to 64KB.
Change-Id: I1a23aa2a253a93ed9633ab7fda0a6180050add83
2018-12-06 17:36:49 +01:00
Hoppe, Mateusz 3d35bf4291 Fix Source Level Debugger scenario
- when Program is compiled and linked, kernel debug options must be
added when linking
- when linking by CompilerInterface, store debugData in Program

Change-Id: Ie93a8fa7586681b94307a30c109c103f78ec861a
2018-12-06 17:23:39 +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
Maciej Dziuban 43fd32b3ad Enable aggregating command buffers with multiple osContexts
- Store inspectionId for each osContext in GraphicsAllocation
- Pass osContextId to aggregateCommandBuffer and use it to select inspectionId

Change-Id: I2c377ad7577a8c882cc89c1205430cb581c2c0d5
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-12-06 10:11:07 +01:00
Milczarek, Slawomir 1bf98c7f80 Added support for expectMemory call from aub stream
Change-Id: I8acf27eff8b2f38dcb8d9873e03c35bfab6f3298
2018-12-04 12:03:36 -08: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 1f7448425d Allow Device creating multiple CSRs [7/n]
Create and initialize all supported Engines

Change-Id: If0adf1a06b5005ef2698cebc6f1aaa6eacf562ec
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-30 15:48:44 +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
Zdanowicz, Zbigniew 7dbd0ea4f3 Move Scratch Space functionality to dedicated class
Change-Id: Ic7655c4b971513961aba6823478a139ffc943466
2018-11-29 11:55:56 +01:00
Mateusz Jablonski 6be8aee45d Restore deferrable allocation deletion
Change-Id: Ie5e87fa6551b7ee33579fcd9487c7e9c3bd4ab95
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-29 07:48:19 +01:00
Milczarek, Slawomir 42ba6c10fc AUB CSR with an option to create and operate on hardware context
Change-Id: If8e060ef184d6c077e09741144ef870c96360645
2018-11-28 09:24:18 -08: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
Piotr Fusik 87bb6afa56 Move stamps allocators from memory manager to CSR.
Change-Id: Ib399e462cdddad89fcc470df4c4f0f5e4591a6b2
2018-11-27 14:52:06 +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
Woloszyn, Wojciech 9a89426ec1 Refactor unit tests
- refactor image fixture
- add hwInfo fixture
- add missing case to mockGmm

Change-Id: I5f0886b8bd8f36938e1eedc5a0a63fe01248fcad
Signed-off-by: Woloszyn, Wojciech <wojciech.woloszyn@intel.com>
2018-11-27 13:54:53 +01:00
Milczarek, Slawomir 3b8ff44d55 AUB CSR with a separate function to write memory
Move common code related to writing memory to dedicated function

Change-Id: I4ac8ec779cb40146bd27b8e40728d81d3b5b4276
2018-11-26 20:21:19 -08:00
Dunajski, Bartosz 7781089740 Allow Device creating multiple CSRs [4/n]
- Introduce additional RCS engine
- Set fixed size for Engines array

Change-Id: I06533a425684b64214f956783b07877e6157935b
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-26 09:40:44 +01:00
Milczarek, Slawomir cd5f85052e AUB CSR with a separate function to submit batch buffer
Move code related to batch buffer submission from flush to dedicated function
Add parameter to pass aub file name from AubCenter to AubManager

Change-Id: I20abb3c8bd92114b3bc9caa2a6291dc1bbddad2a
2018-11-25 18:02:25 -08:00
Mateusz Jablonski f877d4254b Revert "Implement deferrable allocation deletion"
This reverts commit d961bd8354.

Change-Id: Ie7d772d57199ea2897e238b2ac289bd60a89e6c6
2018-11-23 14:59:02 +01:00
Mateusz Jablonski d961bd8354 Implement deferrable allocation deletion
Change-Id: I5e99d1bbb920619f63b71573335dc76f19c796a6
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-11-23 11:28:52 +01:00
Dunajski, Bartosz 3ad33bf1b8 Allow Device creating multiple CSRs [3/n]
Add CSR from Device to CommandQueue

Change-Id: Iaccf3c73d25e357242837677777d0513e81f520e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-23 10:51:34 +01:00
Dunajski, Bartosz 706d9f8070 Allow Device creating multiple CSRs [2/n]
Create new OsContext per CSR

Change-Id: I8dad7fc1ab450e560f78eba3152b5913791e59a3
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-22 14:29:44 +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
Dunajski, Bartosz af46d88fc1 Allow Device creating multiple CSRs [1/n]
Change-Id: Ie5d8d89aa388c608d5464919059c28a054ac9b1e
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-21 12:37:25 +01:00
Dunajski, Bartosz ac15e7f3ac Unify expectMemory in Aubs and introduce expectMemoryNotEqual
Change-Id: Ifd52f2d3ad3badf6ea9dac2c2b9873a40efa8482
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-11-19 10:39:45 +01:00
Kai Chen 85b60dff0f Linux GPU address allocator for devices with reduced address space
Code implementation of GPU address allocator for devices with reduced
address space.

Change-Id: Ieb0412c5930fdd71f90741055cf89c0338b01133
Signed-off-by: Kai Chen <kai.chen@intel.com>
2018-11-19 10:20:25 +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
Mrozek, Michal 08424d798f Enable power saving mode for queues created with throttle hint low.
- When queue is created with throttle hint low it should be power conservative
- With this change whenever queues with low throttle setting requests wait
for GPU completion, such wait will be handled in power conservative manner.
- Whenever GPU is not completed, waiting thread will be put to sleep and will
for GPU completion that triggers the wake up interrupt.

Change-Id: I9f34872a38ab9f5952f9d9623ea43503fc3dd587
2018-11-16 15:20:31 +01:00
Katarzyna Cencelewska 76b97b4955 Change type to atomic for variables in mock_drm_memory_manager.h
fix for sporadic failure in utl

Change-Id: Icdcdd600e8114f0b73ade4bc5e714b98495645e7
2018-11-15 18:30:25 +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
Piotr Fusik 76efeae9d8 Pass more information to programPipelineSelect.
Change-Id: Iaabe60742269b721f8defe71306dd6e87d60d546
2018-11-15 11:45:45 +01:00
Mrozek, Michal 3c0a6bd24d Remove residency control from Buffer Object.
- Residency is being controlled by Graphics Allocation.
- Duplicates are now eliminated only for shared resources.

Change-Id: Ib51e2739a07728ae0b94abf6cce2e9981b017111
2018-11-14 08:32:04 +01:00
Hoppe, Mateusz 0942edd6af Update aub_stream headers
- pass hwInfo and localMemoryEnabled to AubCenter ctor
- initialize AubCenter in Platform:intialize() when Device is
 created - only when CSR is not CsrHw
- move aub_center files to runtime/aub directory

Change-Id: Iceb4bf1cb2bb55b42d438502cca667a449f11411
2018-11-13 18:09:30 +01:00
Milczarek, Slawomir aa18a62d70 A partial unification of AUB and TBX CSR classes
This commit moves initialization of global MMIOs from AUB CSR to Simulated CSR

Change-Id: I93a612d4f0c82e7135287f6508870190790141bc
2018-11-10 13:12:22 -08: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
Zdanowicz, Zbigniew ce75767ca3 Add AUB registry key to override MMIO offset value
Change-Id: Iac3bf9074e544a03e38fc437d7b21ea478d9cc5d
2018-11-03 00:33:50 +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
Milczarek, Slawomir b051528258 Add getter for handle to AUB dump allocations
Change-Id: I30251145775e9d81e307c983236bd2cc0568a74d
2018-10-30 12:06:17 -07:00
Mateusz Jablonski ead2e2ea6d Move createAllocationForHostPtr method to command stream receiver
Remove not needed includes from command_queue.h

Change-Id: I45963bf005471bd7716d55471474299a15e27b62
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-30 17:49:08 +01:00
Mateusz Jablonski d3f71cfb04 Move allocation lists to internal allocation storage
Change-Id: I543f1551c8fb161cf99c5870de44afec390415b2
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-30 13:49:31 +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
Mateusz Jablonski a30c70d84b Remove cleaning allocation lists methods from memory manager
Change-Id: I4a58a5373e7dc4cf8dc5d90390e84c4f23689139
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-29 10:35:03 +01: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
Maciej Dziuban bd431edb46 Return trimCallbackHandle from register method instead of storing in Wddm
Change-Id: Iddfb6a926311480e355d52e5bf3e6379ec96f7a9
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-25 17:17:52 +02:00
Kowalczuk, Jakub 8ead8f727f Control enabling of local memory based on OS and HW Capabilities
Change-Id: Ia26c856aeef27fe638b7a6e895cc289859f3c579
2018-10-25 16:36:47 +02:00
Milczarek, Slawomir cd8f08b94b AUB CSR functions to operate on engine instance
Change-Id: I928cf5f7c25980fdfb2da825cbe062b5497c328a
2018-10-24 16:33:11 -07:00
Milczarek, Slawomir 3614b2acf8 Add mock for AUB file stream to test MMIO writes
Change-Id: I939d94e1fd50e22a2a8b278449ab1a93492bf83c
2018-10-23 20:12:30 +02:00
Mateusz Jablonski 56f67748fd Remove not needed definitions and includes from mock_device.h
Change-Id: I95585f05805ee85577dfa0b981b32f828853af8a
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-22 16:30:14 +02:00
Mateusz Jablonski 4f028d13a1 Command stream receiver: use memory manager from execution environment
Change-Id: I236218a73bd7dac6e5744e3596f146b77b5ca1c8
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-16 12:14:55 +02:00
Mateusz Jablonski 8a9d0a81df Move temporary and reusable allocation lists to command stream receiver
Change-Id: I40df6fe39b367e243e3710c5fdeaab3c85198d9d
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-11 15:32:12 +02:00
Artur Harasimiuk a6d9e74851 Revert "Refactor of glcl sharing"
This reverts commit 51ecef7ec2.

Change-Id: Ia654fe0d50a2144371c3def7e768ef9707419c61
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-10-08 14:03:57 +02:00
Pawel Wilma 5cd7ca460c Refactoring of internal options extraction
Change-Id: Ice53746e696ba6de5bb2c901e713594ee90bf99c
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-10-05 15:28:31 +02:00
Wilma, Pawel 7d93fedbab Fix for problems with uninitialized SPatchExecutionEnvironment
Change-Id: I46b1c5badc6505b8443e7c1eaca1fc56a03f0768
2018-10-05 14:58:36 +02:00
Katarzyna Cencelewska 51ecef7ec2 Refactor of glcl sharing
new pattern to load gl functions from dll

Change-Id: I6f39945d3c53b5a169b0829f36b2102c3ef5e18a
2018-10-05 12:41:31 +02:00
Dunajski, Bartosz 73b2e947a5 Multiple TimestampPackets handling
Change-Id: Ia5936c3d0a34b892aa4444026a5aebc681f126c2
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-10-05 01:54:35 +02:00
Maciej Dziuban bc4700a193 Add OsContext argument to MemoryManager::makeNonResidentEvictionAllocations
OsContext has to propagate through following calls first:
- WddmCommandStreamReceiver<GfxFamily>::processEviction
- CommandStreamReceiver::makeSurfacePackNonResident

Change-Id: I7559c7406b2860c51905c9961cec251fac231b08
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-10-05 01:28:31 +02:00
Koska, Andrzej 2110ba6ca4 Passing correct taskCount to waitForTaskCountAndCleanAllocationList
Change-Id: Ib0d2474bcd5827f8030331f7ef45ffc2805b955b
2018-10-04 23:53:43 +02:00
Milczarek, Slawomir 61000c0dd4 CSR AUB + HW mode - flush to poll MMIO for completion
Ensures that each submit of LRCA be serialized through the simulator
like it is for AUBs captured in the standalone mode.

Change-Id: I1e3ad500012dce960d0e64b56af1cb60142772da
2018-10-04 10:32:08 +02:00
Mateusz Jablonski b602cd2bb8 Pass execution environment to memory manager
Change-Id: If43cf9d1353b4cbc02ea269fb9105c01cc4e0876
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-10-03 22:12:26 +02:00
Milczarek, Slawomir ec48ccecdb AUB CSRs to use a shared address mapper (CPU VA to GTT VA)
This commit moves address mapper from CSR to execution environment
in order to generate unique GTT VA for LRCA, HWSP and ring buffer
between different CSRs.
Additionally, moved the rest of AUB file stream tests to separate module.

Change-Id: I02ae44202c0255277a7ac17532485419e0c403ab
2018-10-03 12:50:25 +02:00
Hoppe, Mateusz 4ea9f496d5 Fixes for AUBs
- pass aub usage in MockDevice to memory manager
- disallow mapping on cpu for cpu inaccessible memory

Change-Id: I5437a06efd4dd32940b603a15ff98a40091e2b04
2018-09-28 15:55:55 +02:00
Dunajski, Bartosz cbd017d495 Handle TimestamPacket with implicit dependencies ownership
Change-Id: I22a4de4e9eb904c359583e235e0de54a7c743e07
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-28 01:48:02 +02:00
Maciej Godek 2ad5108380 Clarified dependencies in Context::getSupportedImageFormats
Change-Id: Iaa09a2b572b3ae6d0533378f0ecf227bd90b1a10
2018-09-27 18:41:18 +02:00
Pawel Wilma e06aa17dfc Grf configuration
Change-Id: I3741f53a38c6707b0c8ad82ae553ea65ae6917e4
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-27 17:57:19 +02:00
Hoppe, Mateusz 64c891f0fd Use specific address for Allocator32Bit in AUB CSR
Change-Id: If3fd466fcfea21c1967b10def57acf67ccfdc5e6
2018-09-26 16:01:07 -07:00
Milczarek, Slawomir efdbde245a AUB CSRs to use a shared physical address allocator
This commit introduces AUB-specific control class to execution environment.

Change-Id: I525c9c93a4f10f769dbedb7d097674c35693f0b1
2018-09-26 20:31:56 +02:00
Maciej Dziuban f48b90ffee Change CommandStreamReceiver::flush() argument to a reference
Change-Id: Ic933a297d4c4e243138d0d62323ba82a8b91240f
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-25 17:28:44 +02:00
Woloszyn, Wojciech f624ec757b Unify mipmap layout accross platforms
- revert "Fix reported row/slicePitch for mip-maps"
- calculate mipmap offset without gmm

Change-Id: Id4802ef9624ad330e0d0f871dfa4d4fc35a7ba33
2018-09-25 16:27:43 +02:00
Hoppe, Mateusz 91aaa92fb6 Refactor PhysicalAddressAllocator
- create allocator dynamically in AUB & TBX CSRs

Change-Id: I3b01a3fc2f4824b552ef27cbda5bdcc140e92e53
2018-09-21 21:48:57 +02:00
Mateusz Jablonski 83f733fb70 Use dynamic gmmlib on Linux
Change-Id: Ia7d30fecf0406a14babe83d29743562de8bf7a29
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-09-21 17:34:31 +02:00
Artur Harasimiuk 40146291ad Update copyright headers
Updating files modified in 2018 only. Older files remain with old style
copyright header

Change-Id: Ic99f2e190ad74b4b7f2bd79dd7b9fa5fbe36ec92
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 18:02:35 +02:00
Mrozek, Michal 78f828fcd1 Make residency in graphics allocation OsContext dependent.
- Graphics Allocation now holds residency control per OsContext.

Change-Id: Ie0a0d3aa9fdaf542fdd42dee3aba236a5af635c7
2018-09-20 16:44:04 +02:00
Artur Harasimiuk de2d5d7532 move CL-GL Sharing header to different folder
- rename file
- move to folder public

Change-Id: Ie3c14c5a2be0aec5809b322b9a0e2cebe0e3fc22
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-09-20 10:42:41 +02:00
Katarzyna Cencelewska 962b6ce883 Add support for cl-gl sharing
Change-Id: I08d7608722746baa3be61846e05eecb5419cc136
2018-09-18 11:18:46 +02:00
Mrozek, Michal f5a2b38fa4 Add new debug flag allowing to not register trim callback.
Change-Id: I615be3edc9d843fb7b37cf32f2abd5e2839d6ada
2018-09-18 04:48:22 +02:00
Hoppe, Mateusz 610eda5ad1 Add PhysicalAddressAllocator to PageTables
- Allocator is responsible for physical pages allocation

Change-Id: I3a9034c87292484da8f4f0eb1d1e0cc5122a4d8a
2018-09-14 13:23:07 +02:00
Pawel Wilma 01fa11ba4d Additional Wddm context flags
Change-Id: I6f0bfd721e4840f44414da49ebbb7df3539e5588
2018-09-14 10:11:04 +02:00
Maciej Dziuban fafde2ec15 Delegate all MemoryManager::getResidencyAllocations() calls through CSR
Change-Id: I9cfbfd86d39b5341598ff2bd8883e13605c58b72
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-09-13 14:56:06 +02:00
Mrozek, Michal 789cb3327b Add support for returning raw GPU timestamps via registry flag.
Change-Id: Id80ef2a95132f1cdc1d14e45d406925b11599db1
2018-09-12 13:49:01 +02:00
Dunajski, Bartosz 2b89486fb1 Program Semaphore to keep dependency on previous enqueue
Change-Id: I511f39811769f1add179ea5d9cb331fa9c5ccec2
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-12 12:23:17 +02:00
Mrozek, Michal 8e33ec04c5 Create separate command stream receiver for every device.
Change-Id: I8073380941e2a3bfe57610e6e437bdc177dcc2d5
2018-09-12 09:32:41 +02:00
Mrozek, Michal 377b99be90 Pass device index to create method..
Change-Id: Iab493edf1b96a6cecf6e3dba6813824529f0c08b
2018-09-11 16:26:54 +02:00
Mrozek, Michal 1530d7832f Store command stream receiver in device.
Change-Id: I133ce4435e189e5bb8473ad4736fe0b02047dffe
2018-09-11 13:31:04 +02:00
Dunajski, Bartosz 7ec0989eea Obtain new TimestampPacket before releasing old node
Change-Id: I243d50e32967a0accea2d73fdd5ff4935bc03449
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-09-10 15:58:00 +02:00
Hoppe, Mateusz cfa8035836 Add localMemorySupported member to MemoryManager
- extend constructor to take new flag
- extend ExecutionEnvironment createMemoryManager with new flag
- only OsAgnosticMemoryManager changes in this step

Change-Id: I1dae4fd79fe28fd87e42b237600dc216c94b597e
2018-09-07 12:04:21 +02:00
Mrozek, Michal df41112b6a Do not wait on CPU for fence.
- If allocation is passed for destruction it means that it is ready to
be destroyed, there is no need to wait for tag.

Change-Id: I6b85ed62250aca8ee6293956b6178ce19bdb1f30
2018-09-07 06:56:38 +02:00
Dunajski, Bartosz b74280beb6 Check EnableTimestampPacket debug variable once and set as CSR mode
Change-Id: Ia6e7caa96f3b46b30590fb46a1fb37fa153adeb4
2018-09-06 11:19:02 +02:00
Mrozek, Michal fb735e5ee5 Move SSH size obtaining logic to dedicated function.
Change-Id: I1ea2ceb69f0ae06fe8e37f7769015933295dd6cd
2018-09-03 16:54:38 +02:00
Pawel Wilma 4a12deea2b Add support for reduced GPU address space
Change-Id: I9ebbc8c51039bb533b44c6b80e717e1489a20a43
Signed-off-by: Pawel Wilma <pawel.wilma@intel.com>
2018-09-03 13:51:36 +02:00
Venevtsev, Igor f6743ced2a Remove reuseBO from createGraphicsAllocationFromSharedHandle
Change-Id: Ia7af1cdd8e3986b8af7c542032d2767303865382
2018-09-03 13:38:19 +02:00
Mateusz Jablonski 92bfd2e3d2 Move OsContext to Device
Change-Id: I030b65372fbdc075423d22720e9da34ac65b8e68
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-09-03 10:42:26 +02:00
Chodor, Jaroslaw ad9710bec2 Refactor around binding table programming
Change-Id: I4cad63b11937531e36ea9d92cee606ea8941c9ef
2018-08-29 14:35:52 +02:00
Dunajski, Bartosz da0f9381dc Timestamp Packet ownership
- Tag allocator: reference count tracking
- Obtain tag by command queue and pass to Event if exist during enqueue
- Handle Timestamp Packet lifetime on Event and CmdQueue destruction

Change-Id: I9a5969830ea7a9d729e6f70519d8c28ff70fcf06
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-29 13:47:46 +02:00
Dunajski, Bartosz a807b9a90b Initial implementation of Timestamp Packet write
Change-Id: Ic498bcf9795f54fbb5fb5a8d07ed17fa70dc4f1a
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-28 08:27:13 +02:00
Mateusz Jablonski 9ac3529c6b Remove template parameter from Wddm methods
Change-Id: Icd700c7215184d4c0f9564c61868a1f9f29a75e5
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-23 16:37:31 +02:00
Cetnerowski 8647e0c349 Improve KernelInfo handling:
Remove wrapper for KernelInfo constructor
Switch to unique pointer where possible

Change-Id: Ib3f323e34836e1d189d836fd539ab45518609610
2018-08-23 13:55:28 +02:00
Mateusz Jablonski deaaa908a4 Extract Os Context from Wddm and WddmInterface
Change-Id: I13a52fc466a14f4bd28876d3c47884dc596f2b58
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2018-08-23 09:07:57 +02:00
Milczarek, Slawomir f6f9c0f456 Add notify functions to enqueue read buffer and image calls
This commit adds notifications to enqueue read buffer and image calls
and setters/getters to mark/check if an allocation is dumpable.

Change-Id: I123f24752d2a86abcf934e0d404f4e0ecf1729cc
2018-08-22 21:43:17 +02:00
Maciej Dziuban e0e48203d2 Move BuiltIns to ExecutionEnvironment
Change-Id: Ib2a1b82cc7858c898bb32820aad106a01d1325ad
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-21 23:15:47 +02:00
Maciej Dziuban d2759a0629 Move CompilerInterface to ExecutionEnvironment
Change-Id: I14afdd8fc41ecd4ac8c8fcbeecda2539bc847288
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-21 15:30:15 +02:00
Dunajski, Bartosz 931b462ee1 Disable NonAux to Aux translation for Parent Kernel
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
Change-Id: I863608fe3652e7e777a1e841d79b5b56e7362a3f
2018-08-21 15:12:25 +02:00
Stefanowski, Adam 1ad70dfebe Decouple memory manager and device
Change-Id: Ia64cc955e1d290cad4c50b6a2a41052d9acf0eec
2018-08-20 13:44:31 +02:00
Dunajski, Bartosz c7a49666d5 Refactor querying Main and Parent Kernel from MultiDispatchInfo
Change-Id: I723d91f2f445bc7af1bcb0de46f8ac07837f3449
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-17 13:51:32 +02:00
Maciej Dziuban 524737af39 Add executionEnvironment field to Program
Change-Id: Id624177aa3f0b5525bac86e2e0a935ebaf53480e
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-16 16:52:41 +02:00
Maciej Dziuban 5b37dc1c91 Add ExecutionEnvironment parameter to Program::createFromGenBinary
Change-Id: I825c29d8c885d986d54d716ea72f19e70b3b11c6
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-16 13:56:36 +02:00
Mrozek, Michal 931ed38a57 [3/n] Wddm Cleanup.
- remove different flavors of Wddm
- rename files for better meaning
- remove unnecessary files
- remove unnecessary methods

Change-Id: I73a35e186a9a99169260bb157958ff795b36e20d
2018-08-16 10:07:24 +02:00
Mrozek, Michal 6c5875f805 [2/n] Initialize Wddm interface in Wddm init.
Change-Id: If7184e64df54b4e6840970fec67cb5bc11909b7c
2018-08-14 11:02:27 +02:00
Dunajski, Bartosz a5950500a3 Aux translation [4/n]: Lock BuiltIn Kernel + refactor BuiltIns locking
Change-Id: Ic7dc9b86a4aa5f93f1c4bcdf80b9598ecdff9713
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-08-14 10:56:16 +02:00
Mrozek, Michal d51c7ccdd4 [1/n] Move different wddm functions to dedicated helper.
- This is first phase of moving wddm specific internals to Wddm
Interface helper
- Instead of having 2 different wddm classes driver will route interface
specific functions to dedicated helper
- Helper will be initialized when interface version will be known,
therefore we would not need to initialize wddm multiple times

Change-Id: Ic71788ccb2f8a71bf2f3f3c2a04117f16417d85e
2018-08-14 09:08:25 +02:00
Mrozek, Michal 99829a3319 Prefetch binding table entries.
- Significant performance boost for kernels utilizing surface states

Change-Id: I0cec91cb61bd19999847090b945810f798ed80d6
2018-08-13 17:21:04 +02:00
Maciej Dziuban b7bcd2dbac Move createFromGenBinary out from header
Change-Id: I444c057d76308fcaf08c8f2e6af1590f4cced0b3
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-10 15:59:26 +02:00
Woloszyn, Wojciech e102f6c36b Add missing getMaxLod() gmm call
Change-Id: I14e672b17ddfc9a7045ee66a694642f224a0f4e7
2018-08-10 15:49:24 +02:00
Mrozek, Michal ae9134233d OsInterface cleanup.
- OsInterface is now a part of execution environment
- it is created when getDevice is being called
- move ownership of wddm from Wddm Memory manager to OSInterface
- reuse osInterface on Linux in Command Stream Receiver
- currently OsInterface is not reused upon command stream receiver creation
on Windows this will change in further commits.
- make enumAdapters non static function

Change-Id: I10f36c01e6729f48653e3b5c11cbc32e811ce754
2018-08-10 14:25:53 +02:00
Maciej Dziuban b9310afe76 Decrease number of classes deriving from Program 4/n
Change-Id: I73a8616162b72e2dd29e4fa7facbd9bbe1932303
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-09 12:19:46 +02:00
Mrozek, Michal 1599ea800e Pass execution environment to command stream receiver.
Change-Id: I598f67f8b005b5ce8249b638e080657eb6dc3547
2018-08-08 17:10:39 +02:00
Maciej Dziuban acc0ec539f Decrease number of classes deriving from Program 3/n
Change-Id: Id5211d4acb46d770dd57b91896af81427d370e0c
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-08 16:20:35 +02:00
Maciej Dziuban 3edb738051 Decrease number of classes deriving from Program 2/n
Change-Id: I67a6e26f62c4bfdcdcea591ca4af3d4ce4f9980e
Signed-off-by: Maciej Dziuban <maciej.dziuban@intel.com>
2018-08-08 13:01:45 +02:00
Dunajski, Bartosz b4f53fdfa7 Pick applicable buffers for aux translation
Change-Id: I60a28cd9e0dec61120b1ae5c42dfe0cb852eb387
2018-08-08 09:23:51 +02:00
Plewka, Maciej 392277ff00 Enable 'Pass info between GT-Pin and IGC', after being reverted
This reverts commit ea92874a66.

Change-Id: I4994b30f059012a5e89d899665af5c24b8ac8b18
2018-08-07 17:28:54 +02:00
Chodor, Jaroslaw 02216e198d Adding spirv to cloc
cloc will now accept spirv as input
when spirv_input command line argument
is present

Change-Id: Iaca88e1bd11ec2e4b2bfbac3e372ba97fa7efc8e
2018-08-07 14:08:34 +02:00
Dunajski, Bartosz ec6f0f9f86 Aux translation [1/n]
- Mark Kernel for aux translation
- Initial implementation of dispatchAuxTranslation for future use

Change-Id: Ifca1c9a893876eecc5678cdc4f564b2bfcae959a
2018-08-07 09:07:25 +02:00
Maciej Dziuban 72740fc048 Cleanup program_tests.cpp
Reduce number of local classes deriving from Program

Change-Id: I713790c6ea0e034971fa90c6cb8f9c0a6bd6b6cd
2018-08-06 16:05:25 +02:00
Mrozek, Michal 2711e19986 Do not seek extension presensce in sharing builder.
- Do it in sharing functions instead
- remove incorrect interface

Change-Id: I6319a341e311217d41e151c332808442db561587
2018-08-06 10:57:18 +02:00
Jobczyk, Lukasz d9f77550f2 Refactor SourceLevelDebugger mocks after moving SLD to Execution Environment
Change-Id: I459cd4ae00a57412ac30029e94399051d2b2fc75
2018-08-04 13:52:20 +02:00
Hoppe, Mateusz 4cb408294c Add useSystemMemoryPool flag to Gmm
Change-Id: Ide27887de9169a9d958d3f232bcd70a1b7afe94f
2018-08-03 12:52:23 +02:00
Dunajski, Bartosz bd9ac40bab Set non-aux mode for non-pure stateful kernel arguments
Change-Id: Id59fc3ae966a1f6632a24cbcfca3fb0aef0dd76d
2018-08-03 09:47:49 +02:00
Mrozek, Michal 1807ea651c Initialize tag value in init function.
- remove not needed method in mock device.
- remove duplication from aub tests.
- tag allocation now have desired value

Change-Id: Ib3161cce6753eae27c60fddb63054fd2e12f7dac
2018-08-03 09:25:26 +02:00
Hoppe, Mateusz e1eaf3ded0 Fix bug in VA sharing multithreaded scenario
- createGraphicsAllocationFromSharedHandle was not threadsafe,
instead of reusing BufferObject for a single handle when
multiple threads were creating memory objects from a single VASurface,
new BO could be created and placed in container with BOs for reuse.
This was leading to errors in ioctl calls.

- add lock for following set of operations:
 1. find BufferObject with a given handle in container
 2. create shared BO when not found
 3. add shared BO to container
 prevents creating multiple BOs for a single handle

- replace recursive mutex with regular mutex as mutex shouldn't
be locked recursively

Change-Id: I0937e2abf3bf1c672c6d77422d46e441f7216a68
2018-08-02 12:55:05 +02:00
Mateusz Jablonski 601caa8b27 Pass gmm entries to gmm client context wrapper
Change-Id: I618da55ef2eec9858ebb6570b5070bed6ddb73bf
2018-08-01 15:05:05 +02:00
Mrozek, Michal f60847b64e Pass device to flushTask.
- do not obtain it from memory manager

Change-Id: Icc7c03dc925c69ec5932c5812151ac28dc34d20d
2018-08-01 14:11:06 +02:00
Chodor, Jaroslaw b83696c1b0 Changing cloc tests to accept SpirV as IR
Change-Id: Ia12d3f144711bd7af639869d28d1e4a1fa80bb15
2018-07-31 13:39:01 +02:00
Chodor, Jaroslaw fcfef318c1 Fixing hash calculation in MockProgram
Change-Id: I869bca0cc8c0d2c87901cde65e7cf62d81a10285
2018-07-31 13:32:11 +02:00
Maciej Dziuban b83b9ac120 Stop creating MockContext in MockParentKernel
Change-Id: I398d7e6f159e246e4f66cd73ac1f04eb09ea04ca
2018-07-31 12:20:52 +02:00
Hoppe, Mateusz 4441387969 Refactor allocateGraphicsMemoryInPreferredPool
- extend AllocationType to code necessary flags
- remove redundant args
- refactor Buffer::create()

Change-Id: Ic4b2e0931fad8198ad1cf4f79de210d815048ccf
2018-07-31 08:05:55 +02:00
Chodor, Jaroslaw c2454d5aa2 SpirV improvements
* Use preferredIR form compiler
* Allow .spv test files instead of .bc

Change-Id: Ia1a693be52b7391896378fbe159be85f4e7a00c1
2018-07-31 00:26:52 +02:00
Mateusz Jablonski df2f29907c Change createGmmContextWrapperFunc to return unique ptr
Change-Id: I74e6c5b1a49ed19f24933edd3062c62d9256f2d8
2018-07-30 18:14:06 +02:00
Chodor, Jaroslaw c5becf63f7 Forcing llvm as intermediate for Link, CreateLib
Link and CreateLibrary will use llvm IR as
intermediate representation always

Change-Id: I370e92ee258d997f04f40320ab4a478970ee22bd
2018-07-30 17:15:21 +02:00
Kamil Diedrich ea92874a66 Revert "Pass info betwean gtpin and igc"
This reverts commit 5654d5673fbff18b1f3c81a8eb3c8dfeb9add9e1.

Change-Id: I2df912fef15755b2e5bd11d3e18e595d71bfad98
2018-07-30 16:10:28 +02:00
Maciej Plewka aa7662e8b4 Pass info betwean gtpin and igc
Change-Id: I1da3089ba816298b43e493304612fac6a4a10851
2018-07-26 19:25:52 +02:00
Mateusz Jablonski 98061903aa Remove device helper
Change-Id: Ie66c029359a62b81c8658d804dcf8565647100f1
2018-07-26 14:10:05 +02:00
Hoppe, Mateusz 03bad96877 Add failInAllocateWithSizeAndAlignment flag to MockMemoryManager
Change-Id: Iee6a5ec468a905e065645dbf2ae8b9521c0b04d9
2018-07-25 10:47:09 +02:00
Jobczyk, Lukasz eebb919c18 Move SourceLevelDebugger ownership to execution environment
Change-Id: I7fc6fd1cde2e450dbd41a164f915373e80a4aaf8
2018-07-25 10:32:29 +02:00
Hoppe, Mateusz 229d1ad794 Merge two MockMemoryManager classes to a single one
Change-Id: I4b994b21a2423f1f3c077e847483766798c8d7f9
2018-07-24 16:48:03 +02:00
Dunajski, Bartosz 579367fe4a Enqueue write buffer instead of memcpy for renderCompressed allocation
Change-Id: I5505add129e08537fc0009b12228a446aa732645
2018-07-24 15:19:41 +02:00
Hoppe, Mateusz d80334a534 Add overrideMemoryPool to mock GraphicsAllocation
Change-Id: Ief0cc99a93ae93ec5a6d07a1259ae51e659a954c
2018-07-23 12:19:42 +02:00
Dunajski, Bartosz 512978768e Pass renderCompressed information to GMM for 64kb allocations
Change-Id: I56302055c028e919bceeb3333557cab7451e1d09
2018-07-23 11:28:43 +02:00
Mateusz Jablonski 8ed9991910 Remove not used function, unify gmm interface filenames
Change-Id: I017697ec4076ddd47f2039f71805a895d687c8a9
2018-07-23 09:09:47 +02:00
Mateusz Jablonski 56557ca3a3 Unit tests: Initialize gmm before wddm initialization
Change-Id: I751bd93248aa78731b9591f494eafcd12d3e6d82
2018-07-20 15:47:15 +02:00
Mrozek, Michal 366a12e3ce Move setting external memory managers to mock layers.
Change-Id: I335fd35269da9093c9e744c2735215e8d561098c
2018-07-20 12:09:48 +02:00
Mrozek, Michal f487ce11a2 Limit device usage in memory manager.
Change-Id: I488574dc2b2878b640f0bac2b23bd9a6a265f0e2
2018-07-19 18:27:42 +02:00
Chodor, Jaroslaw b490a1331b Refactoring/preparation for preferred IR from FCL
NEO will be querying FCL for preferrerd IR
(intermediate representation) instead of
using llvm bc.

Change-Id: I98316b5623557a9651da2a4c5e610ab26421c491
2018-07-18 16:49:29 +02:00
Hoppe, Mateusz 407227959a Add memoryPool to GraphicsAllocation
- new ExtendableEnum struct that serves as enum but can
be extended with values
- decrease dependencies on graphics_allocation.h header -
 use forward class declaration when possible
- memoryPool indicates what kind of memory is allocated
for a given GraphicsAllocation

Change-Id: I7a707c28dc4544cc73abc5f0ed5263ba5be17452
2018-07-17 20:10:33 +02:00
Dunajski, Bartosz 0adbcb75b1 dependencies update
Change-Id: Ia41750759981a3b34a1d3e779bcd0425da190e32
2018-07-17 13:32:27 +02:00
Mateusz Jablonski 36db75da28 Create gmm client context wrapper, reduce mock_gmm
Change-Id: I4eec4366afeb175fea4bf7934e3046b50fe30fe9
2018-07-17 11:46:04 +02:00
Mrozek, Michal fb67598ff2 Remove tag allocation from device
Change-Id: I9f463ee7d8f21722f8c0b343200a3b5125c02ab7
2018-07-16 14:54:16 +02:00
Mrozek, Michal 0abacce160 Move tag allocation destruction to command stream receiver.
Change-Id: I657df755c6cdd695103769a45a8dce749f7bd545
2018-07-16 13:12:53 +02:00
Milczarek, Slawomir 16d04fd276 AUB subcapture to read file name from outside and write into several files
Add a capability for AUB subcapture feature to dump into several files
and read file name from the outside (via regkey and env variable).

Change-Id: I2d5f7945cfbc740b0316fe23b8c5ae9fd698ac57
2018-07-14 13:10:35 +02:00
Zdanowicz, Zbigniew 51421ec0b9 Add experimental command buffer
This code is an infrastructure for special debug purpose that allow measure
execution time of any hardware command.

Change-Id: Id12a7979d204734a0c4a6c4700e427b65ac2397f
2018-07-13 12:09:14 +02:00
Dunajski, Bartosz a8ce3ca00a Wddm: Use GMM allocation size during map GPU VA
Change-Id: Ie10898db7c539ce5025ab4a6d658d6e593e94c50
2018-07-13 08:03:57 +02:00
Mrozek, Michal f7316c0053 Ensure that device has valid command stream receiver in tests.
Change-Id: I1226a4b43b48fff6fa001b72791926fe21ba1fc0
2018-07-12 11:43:25 +02:00
Mrozek, Michal 7735fb5767 Move memory manager ownership to execution environment.
Change-Id: Ib743b04139a6572da65eeffa6cd3e13db4bd9098
2018-07-12 08:23:05 +02:00
Mrozek, Michal a126b290b8 Move ownership of command stream receiver to execution environment.
Change-Id: Ibf924347e79f0c6e61141542c7e4c97c7a27e88d
2018-07-11 17:07:22 +02:00
Hoppe, Mateusz 55a045ebe1 Refactor graphics memory allocation scheme
- replace createGraphicsAllocationWithRequiredBitness with more general
methodallocateGraphicsMemoryInPreferredPool based on passed
 AllocationData
- proper flags for allocation selected based on AllocationType

- remove allocateGraphicsMemory(size_t size, size_t alignment)
and use allocateGraphicsMemory(size_t size) instead where default
alignment is sufficient, otherwise use full options version:
allocateGraphicsMemory(size_t size, size_t alignment,
 bool forcePin, bool uncacheable)

Change-Id: I2da891f372ee181253cb840568a61b33c0d71fc9
2018-07-11 15:48:05 +02:00
Mrozek, Michal 4fb02f2e99 Ensure that every device has execution environment.
Change-Id: I77a203fb5ffd2c6a9309091f5e048f71c58c4c04
2018-07-11 12:53:18 +02:00
Hoppe, Mateusz 684b1d75ba Refactor GraphicsAllocation::AllocationType and allocationType enums
- change GraphicsAllocatoin::AllocationType to scoped enumeration
so that ALLOCATION_TYPE_ prefix in every enum value can be removed
- all accesses are typed (example AllocationType::IMAGE)
- Rename allocationType to AllocationUsage to eliminate confusion
with multiple AllocationType enums / types

Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
2018-07-06 13:00:08 +02:00
Mateusz Jablonski 94dbdb602d Add instance of gmm helper to execution environment
Change-Id: I1b044611fbad91fbb681ba233938f41502f29056
2018-07-06 08:48:19 +02:00
Hoppe, Mateusz 64277ee849 TBX CommandStreamReceiver fix for makeCoherent
- makeCoherent should be called after TBX finished processing
 - this is when tagAddress is updated with taskCount
makeCoherent is called from makeNonResident which is invoked just
after flush and may happen before TBX server finished processing
leading to invalid data to be read back to CPU accessible memory

- this fix adds waiting for taskCount to blocking calls for TBX CSR
before calling makeNonResident on surfaces to guarantee correct data
from TBX server is ready.

Change-Id: I498a5454e0826eec2a5413a08880af40268550e1
2018-07-04 12:04:32 +02:00
Dunajski, Bartosz e26d67cde3 Aux surface programming for Buffers [1/n]: Gmm interface improvement
Change-Id: I984b8ebee27808a236217e82bb4e910550d624c4
2018-07-03 13:00:08 +02:00
Milczarek, Slawomir 86565e5f06 AUB subcapture in toggle mode to be controlled with HKCU regkey
- move AUBDumpToggleCaptureOnOff from HKLM to HKCU without admin rights
- fix AUB subcapture in toggle mode to call make resident in standalone mode

Change-Id: Ia6971921f33bb9ca63112790af870217da8a1585
2018-07-03 12:56:06 +02:00
Mrozek, Michal ad96adfcef Remove isRootDevice logic.
- Our device are always root devices.

Change-Id: I057485cda9fba2988b0910f5349f7ced527abe29
2018-06-29 11:22:41 +02:00
Dunajski, Bartosz 5408913d38 Set HwInfo to GmmHelper on Device creation
This allows querying HwInfo from code that doesnt have access to Device

Change-Id: I0084f824f557cd85c2fdfbf0ff2ec71118e9af2e
2018-06-29 11:02:52 +02:00
Mrozek, Michal b20bcb8b31 Move platform shutdown to destructor.
Change-Id: Ifeca1c5fe11d8e562b9f4641737b6bf1ac70aac6
2018-06-28 12:36:23 +02:00
Mrozek, Michal 887df5a90d Add reference on device while creating a context
- Context uses device, it needs to make sure it exists.

Change-Id: I1aeaabc53b6198965dc8f4e6fa37585490774a3f
2018-06-28 08:53:23 +02:00
Dunajski, Bartosz e18e9fb94e Move static methods from Gmm to new GmmHelper class
Change-Id: I84fbe94f0e1072324164086b456c71a46ae5040c
2018-06-27 16:46:09 +02:00
Mateusz Jablonski b659d270ae Revert "Create wrapper for GmmClientContext"
This reverts commit 50c31872d8.

Change-Id: Id154ca2d217e5e45623750f641ebad5dc5e840a2
2018-06-21 16:14:45 +02:00