Commit Graph

10134 Commits

Author SHA1 Message Date
Dunajski, Bartosz 80eefc79f3 Fix normalizing factor for SNORM formats
Change-Id: I4febe3a557762b94c0c4445015c948d45a4390d2
2018-02-02 16:10:48 +01:00
Mrozek, Michal 5167e3da69 [1/n] optimize CPU code.
Limit the amount of atomic operations while decrementing ref count from 2 to 1

Change-Id: I0e9e9f07abd1aa62a3967ce4f83ffe2cc288765a
2018-02-02 15:58:37 +01:00
ocldev f13bc4d462 dependencies update
Change-Id: Ifced5941f8cbbd1a8ddda4bbfb0855ad70e9d260
2018-02-02 13:18:00 +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
Mrozek, Michal ac3c032af0 Remove priority hints from not supported extensions.
Change-Id: Ib73c245e2943972bc89c2232812855a402722603
2018-02-02 07:22:24 +01:00
Zdanowicz, Zbigniew 292f8fae90 Use alignedSize for map range and to calculate trim budget
Change-Id: Iceaf5c1d7fd1abfa6bdb08c97a439dba3bbccdf4
2018-02-01 19:20:27 +01:00
Jacek Danecki 73e2e72d07 waSamplerCacheFlushBetweenRedescribedSurfaceReads fix
Change-Id: Id322f58ce6997c8710ed2d8faf4f3c3f3d2ef0c3
2018-02-01 15:37:18 +01:00
Mrozek, Michal e35a066f79 Change the instruction heap size to be at least 512KB.
- Instruction heap is currently heavily used as every kernel copies ISA into
 it.
- It dries out very fast and each change to new heap requires whole pipeline
drain that prevents concurrency
- Problem is even larger when sip kernel is used as it limits the total heap
size
- In order to maximize heap re-use and to limit the count of pipeline drains
this change introduces new minimal size for instruction heap 512 KB.

Change-Id: Ic54e9ef4448b1d35dab01b084ee1d59b509642cb
2018-02-01 13:10:39 +01:00
Dunajski, Bartosz 8974af4de8 SNORM formats support
Change-Id: I4138a3e96788aab2a8f3af108dcbfa6f81006bf9
2018-02-01 11:18:01 +01:00
Brandon Fliflet e719ec4c47 disable dumping of buffers or images by regkey in AUBs
Change-Id: I0dc6cf5a9c4df3e2f2057870045a2f10a4a80720
2018-02-01 09:51:48 +01:00
Dale Stimson a3a21d8168 runtime/mem_obj/image.cpp - Avoid warning from switch case fallthrough
For the new Linux/Fedora configuration with introduction of gcc 7.2,
option -Wimplicit-fallthrough is implemented.  This option requests a
warning if a switch case falls through into the next case.  This was
causing build errors.

For C++17 (and g++ 7 regardless), standard attribute [[fallthrough]]
notifies the compiler that the fallthrough is intentional.
For clang++ 5 (with -std=c++11 or later) and g++ 7, built-in
preprocessor function __has_cpp_attribute(fallthrough) returns true.
Currently, msvc does not have __has_cpp_attribute.

Note: The use of __has_cpp_attribute has been proposed for c++2x and
is advocated by (81-char link broken in two to avoid 80 char hard limit):
    https://isocpp.org/std/standing-documents/
    sd-6-sg10-feature-test-recommendations

For gcc 7, a comment consisting of "FALLTHROUGH" will accomplish the
same thing with -Wimplicit-fallthrough=<n>, for n <= 4.

The diagnostic:

/opt/src/src/vpg-compute-neo/runtime/mem_obj/image.cpp:146:24: error:
this statement may fall through [-Werror=implicit-fallthrough=]
             imageDepth = imageDesc->image_depth;
             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/opt/src/src/vpg-compute-neo/runtime/mem_obj/image.cpp:148:9: note: here
         case CL_MEM_OBJECT_IMAGE2D:
         ^~~~

