Commit Graph

435 Commits

Author SHA1 Message Date
Mrozek, Michal 8d2df3c332 Move indirect heaps from command queues to csr.
-This is required to enable N:1 submission model.
-If heaps are coming from different command queues that always
mean that STATE_BASE_ADDRESS needs to be reloaded
-In order to not emit any non pipelined state in CSR, this change
moves the ownership of IndirectHeap to one centralized place which is
CommandStreamReceiver
-This way when there are submissions from multiple command queues then
they reuse the same heaps, therefore preventing SBA reload

Change-Id: I5caf5dc5cb05d7a2d8766883d9bc51c29062e980
2018-04-26 14:05:40 +02:00
Pawel Wilma a0c044e6d2 Extend batch buffer flattening in AubCSR to BatchedDispatch mode
- batch buffer flatening in batched mode
    - added MI_USER_INTERRUPT command
    - added GUC Work Queue Item

Change-Id: I35142da34b30d3006bb4ffc1521db7f6ebe68ebc
2018-04-26 12:45:02 +02:00
Mateusz Jablonski 31157573ca Fix ult execution: change dir after getting run path
Change-Id: If2b9d07809004bfb4edbc4b4c50762226a98d2e9
2018-04-26 11:22:59 +02:00
Artur Harasimiuk 5fbdad88c6 refactor config.h usage
- add defines to command line
- remove most occurences of include "config.h"

Change-Id: I19d65d83c895fc6143d319d057a50e5ae3e78830
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-26 10:02:15 +02:00
Woloszyn, Wojciech c0a84cad85 use validateObject function for memObjs in win api
Change-Id: I1b54096b5a6fdb43a38c25a37560e88218671bd2
2018-04-25 15:58:47 +02:00
Mateusz Jablonski 180de340d8 Define variable with binary name suffix
use this variable in tests as it is set once in main.cpp
create function to get binary kernel filename

Change-Id: Ibf7b4c2d390caefda4a5d7fc4667006e7f2edde8
2018-04-25 15:34:34 +02:00
Zdunowski, Piotr 103fe670bd Add gen specific suffix to test files.
Change-Id: I7ee2fb6d1c2592e1aa0c2645f83526dbcfe521f1
2018-04-25 15:28:44 +02:00
Dunajski, Bartosz 1d36206bb7 Remove obsolete methods form LinearStream
Change-Id: Id87dd58d9a373cf5d3f217e9ecc8db8a79b25190
2018-04-25 11:40:47 +02:00
Dunajski, Bartosz ace0fcfb83 Improve commands size expectations in flush task tests
Change-Id: I45c40a21ef0f4a789da4be29ec00d40abe19e589
2018-04-24 22:20:51 +02:00
Artur Harasimiuk ef5bd7ec5b refactor HwTS and HWPerf tag allocators
- use full type specification and remove casts in MemoryManager
- remove TagAllocatorBase not used any more
- make TagAllocator to be profiling/instrumentation agnostic
- unify UnlimitedTagCount and make part of TagAllocator

Change-Id: I7b5b1ed83aa5e1f0839f611db0530d7e062a3c25
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-24 22:12:10 +02:00
Jobczyk, Lukasz 09401632b7 Additional KBL device ID
Change-Id: Ibc917b98030254b15709a8d427931171fbc1117f
2018-04-24 11:50:43 +02:00
Zdunowski, Piotr e01d268aca Program null surface for stateful buffers.
Change-Id: I4c73dcf3902ac6ad422ffab16f41aa342cf736fd
2018-04-23 13:43:22 +02:00
Hoppe, Mateusz efda64eb4a Source Level Debugger - debugger library interface
- interface to debugger dynamic library
- code is included when source level debugger header exists,
otherwise implementation is exluded from build
- unit tests do not load real dynamic library,
instead test version (DebbugerLibrary) of OsLibrary is used.

Change-Id: Id3229c77963352e8001043ee41b7d48c6b180a59
2018-04-23 11:31:37 +02:00
Maciej Dziuban 1392b79b58 L3 programming refactor 1/n
- Clean up size estimation functions
- Make some tests gen specific

Change-Id: If9c15f311306282ba035b380e6d4cadc17584815
2018-04-20 22:34:35 +02:00
Woloszyn, Wojciech 640c956959 correct tests naming in d3d9 tests
Change-Id: Ib4fb6f34cba649bc57d19d9f5a30415d8622e43e
2018-04-20 12:30:42 +02:00
Mrozek, Michal ce8c44cae3 Add check for local work group size in clEnqueueNDRangeKernel call.
- Incoming local work group size cannot exceed device capabilities.

