Commit Graph

48 Commits

Author SHA1 Message Date
Zdanowicz, Zbigniew 3dca095ccf Add cache flush command after WALKER command
Change-Id: I3983dc6c0797047e17cc8189655a22a22e85892b
2018-12-19 13:15:33 +01:00
Dunajski, Bartosz 4ddf5a1e87 Add debug flag to control RenderCompressed value in HardwareInfo
Change-Id: I733125fbd8596f24cdeb636b69a9198c44bd899b
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-12-17 13:11:00 +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
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
Mrozek, Michal c865dbbaa1 Choose BUFFER_HOST_MEMORY as type in 32 bit applications.
Change-Id: I33addbd37cb4b9192c2dfa88aeee6d6cbdafd714
2018-12-07 16:17:04 +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 Plewka bb7f8d9b88 Disable compression when using hostPtr
Change-Id: Ifa066a3824f51b4ad5957de9fe8590853c620587
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
2018-12-05 16:07:15 +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 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
Filip Hazubski 622f71a1b2 Move MemoryProperties struct to separate file
Change-Id: Ie35d2638b6fe5cafe64f3b9fc3e0c3b67ac08fd7
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2018-11-15 08:09:16 +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
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 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
Hoppe, Mateusz 65565acdaf Refactor Buffer::create
- simplify conditions by separation
- reorder some calls
- pass allocateMemory to AllocationFlags

Change-Id: Iab6fd35f9b9c10bfbc19058e69058346ef87dad8
2018-09-27 18:16:54 +02:00
Hoppe, Mateusz 330b9eddbd Upload data to cpu inaccessible memory with enqueueWriteBuffer
Change-Id: Ibb33c4248fd0cb4338c82a9deb3994147c0acba5
2018-09-27 18:09:01 +02:00
Hoppe, Mateusz 5aae5a3d62 Rename DeviceIndex to DevicesBitfield to reflect type usage
Change-Id: Ic5ac1d2d49082dc3c6e98c1fa5178b93ec9ddf56
2018-09-24 14:46:19 +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
Venevtsev, Igor 7c94409ce8 Change MemoryManager::allocateGraphicsMemoryInPreferredPool() signature.
Remove allocateMemory param.
Add AllocationFlags and DeviceIndex params.

Change-Id: I3ba048f8ea9840a047a3222dc1e97be2105c2222
2018-09-20 13:04:21 +02:00
Mrozek, Michal 377b99be90 Pass device index to create method..
Change-Id: Iab493edf1b96a6cecf6e3dba6813824529f0c08b
2018-09-11 16:26:54 +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
Dunajski, Bartosz bd9ac40bab Set non-aux mode for non-pure stateful kernel arguments
Change-Id: Id59fc3ae966a1f6632a24cbcfca3fb0aef0dd76d
2018-08-03 09:47:49 +02:00
Mateusz Jablonski 1bc7275de7 Fix false positive memory leak in buffer tests
Remove platform fixture from buffer tests

Change-Id: Iea0e40c31c2a7ea9e7eab9e60b9d06ba56f0effe
2018-08-03 08:11:14 +02:00
Mateusz Jablonski 9ae4f390d1 Remove command queue, completion stamp and device from mem obj
Remove setCompletionStamp function from Surface

Change-Id: I25f3040a91892495e55cb4924f1538276de6264e
2018-08-01 16:17:13 +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
Mateusz Jablonski a906ddaa66 Make gmm client context non-static member
Construct platform and initialize gmm in each test

Change-Id: I4f209369e77213420308f31f911b7a569ea93283
2018-07-27 00:16:30 +02:00
Mateusz Jablonski 98061903aa Remove device helper
Change-Id: Ie66c029359a62b81c8658d804dcf8565647100f1
2018-07-26 14:10:05 +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
Dunajski, Bartosz 3a807d5643 Render compressed buffer creation flow
Change-Id: I58b7f7eb3b69afcb78c6ab3de1f6fb7524d33f13
2018-07-23 15:29:47 +02:00
Hoppe, Mateusz f125c8ff45 Add allocateGraphicsMemoryInDevicePool
- do not always expect failures in tests with failure injections
there is retry mechanism for some cases

