Commit Graph

84 Commits

Author SHA1 Message Date
Mrozek, Michal c865dbbaa1 Choose BUFFER_HOST_MEMORY as type in 32 bit applications.
Change-Id: I33addbd37cb4b9192c2dfa88aeee6d6cbdafd714
2018-12-07 16:17:04 +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
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
Filip Hazubski ea2e634f7e Add clCreateBufferWithPropertiesIntel() API
Change-Id: Icfbbbc2479c1bc94008e0ccf90bcb25adddf0b61
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2018-11-06 11:03:04 +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
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
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
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
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 89cf7532ea Make all gmm helper members non-static
Change-Id: Idb399aa275d66905040b6317d3888c94ffb98c55
2018-08-03 08:25:44 +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
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
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
Mrozek, Michal 224d513c3b Remove redundant cast.
Change-Id: Ic1b2b247645efbde1351efc6a20f91e5c39b398f
2018-07-19 16:05:27 +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 e527a439cd Disable CPU operations for renderCompressed GMM resources
Change-Id: I4396460cab1e030717ea85590775eea0ea92f9db
2018-07-09 16:15:13 +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
Zdunowski, Piotr 0cc10e47cc Use device instead of context when programing surface state.
Change-Id: I67615036d373cf905762a43a92562bf3d84854a5
2018-06-11 17:20:11 +02:00
Koska, Andrzej fe56c57318 Tracking the internal allocation when creating a buffer
This fix prevents the creation of a buffer from the pointer
obtained from clEnqueueMapBuffer

Change-Id: I203f2d5263eeb02fe0d73bc9db159438af3cf1fc
2018-06-08 07:33:07 +02:00
Mrozek, Michal f24ec6ec33 Add DisableZeroCopyForBuffers debug flag.
- This flag disables zero copy for all buffers.

Change-Id: I882f01942f99e399e33f5fe2750acbcc0476457c
2018-06-07 11:28:54 +02:00
Hoppe, Mateusz d019638119 Fix image from subbuffer offsets
- change 32 bit offset to size_t to account for offsets bigger
than 4 GB in SurfaceOffsets
- change ImageInfo offset to size_t type
- fix hostptr offseting in subbuffer creation - null hostptr
shouldn't be offseted

Change-Id: I18a5b8eacbd8c9e40c1f2effe5ded4fa8b453395
2018-05-29 16:29:25 +02:00
Mrozek, Michal 4cb86b4045 Add debug flag that controls zero copy for CL_MEM_USE_HOST_PTR buffers.
- when flag is enabled driver will not go with zero copy path for
CL_MEM_USE_HOST_PTR flag

- flag doesn't work in shared context where we must accept zero copy
storage.

Change-Id: Idda94f296dd12e7e3ccb15f2224808287551ac97
2018-05-21 12:08:59 +02:00
Pawel Wilma ff1d2361f3 Add patch info comments to AUB dump
Collect patching information and add as comments to AUB dump.

Change-Id: Ib7c903a2589d68b6e3e614c1774c7cd5a000c29f
2018-03-23 13:08:54 +01: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 f5513b6a1d Handle host pointer not meeting memory manager criteria
Change-Id: I65eec6083f1d8bb7b5f46e1a2e015aa6fd7f3d9f
2018-01-29 11:40:32 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00