Change-Id: I89a7503155c71443e3ebc630debb5d5b466c6cb5
2018-04-20 08:16:16 +02:00
Dunajski, Bartosz 5ed13d7c88 KMD Notfy: Multiply timeout by taskCount diff only on Linux
Change-Id: Idb75dcc02cd218ff097f29d6881c97bb8feb25da
2018-04-19 22:28:06 +02:00
Woloszyn, Wojciech 6eec23844b fix nullptr dereference issues in windows api
Change-Id: I6209892f8c0ea96426c28d7977d20c234d3cd81d
2018-04-19 21:55:40 +02:00
Chodor, Jaroslaw 9b0820d6de Fixing potential buffer overflow in simple_sprintf
Change-Id: I67d92073d05049740b4a1bf9783fe8dede7c3c0a
2018-04-19 21:48:34 +02:00
Hoppe, Mateusz 83160213f0 Fix problems in thkWrapper and SharingHandler
- ThkWrapper had uninitialized mFunc member, setting it
to nullptr

- D3DSurface could dereference null image pointer,
adding validateUpdateData method in SharingHandler
that may return CL_INVALID_MEM_OBJECT if memObject is invalid

Change-Id: Iaa4499bcea47baca156c9d28be4c93ba4f0e1ebb
2018-04-19 15:04:38 +02:00
Artur Harasimiuk 75d497a9a9 separate BuiltinDispatchInfoBuilder from built_ins.h
We don't need BuiltinDispatchInfoBuilder in every place where built ins
are used. specifically in .cpp files generated from kernel binary.

Change-Id: Ie739951cdc93873993f78ad14cee656122af51fd
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-19 12:32:13 +02:00
Mrozek, Michal 5bae27ae51 Fix a bug in Graphics Allocations constructors.
- There was a wrong cast in Graphics Allocation constructor resulting
in wrong GPU address generation in some sporadic scenarios.
- Problem appears in 32 bit applications where void* address is cast to
uint64_t value, if c style cast is used it makes trailing bit to be
populated to higher bits constructing wrong value

0xf000000 is being casted to 0xfffffffff0000000 while it should be casted to
0x00000000f0000000
- added special cast function for further use.

Change-Id: I56d53a8e13e17cbacd127566442eea3f6a089977
2018-04-19 09:45:03 +02:00
Mrozek, Michal d900bdffc6 [33/n] Internal 4GB allocator.
- Move indirect heap to internal allocator domain.
- Add logic in getIndirectHeap to allocate with proper API depending on
heap type
- Add State base Address programming, reflecting that now Indirect Object
Heap is placed in 4GB domain.
- For AddPatchInfoCommentsForAUBDump mode , keep all heaps in non 4GB mode.

Change-Id: I6862f6a249e444d0d6cfe7e499a10d43f284553e
2018-04-19 08:13:48 +02:00
Hoppe, Mateusz 81362d5b7d Source Level Debugger: add generating debug data in cloc
- generate debug data to .dbg file in cloc
- generate debug kernel for ults with "-g" option
in addition to "-cl-kernel-debug-enable"
- append "-g" option for compilation and build of
programs with kernel debugging enabled to make
compiler generate debug data

Change-Id: I09401f84be6e09da167194a44d1b9a7f2bfb622d
2018-04-18 17:14:15 +02:00
Mateusz Jablonski 350e5fa684 Correct error value when setting invalid kernel arg
Change-Id: I9719e7ea7b4cf39fae57996528dd56595ee9bfcc
2018-04-18 12:53:04 +02:00
Stefanowski, Adam 249b96b035 Tests for default PreambleHelper methods
Change-Id: Id1c1a0dc5de463d37f8fe9e5f7ae1c4bcb3ec057
2018-04-18 09:55:14 +02:00
Mrozek, Michal 59df78cc18 [32/n] Internal 4GB allacator.
- Ensure that heaps passed as IndirectHeap to flushTask

Change-Id: Ib633e3d3027e142a1fdb51e78b970fb1bd1b9b0c
2018-04-18 08:49:08 +02:00
Koska, Andrzej 9dda0ed149 Checking if the PrivateSurface Size exceeds UINT32_MAX
Change-Id: I75598d7b4bdbfe1648b7f03fd0878ed51824221b
2018-04-17 16:05:19 +02:00
Artur Harasimiuk b42e19110b more ULTs cleanup
- removing not used BuiltInsFixture

Change-Id: Iba35db629d155522070a143da26ee2ac44fc9568
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-17 10:25:12 +02:00
Mrozek, Michal 1660f904dc [31/n] Internal 4GB allocator.
- Add Indirect Heap function that will be used to program State Base Address.
- This is to allow indirect heaps to work in 2 modes, either heap will service
as whole indirect allocation OR offsets in 4GB space will be used.

Change-Id: Ic4ca1e907c1b30d2f98dc39e8ab945ce35ed6ad0
2018-04-17 09:42:25 +02:00
Mrozek, Michal 6299388b71 [30/n] Internal 4GB allocator.
- Add support for patching indirect state with internal heaps.

Change-Id: Ib5748beb462be1786134a0a81bb649dd279816ec
2018-04-17 09:22:15 +02:00
Mrozek, Michal 8583c68c8c [29/n] Internal 4GB allocator.
- Internal allocations may now coexists with non internal on reusable list.
- Caller now specifies if internal allocation is needed.
- If criteria are not met , then allocation is not returned.