Change-Id: I604700a23b09c8bf22baf5614700a8b76dbe4cdd
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>
2018-01-31 12:06:30 -08:00
Zdanowicz, Zbigniew bf270c4643 Use reserved memory to map GPU VA when cpu memory doesnt meet restrictions
Change-Id: I9f255a3f2ce6b1c22110e7da6e90c013f1f598e6
2018-01-31 18:05:11 +01:00
Mrozek, Michal 37c7e27276 Fix heap size programming.
- In various scenarios code was not programming the max heap size correctly
- It was possible for SSH to overcome the limit
- Size was programmed smaller then it really was, which resulted in smaller
reuse, which led to SBA reprogramming which led to lower performance in ooq
scenarios
- This change fixes the heap size programming by always utilizing full
allocation size and always limiting SSH at proper value

Change-Id: Ib703d2b0709ed8227a293def3a454bf1bb516dfd
2018-01-31 17:35:32 +01:00
Mateusz Jablonski 285ecbd9cb Add method to append gen specific surface state params
Add method to check if image format has alpha channel

Change-Id: I138f766c17654917b0357b1ec2250a8489738bef
2018-01-31 17:18:41 +01:00
Mateusz Jablonski 1d135a6a03 Fix calculating required cmd size
Change-Id: I3b409ca5eacc20f068b66df1fec5502dac41763d
2018-01-31 14:58:39 +01:00
Mrozek, Michal 9f048c8ce7 Add flag -fpreserve-vec3-type to internal options.
This flags informs compiler to not promote vec3 to vec4.

Change-Id: I98d04954ccf07c625c64831087adf1d5abd38bf5
2018-01-31 12:36:24 +01:00
Mateusz Jablonski 4aaa726758 Add method to add gen specific sampler state params
Change-Id: I6ea3747deabc9bc2aca38dce1ddfcca5158b9f41
2018-01-31 08:44:00 +01:00
Dale Stimson 5f98d9f9ff Add braces to avoid ambiguous 'else'
For the new Linux/Fedora configuration with introduction of gcc 7.2,
compilation of this file issues a new warning due to the correct
diagnosis of an ambiguous 'else'.  As warnings are being treated as
errors, this aborts the build.

The diagnostic:
    vpg-compute-neo/unit_tests/elflib/elflib_tests.cpp:123:12:
    error: suggest explicit braces to avoid ambiguous 'else'
    [-Werror=dangling-else]
	     if (nonfailingAllocation == failureIndex)
		^

Diagnosis: The diagnostic suggested that this:
    if (nonfailingAllocation == failureIndex)
	ASSERT_NE(nullptr, pWriter);
should be changed to:
    if (nonfailingAllocation == failureIndex) {
	ASSERT_NE(nullptr, pWriter);
    }

This is a valid suggestion.  The same is true for EXPECT_EQ.

Pick the files in repository
ssh://gerrit-gfx.intel.com:29418/mirrors/github/google/googletest
for tracing the definition. (There are many versions of gtest.h under
the ufo tree).

Starting in file include/gtest/gtest.h, the definition of ASSERT_NE can
be traced back towards its origin as follows:

ASSERT_NE               include/gtest/gtest.h
GTEST_ASSERT_NE         include/gtest/gtest.h
ASSERT_PRED_FORMAT2     include/gtest/gtest_pred_impl.h
GTEST_PRED_FORMAT2_     include/gtest/gtest_pred_impl.h
GTEST_ASSERT_           include/gtest/gtest_pred_impl.h

where GTEST_ASSERT_ indeed *should* be enclosed in braces.

  GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
  if (const ::testing::AssertionResult gtest_ar = (expression)) \
    ; \
  else \
    on_failure(gtest_ar.failure_message())

The correct fix would be to place the braces in the macro definition.
However, as file gtest.h comes from Google, and as there are 37
different versions of it in the source tree, this workaround will
address the macro invocations.  Should it be desirable, it is left
to others to correct gtest.h and friends.

Change-Id: I870d38ba623fc7564f894c7b1ea7512b74244ee2
Signed-off-by: Dale Stimson <dale.b.stimson@intel.com>
2018-01-30 18:23:41 +01:00
Mrozek, Michal e6603a56f4 Create sip kernel when device is created
- This moves expensive sip kernel creation outside of enqueueNDRangeKernel

