Commit Graph

55 Commits

Author SHA1 Message Date
Filip Hazubski 40541e4faa Update Image compression
Change-Id: I3a15dba343a80716b57cdda6b74f2142814021f3
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-03-13 13:59:50 +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
Mateusz Jablonski 24cb171d2a Rename DevicesBitfield -> StorageInfo
Change-Id: I2f763be185350de7b76838c9f101a1f8026f42c9
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
2019-03-04 11:44:04 +01:00
Piotr Fusik 33a9d3160b Simplify code.
Change-Id: If730d02312da01515ae53b5faaeb5d33419ec4ba
Signed-off-by: Piotr Fusik <piotr.fusik@intel.com>
2019-02-28 13:09:52 +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
Filip Hazubski a8d4733802 Replace MemObj::flags with MemoryProperties
Change-Id: I886cd775d1eca55964b7c4b05f6c977558a73922
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
2019-02-12 10:16:09 +01:00
Hoppe, Mateusz d7ce6ef8d1 Allocate images through preferred pool call
Change-Id: I79c9c1a0a95a8a3e26ed690530b71ef504cc7ff8
2019-01-25 09:05:25 +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
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
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
Mrozek, Michal b99cf6c3ff Image / Buffer refactor.
- do not use redescribe flag for image/buffer from other image/buffer.
- use redescribe flag only when image is redescribed via redescribe interface
- remove image specific functions from mem object
- remove redundant fields
- add new implementation of isImageFromBuffer/isImageFromImage basing
on associated mem object.
- pass associated mem object to redescrbed images.
- remove redundant setters

Change-Id: I267637a48fbc2afdad9a9f5e5e9ccd6bd0c09972
2018-12-19 21:21:44 +01:00
Hoppe, Mateusz f6790c42cf Refactor Graphics Allocation paths for Images
Change-Id: Ifa3084b18cac95289bbceeaf3669dd31567fbd3e
2018-12-19 13:49:53 +01:00
Kamil Diedrich 2f88abfa2a Add information about image from buffer extension
- don't change allocation type when buffer is given
- add flag isImageFromBuffer to mem_obj

Change-Id: I48a0722040d8482ed3653540179d047245affa3c
2018-12-18 22:37:33 +01:00
Piotr Fusik e8a71132a4 Remove unnecessary casts.
Change-Id: I2d293d065c7efa006efe7d60a625cba0c6116c86
2018-12-18 13:42:14 +01:00
Maciej Godek 2ad5108380 Clarified dependencies in Context::getSupportedImageFormats
Change-Id: Iaa09a2b572b3ae6d0533378f0ecf227bd90b1a10
2018-09-27 18:41:18 +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
Woloszyn, Wojciech 2248c8e048 Fix typo
Change-Id: I393ad63769ac1fd9f95374344dae60dda803346a
2018-09-25 01:53:59 +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
Hoppe, Mateusz aaf2f94887 Fix zeroCopy property for images
- zeroCopy means no need for data transfer when cpu transfer is
chosen during map/unmap operations
- tests cleanup

Change-Id: Id312267e51d593781c6fe536b6e96f42f32e5c02
2018-08-23 16:45:05 +02:00
Kamil Diedrich 1dcec9e23a Error handling improvement
Change-Id: I5e35bff508c45993be03bc946ddebfb698a0c638
2018-08-20 10:54:28 +02:00
Woloszyn, Wojciech 93c1a7b51b Fix mipmaps return values
Change-Id: I6e7cdc69edc80010a0c6f5f337e6b530278a6606
2018-08-13 11:56:07 +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 3817857276 Remove redundant cast.
Change-Id: I3eb79be6a25abbaf0327458384e0e180d5b52ab5
2018-07-19 15:38:46 +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 e26d67cde3 Aux surface programming for Buffers [1/n]: Gmm interface improvement
Change-Id: I984b8ebee27808a236217e82bb4e910550d624c4
2018-07-03 13:00:08 +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
Dunajski, Bartosz e18e9fb94e Move static methods from Gmm to new GmmHelper class
Change-Id: I84fbe94f0e1072324164086b456c71a46ae5040c
2018-06-27 16:46:09 +02:00
Dunajski, Bartosz 88edc7279d Improve returned row pitch calculation for multisampled images
Change-Id: I2fbf413ba83941682fa2bd0353060cab3f534d1a
2018-06-13 13:00:26 +02:00
Maciej Dziuban 3bfbcad8c6 Fix validation of size when creating image from buffer
Change-Id: Iaf9b8aae8bd3a2f2ea2b4a3d7f751dbcf4df7c0e
2018-06-06 13:17:10 +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
Hoppe, Mateusz 4c4e682bc7 Set correct offset for images created from buffer
- images from subbuffer with non-zero offset relative to
parent buffer didn't have correct Surface Address offset

