diff mbox

Initial release of AMD Open Source Driver for Vulkan

Message ID CAHbf0-FG9RvkNj_S0yaGfChojL36boWbZU2q7meJjUg2t+ueUw@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Lothian Dec. 22, 2017, 1:48 p.m. UTC
Congratulations on getting this out the door

It didn't compile for me without these changes:

In pal:

     switch (type)
diff mbox

Patch

diff --git a/src/util/math.cpp b/src/util/math.cpp
index 46e9ede..3af4259 100644
--- a/src/util/math.cpp
+++ b/src/util/math.cpp
@@ -54,7 +54,7 @@  static uint32 Float32ToFloatN(float f, const
NBitFloatInfo& info);
 static float FloatNToFloat32(uint32 fBits, const NBitFloatInfo& info);

 // Initialize the descriptors for various N-bit floating point
representations:
-static constexpr NBitFloatInfo Float16Info =
+static NBitFloatInfo Float16Info =
 {
     16,                                                       // numBits
     10,                                                       //
numFracBits
@@ -72,7 +72,7 @@  static constexpr NBitFloatInfo Float16Info =
     (23 - 10),                                                //
fracBitsDiff
 };

-static constexpr NBitFloatInfo Float11Info =
+static NBitFloatInfo Float11Info =
 {
     11,                                                       // numBits
     6,                                                        //
numFracBits
@@ -90,7 +90,7 @@  static constexpr NBitFloatInfo Float11Info =
     23 - 6,                                                   //
fracBitsDiff
 };

-static constexpr NBitFloatInfo Float10Info =
+static NBitFloatInfo Float10Info =
 {
     10,                                                       // numBits
     5,                                                        //
numFracBits

In xgl:

diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt
index 4e4d669..5006184 100644
--- a/icd/CMakeLists.txt
+++ b/icd/CMakeLists.txt
@@ -503,16 +503,16 @@  if (UNIX)

     target_link_libraries(xgl PRIVATE c stdc++ ${CMAKE_DL_LIBS} pthread)

-    if(NOT ICD_USE_GCC)
-        message(WARNING "Intel ICC untested in CMake.")
-        target_link_libraries(xgl PRIVATE -fabi-version=0 -static-intel)
-    endif()
+    #if(NOT ICD_USE_GCC)
+    #    message(WARNING "Intel ICC untested in CMake.")
+    #    target_link_libraries(xgl PRIVATE -fabi-version=0 -static-intel)
+    #endif()

     if(CMAKE_BUILD_TYPE_RELEASE)
         if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
             execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
             if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION
VERSION_EQUAL 5.3)
-                target_link_libraries(xgl PRIVATE -flto=4
-fuse-linker-plugin -Wno-odr)
+                target_link_libraries(xgl PRIVATE -Wno-odr)
                 message(WARNING "LTO enabled for Linking")
             endif()
         endif()
@@ -530,17 +530,17 @@  if (UNIX)

     # CMAKE-TODO: What is whole-archive used for?
     #target_link_libraries(xgl -Wl,--whole-archive ${ICD_LIBS}
-Wl,--no-whole-archive)
-    if(CMAKE_BUILD_TYPE_RELEASE)
-        execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
-        if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL
5.3)
-            target_link_libraries(xgl PRIVATE -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/src/libpal.a -Wl,--no-whole-archive)
-            target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive)
-            target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive)
-            target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/vam/libvam.a -Wl,--no-whole-archive)
-            target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/addrlib/libaddrlib.a -Wl,--no-whole-archive)
-            target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/jemalloc/libjemalloc.a -Wl,--no-whole-archive)
-        endif()
-    endif()
+    #if(CMAKE_BUILD_TYPE_RELEASE)
+    #    execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion
OUTPUT_VARIABLE GCC_VERSION)
+    #    if (GCC_VERSION VERSION_GREATER 5.3 OR GCC_VERSION VERSION_EQUAL
5.3)
+    #        target_link_libraries(xgl PRIVATE -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/src/libpal.a -Wl,--no-whole-archive)
+    #        target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/metrohash/libmetrohash.a -Wl,--no-whole-archive)
+    #        target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/gpuopen/libgpuopen.a -Wl,--no-whole-archive)
+    #        target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/vam/libvam.a -Wl,--no-whole-archive)
+    #        target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/addrlib/libaddrlib.a -Wl,--no-whole-archive)
+    #        target_link_libraries(xgl PUBLIC -Wl,--whole-archive
${PROJECT_BINARY_DIR}/pal/jemalloc/libjemalloc.a -Wl,--no-whole-archive)
+    #    endif()
+    #endif()

     #${ICD_TARGET}.so${SO_VERSION_NUMBER} : ${filter-out -Wl%,$(LLLIBS})


diff --git a/icd/api/llpc/util/llpcDebug.cpp
b/icd/api/llpc/util/llpcDebug.cpp
index 1273cd6..847786e 100644
--- a/icd/api/llpc/util/llpcDebug.cpp
+++ b/icd/api/llpc/util/llpcDebug.cpp
@@ -113,7 +113,7 @@  bool EnableErrs()
 // Translates enum "ResourceMappingNodeType" to string and output to
ostream.
 raw_ostream& operator<<(
     raw_ostream&                       out,   // [out] Output stream
-    enum class ResourceMappingNodeType type)  // Resource map node type
+    enum ResourceMappingNodeType type)  // Resource map node type
 {
     const char* pString = nullptr;