Change-Id: I4d09df46d993fa8f751468ed3adcff056e05ce13
2018-01-30 16:49:01 +01:00
ocldev aa171ea2f6 dependencies update
Change-Id: Ic0baa91b8e6a223fbdbc9243ebe7c5eb9f5a5661
2018-01-30 10:37:27 +01:00
Milczarek, Slawomir 7c038eb7a4 Add AUB generation in parallel to execution on GPU
This commit adds basic for parallel AUB generation and execution on GPU.

Change-Id: I3c77557a9578db05c87be6db7a5e3006f7c4b053
2018-01-29 17:24:26 +01:00
Dunajski, Bartosz 6ab39150e0 clGetDeviceIDsFromVA_APIMediaAdapterINTEL support
Change-Id: I3d43f00795c36562585bee7b4ee96123389586c7
2018-01-29 13:57:05 +01:00
Zdanowicz, Zbigniew f5513b6a1d Handle host pointer not meeting memory manager criteria
Change-Id: I65eec6083f1d8bb7b5f46e1a2e015aa6fd7f3d9f
2018-01-29 11:40:32 +01:00
Zdanowicz, Zbigniew e42d43953d Restrict system memory allocations to certain address range
Change-Id: Ibe8c1183368ce48f2c820d0f1a71f0b15703ffcd
2018-01-26 15:16:41 +01:00
Dunajski, Bartosz 3532c6373f D3D sharable 2D texture: Map Aux GpuVa and set renderCompressed if possible
Change-Id: I508965d07f456af74ecef6e980337f42f5967b43
2018-01-26 08:38:59 +01:00
Zdanowicz, Zbigniew 4ad96b75f5 Make base class for gmm_memory
Change-Id: I307f616be27d5fed126f0e36bff0d182ab7a8b53
2018-01-26 08:35:41 +01:00
mplewka 377fc8d20b Enable zero copy for enqueueReadBufferRect with hint
Change-Id: I4e7d89edfcff2674e7c163d70ad974d3464bf64f
2018-01-25 13:17:59 +01:00
mplewka 251de14ee6 Enable zero copy for enqueueWriteBufferRect with hint
Change-Id: I411f00b98056307906c02d34e793cefe460735ba
2018-01-25 11:48:10 +01:00
Dunajski, Bartosz f3f53ed14b Missing UnifiedAuxSurface check in MCS scenarios
Change-Id: I3b53ddea21997604481ece554cd24a6809523ab8
2018-01-25 10:25:12 +01:00
Mrozek, Michal 6b368803fc Add support for legacy kernel MOCS selection.
- Detect if driver is operating on patched legacy kernel.
- If turbo patch is detected, assume legacy custom kernel.
- Add simplified MOCS selection logic to GMM helper

Change-Id: I1ae821336205e473f00d72ddbfebee828427dfc7
2018-01-25 09:10:04 +01:00
Zdunowski, Piotr 0b6b12ea57 Globally enable priority hints extension.
Change-Id: I9f3b8d3cf1bedb41d9e0622ff514bf76b4518d8c
2018-01-24 20:07:31 +01:00
hjnapiat 5b0ebe25d5 Add support for GT-Pin Callbacks [2/n]
Change-Id: Ibdb76361be2a0e48888b46e9ed6dfe6b0ed49862
2018-01-24 16:25:02 +01:00
Mateusz Jablonski 9477f03f34 Program media sampler
Remove not needed includes in unit_tests/libult/genX.cpp files