Change-Id: If7589d2dacc41216d2f3b08f861209bbab179615
2018-07-20 13:00:00 +02:00
Dunajski, Bartosz 239ebf9eab Improve AllocationType operations: dont do bit operations on enums
Change-Id: Ie70ca9e2a93ec80b1cd655bad622db9e12abb7f7
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
2018-07-20 09:12:58 +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
Dunajski, Bartosz a1d7d42c69 Remove Aux pitch/qpitch/baseAddress programming
Change-Id: I836bb33c9b4328f67be88739c83290972a03288c
2018-07-11 13:06:21 +02:00
Dunajski, Bartosz aa96508354 Set valid coherency type in Surface State for Buffers
Change-Id: Id84f6a8561831d29b1de9ac589a52e3e083eefda
2018-07-06 13:01:25 +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
Dunajski, Bartosz b3414ae5f2 Program Aux Surface params for Buffers
Change-Id: I7bf838b5c157e8d89d59cd1abc63ddb3bfc7ae30
2018-07-06 09:28:06 +02:00
Mateusz Jablonski 94dbdb602d Add instance of gmm helper to execution environment
Change-Id: I1b044611fbad91fbb681ba233938f41502f29056
2018-07-06 08:48:19 +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
Mrozek, Michal 686209874a Remove not used parameters in PlatformFixture SetUp function
Change-Id: Ib58c97e377218350cea19373dd1f193c4cc32a45
2018-06-26 15:00:27 +02:00
Zdunowski, Piotr 0cc10e47cc Use device instead of context when programing surface state.
Change-Id: I67615036d373cf905762a43a92562bf3d84854a5
2018-06-11 17:20:11 +02:00
mplewka 079f94cd2d Refactor ult for preemption enabling
Refactoring in ULTs around preemption:
    -refactoring ULTS to not fail with default preemption mode
    -fixing ULT memory leaks observed after enabling preemption
    -mocking getSipKernel in ULTs (to minimize ULT execution time)

Change-Id: I194b56173d7cb23aae94eeeca60051759c817e10
2018-04-16 12:55:30 +02:00
Mrozek, Michal 9fa22e7fd2 Add missing test for createSharedBuffer.
Change-Id: I1aefac11ba078d1d6cebe3b76c3fcd7d36972199
Signed-off-by: Mrozek, Michal <michal.mrozek@intel.com>
2018-04-12 15:28:07 +02:00
Chodor, Jaroslaw 0a97dfbb2f [1/n] Mipmap support
* adding support for map/unmap
* adding support for origin/region validation with mipmaps
* fixing slices returned in map/unmap
* removing ambiguity around mipLevel naming
* enabling cl_khr_mipmap_image in current shape
* enabling cl_khr_mipmap_image_writes in current shape

* fixing CompileProgramWithReraFlag test

Change-Id: I0c9d83028c5c376f638e45151755fd2c7d0fb0ab
2018-04-05 01:09:27 +02:00
Hoppe, Mateusz 76dd4ac1f3 service read_only memory passed to CreateBuffer
- only when cl_mem_flags allows for read only memory
and USE_HOST_PTR is used

Change-Id: Id023f9cb551f7d81ec680de9cc546005980e6f75
2018-03-15 18:29:38 +01:00
Dunajski, Bartosz dd44a87d5f Map/unmap enqueue fixes [6/n]: Support multiple map operations
- Dont make cpu/gpu writes on read-only unmap
- Read/Write on limited map range only
- Overlaps checks for non read-only maps
- Fixed cmd type on returned event

Change-Id: I98ca542e8d369d2426a87279f86cadb0bf3db299
2018-02-23 10:45:06 +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
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 602474f868 Command streamers should use device default engine type
Change-Id: I7286f15ba78001729ea489a43576d96f109d44f0
2018-01-16 22:37:44 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00