Change-Id: I7da3a4f944768b7c8a873e44fd47248f1d76bf9e
2018-04-17 06:42:56 +02:00
Mrozek, Michal 87b8b6e261 [28/n] Internal 4GB allocator.
Avoid default parameter to getIndirectHeap.

Change-Id: I105ceaa4b5e9b23ce8dc96631410b9535e5a44e0
2018-04-16 17:56:49 +02:00
mplewka aa784e6cdd Disabling preemption for real in preamble test which expect that
Change-Id: I0766651d754eab5a208ccd46aa492156491961b8
2018-04-16 17:15:24 +02:00
Mrozek, Michal cb06fad983 [27/n] Internal 4GB allocator.
- Allow indirect heap to work in 2 modes:
first mode is when it will be used as an allocation from 4GB allocator.
In such scenario driver will return offset from base of the allocator region.
Second mode is the legacy mode which will be used by device enqueue, this
will results in heap CPU base address being programmed in State Base Address
commands and during programming heap offset base of 0 will be returned.

Change-Id: Ica098f3278b6b6ed5036b4c5ab7461dc61d8ee86
2018-04-16 16:45:30 +02:00
Zdanowicz, Zbigniew e7ab0b2d33 Add KMD/GMM FtrWddm2_1_64kbPages flag
Change-Id: Ife5f759db8e999ab765c6fd19b52940839703803
2018-04-16 16:23:40 +02:00
Artur Harasimiuk cb064abb04 fix mapImage for 1D_ARRAY
There are differences in qPitch programming between Gen8 vs Gen9+
devices and this requires special operation when image is zero-copy.

For Gen8 qPitch is distance in rows while Gen9+ it is in pixels.
Minimum value of qPitch is 4 and this causes slicePitch = 4*rowPitch on
Gen8.

To allow zero-copy we have to tell what is correct value rowPitch which
should equal to slicePitch.

Change-Id: I58dea004e3c7f9f4dfabd154d02749c15b6b0246
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 16:13:51 +02:00
Hoppe, Mateusz 87f0dcda36 Source Level Debugger - add MI_LOAD_REG debug cmds
- add 2 MI_LOAD_REGISTER_IMM cmds in preamble when debugger
is active

Change-Id: I4dd46a3c01fc95feadf8a12728ce801efe506e05
2018-04-16 13:33:12 +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
Artur Harasimiuk a129fc62ba enqueueMapImage tests cleanup
- remove unsused fixture BuiltIns fixture
- sort includes

Change-Id: Ieb09f4188eb1f250e30248c58db1f372a6ba5aaf
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-16 09:53:13 +02:00
Hoppe, Mateusz e898b9e218 Source Level Debugger: SIP programming in preamble
- program SIP_STATE when either MidThread preemption is enabled
or kernel debugging is active
- device creates correct sip based on preemption mode and
active kernel debugging

Change-Id: I3e43b66ad00d24c2389fa4fc766dd47044b6af80
2018-04-13 14:40:08 +02:00
Koska, Andrzej b0a6d9131a Making DSH and IOH always resident
Change-Id: Ib114b92cb5ee153f213c15c935f8f1d1cfeb46eb
2018-04-13 12:35:15 +02:00
Chodor, Jaroslaw d516cd6edc Don't expose mipmaps on 1.2 devices
Change-Id: Id7949266f29ef06ae71c88725298822055ca7c13
2018-04-13 11:22:33 +02:00
Jacek Danecki 1504d89571 switch to libva 2.x
- support for libva 1.x has been dropped

Change-Id: Ie5361b98cdd36144c9cd2a413c5fc2871655f333
2018-04-13 11:16:33 +02:00
Mrozek, Michal c911e249f4 Update internal
Change-Id: I8f3ddadf54517d3a06eea6fe66a418f4f29b3d8c
2018-04-13 09:59:16 +02:00
Mrozek, Michal a6459b0496 Add test for GET_DEVICE_VERSION + clGetDeviceInfo.
Change-Id: I3894552237bb1c56efcd4da651c9b9be71980cc0
2018-04-13 07:06:59 +02:00
Dunajski, Bartosz f40dc29ea1 Dont change multisampled surface state storage for R32_FLOAT_X8X24 type
Change-Id: I5e386057e4368e0d80bed496f2ddc19b5ae271a5
2018-04-12 15:47:46 +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
Artur Harasimiuk 97fb72a9a4 fix dependencies for elflib and tbx unit tests
these tests should be executed after unit_tests target is complete to
ensure everything is ready in environment and to avoid sporadic failures

Change-Id: Ib9f9fdb9f4135441d17761c8dbee0868f1be404b
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
2018-04-12 12:51:12 +02:00
Jacek Danecki e43c345e07 sharing: add context tests
Change-Id: I1dc504f6931ab0ae5645e9460ae0c0284704404c
2018-04-12 11:26:58 +02:00