Change-Id: I6ae2b87f8c9d19e40ec14a29b5eadc7401db18ad
2018-05-24 18:12:55 +02:00
Woloszyn, Wojciech 8a488ad52f Fix reported row/slicePitch for mip-maps
- use information from gmm correctly
- modify computation on gen8

Change-Id: Iaefcc20ce9436ef70cd2f4bc36654932c4b5af49
2018-05-22 10:36:54 +02:00
Mateusz Jablonski 5d296f15e3 Validate image 2d sizes unless parent image is nv12
when any check in Image::validate method failed then early return

Change-Id: Ib28110ac493f5930ffa99fa7463443e9e7fc8fcf
2018-04-10 11:41:00 +02:00
Mateusz Jablonski 1843b23692 Fix image 2d validation
check image sizes only for image without parent mem object

Change-Id: I73189f1c73653f609c6e4d7dcb7a85d06a2f858a
2018-04-10 09:39:52 +02:00
Mateusz Jablonski ac45ff74ec Fix creating image from image
- allow creating image 2d from non NV12 image 2d
- validate image descriptor and format when create image from image

Change-Id: Ie7887e75f1450fc723dc1d1ae9ff5639d88835fc
2018-04-09 11:29:11 +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
Woloszyn, Wojciech 0ad81024b7 Implement cl_khr_mipmap_image [1/n]
- Add mipmap image handling for clEnqueueReadImage, clEnqueueWriteImage
- Fix mipmap image handling for clCreateImage

Change-Id: I42938a330b55c7e69a16c26dce3ab5d66f8a8938
2018-03-21 10:51:13 +01:00
Dunajski, Bartosz 08c2379f6e Validate region and origin for all image API calls
Change-Id: I28782d8838cf8f5d800f76c922fcb59235f637a1
2018-03-09 08:24:25 +01:00
Dunajski, Bartosz 23c1c4fea6 clEnqueueMapImage origin and region usage fixes
- Return error on origin > 0 or region > 1 when its not allowed
- For 1Darray, array region and origin are stored on 2nd position.
  For 2Darray, its on 3rd postion
- Fix map offset for 1Darray image
- Fix CPU data transfer for 1Darray image

Change-Id: Id35ba5f54f117e7af318ca7e6e03c1fc942ce729
2018-03-08 08:54:48 +01:00
Woloszyn, Wojciech 5c8cd51fc8 Use allocateGraphicsMemoryForImage for mipmaps
Change-Id: I0cd740ca4c8286fb73f766b74abc50ed53cfc9d0
2018-03-01 20:39:15 +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 b4f79e036f Map/unmap enqueue fixes [5/n]: Unify offset calculation
Change-Id: I53eafe89532d43c5cf5139ed3fac0a87619dc7a3
2018-02-21 20:12:52 +01:00
Dunajski, Bartosz e0ca78ccea Map/unmap enqueue fixes [3/n]: Map params inconsistency
- Introducing MapInfo struct which will be used as container for multiple
  map operations
- Unified mapped offset and size for Buffers and Images
- Fixed incorrect map params for CPU and GPU path
- Missing API level checks


Change-Id: Ib4077c9e2c0c333b131ffd5ccbc4a1404920eb5b
2018-02-16 08:28:29 +01:00
Dale Stimson 4e6fe62eb6 Convert FALLTHROUGH comments to C++17 [[fallthrough]] attribute
Use conditionals and a macro to avoid provoking compilers that do
not support this attribute.

Adds a macro named CPP_ATTRIBUTE_FALLTHROUGH which is invoked right
before a following case statement to declare that the intent is to
fall through.  Example:

    ...
    case xxx:
       ...
       CPP_ATTRIBUTE_FALLTHROUGH;
    case yyy:
    ...

The gcc/clang alternative of adding comments that contain "FALLTHROUGH"
suffers from the problem that *by default* ccache strips the comments
so that they are not present for the real compilation.

Change-Id: I77ddeb7dae46db8398b014a93f6a71bedc64ada9
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>
2018-02-14 07:08:00 -08:00
mplewka 94c996a452 Provide hint when create zero copy image
Change-Id: I526a81e0d14daba98574575e8c945214b0bda810
2018-02-14 12:56:04 +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
mplewka 21c1dce943 Enable zero copy for enqueueImage r/w with hints
Change-Id: I6d4379b4bebaca162f859ea790f6a77475f7e94e
2018-02-06 19:00:15 +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
Jacek Danecki 73e2e72d07 waSamplerCacheFlushBetweenRedescribedSurfaceReads fix
Change-Id: Id322f58ce6997c8710ed2d8faf4f3c3f3d2ef0c3
2018-02-01 15:37:18 +01:00
Dunajski, Bartosz 8974af4de8 SNORM formats support
Change-Id: I4138a3e96788aab2a8f3af108dcbfa6f81006bf9
2018-02-01 11:18:01 +01:00