Commit Graph

6 Commits

Author SHA1 Message Date
Dunajski, Bartosz 8974af4de8 SNORM formats support
Change-Id: I4138a3e96788aab2a8f3af108dcbfa6f81006bf9
2018-02-01 11:18:01 +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
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
Dunajski, Bartosz a9a24e82e5 Prefer render compression for tiled images
Change-Id: I1ae1cf9a5cfdc54ab4d889456e252cd1f9860883
2018-01-17 15:18:47 +01:00
Dunajski, Bartosz c939419ccc preferRenderCompression flag for GMM resources creation
Change-Id: I718fa21d0feb825e0a3215408c78fa49d094a15f
2018-01-12 11:01:57 +01:00
Brandon Fliflet 7e9ad41290 Initial commit
Change-Id: I4bf1707bd3dfeadf2c17b0a7daff372b1925ebbd
2017-12-21 00:45:38 +01:00