Change-Id: Iac9957d0b148f80ba9432cabb881c3560d77702f
2018-01-24 15:57:51 +01:00
Mrozek, Michal 274c8084a3 For devices with small HW thread count, limit the available pool of LWS.
Change-Id: Ib3c0fea3e0422dae3bc93b891aab087ad597776e
2018-01-24 14:30:39 +01:00
Dunajski, Bartosz 5bee3c3312 Program CCS Aux params even if MCS allocation is available
Change-Id: I9ae5c1685fa9913e93a7660120da97ba777add31
2018-01-24 11:03:11 +01:00
Zdanowicz, Zbigniew 8c43b674ff Create all GPU bound allocations using memory manager
Change-Id: I2e88b8ee7c3a2b4e2c3fc2c887bfcb68e35ef539
2018-01-23 16:11:15 +01:00
Mateusz Jablonski 8d68788807 Remove not used files
Change-Id: I3c232d09023b7a327a5857c46fb9dfdbe63cdb6e
2018-01-23 12:47:20 +01:00
Pawel Wilma 369dcff34a Rename build type Release-Internal to ReleaseInternal
Change-Id: I2ec03a046ad84a571067230a011e38526bc8fdaa
2018-01-22 15:02:59 +01:00
mplewka 2c2bbbcdbb Add support for zero-copy r/w buffer
Change-Id: Ie9f3f2211d107eb338bd97692d36e9c7d7a0feab
2018-01-22 09:40:51 +01:00
ocldev 79e4b2c104 dependencies update
Change-Id: Ibdb61a83f11c32a26a9aa3680c55b9eeaaa30082
2018-01-19 14:56:29 +01:00
kkasper b08de2733e Fix status returned by clSetKernelArg.
- In case of mismatched access qualifiers it would return
  CL_INVALID_KERNEL_ARGS. This is not correct, CL_INVALID_ARG_VALUE
  should be returned instead.

Change-Id: I0dc929e22269b4e34e347502c6cc4067e67ba165
2018-01-19 13:38:52 +01:00
Mrozek, Michal 0066daf495 Add support for deletion of allocations that may be in use by GPU.
- fix deletion of constant program surface
- fix deletion of global program surface
- move program_data tests to shared code
- make program_data tests SKU agnostic

Change-Id: Icf3e9fd035416072699336c4f86e49703ef48cc5
2018-01-19 12:34:49 +01:00
hjnapiat d91d01fedd Fix initialization of GT-Pin helpers
Change-Id: I20556d62f9914cd73d9d9da0678a051549d9f1b4
2018-01-19 11:00:58 +01:00
Mrozek, Michal 292d6c9bed Do not force stateless when m32 flag is passed.
Change-Id: I1915ffc82c35aa9ffe3fd4b108f717318fd1a67c
2018-01-19 07:57:35 +01:00
Mrozek, Michal c6233e1d06 Add support for deferred deletion of private surface.
- If it is in use add it to temporary allocation list
- If it is not in use destroy in place

Change-Id: I6304d1a3b641243f3f7eadff8e38d8515b132f68
2018-01-18 19:53:24 +01:00
Milczarek, Slawomir 3e84c4df7a Introduced a new graphics allocation type of ALLOCATION_TYPE_NON_AUB_WRITABLE.
This commit moves the allocation's aubfile write permission property
from OS agnostic MemoryAllocation to general GraphicsAllocation class.

Change-Id: I82ca2716d6b65d314460bd9f5d33e1113f9d7c07
2018-01-18 18:36:14 +01:00
Mateusz Jablonski 7c9378e973 Cleanup after changing pipeline select programing
Change-Id: I746b80b2537aa111d8e010749614c9debc0c89b5
2018-01-18 15:06:32 +01:00
Dunajski, Bartosz 8b9713582a Aux programming fixes + ULT improvements
- Dont program clear color aux params for multisampled images (depth or MCS)
- Mock Gmm PageTable manager default actions
- Local Wddm for WddmCsr tests to make expects on creation
- Set Gmm PageTable manager for Wddm Memory Manager tests without WddmCsr

Change-Id: I8ccfddb06340bc81184e07eff5a7078756d28571
2018-01-18 14:40:56 +01:00
Mateusz Jablonski 13ac81f465 Change pipeline select programing
- Program one PS with gpgpu selection and media sampler
- Program PS only when media sampler requirement changed
  or when preamble was not sent

Change-Id: I85ba3f74087733e79d048e120aeb8b4b04796e00
2018-01-18 14:39:47 +01:00
Mrozek, Michal ae1213a98d Fix use after free problem.
- freeGraphicsMemory checks for command stream receiver in device and
uses it if it is present.

Change-Id: I8e3f2202dc694bd8903b04780e550dc1fd115ef4
2018-01-18 12:04:46 +01:00