Skip to content

Commit

Permalink
Update XGL from commit: 2f65468
Browse files Browse the repository at this point in the history
* Enable below extensions:
    - AMD_shader_explicit_vertex_parameter
    - AMD_shader_trinary_minmax
    - AMD_mixed_attachment_samples
    - AMD_shader_fragment_mask
    - EXT_queue_family_foreign
* Enable AMD_gpu_shader_int16 for gfx9
* Enable shaderInt64
* Disable extension  AMD_gpu_shader_half_float since the interpolation in FS is not implemented.
* Add arithmetic operations of AMD_shader_ballot
* Implement subgroup arithmetic reduce int ops
* Remove KHR suffixes for promoted extensions: replace some of the KHXs with KHRs, the rest should go away whenever device group KHXs are removed
* Remove Vulkan  1.0 headers because 1.1's are backward compatible, 1.0 driver functionality can still be built with USE_NEXT_SDK=0
* Fix an issue that incorrect buffer causes compute shader loop infinitely
* Disable FmaskBasedMsaaRead for Dota2, which can bring ~1% performance gain for Dota2 4K + best-looking on Fiji:
* Add FMASK shadow table support to LLVM / LLPC
* Fix the issue that Wolfenstein 2 fails to compile compute shader
  • Loading branch information
JacobHeAMD committed Apr 3, 2018
1 parent baf3c1c commit 9e6992f
Show file tree
Hide file tree
Showing 96 changed files with 2,784 additions and 9,175 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ option(ICD_GPUOPEN_DEVMODE_BUILD "Build ${PROJECT_NAME} with GPU Open Developer

option(ICD_MEMTRACK "Turn on memory tracking?" ${CMAKE_BUILD_TYPE_DEBUG})

option(BUILD_WAYLAND_SUPPORT "Build XGL with Wayland support" OFF)

# Option Overrides #################################################################################
# These are options that override XGL subproject options. As these overrides are managed and force
# set by XGL, mark_as_advanced is used to hide them from the CMake GUI.
Expand Down Expand Up @@ -117,13 +115,6 @@ set(PAL_BUILD_VIDEO ${ICD_BUILD_VIDEO} CACHE BOOL "${PROJECT_NAME} override." FO
# LLVM
set(XGL_LLVM_SRC_PATH ${PROJECT_SOURCE_DIR}/../llvm CACHE PATH "Specify the path to the LLVM.")

# Wayland
if (BUILD_WAYLAND_SUPPORT)
set(PAL_BUILD_WAYLAND ON CACHE BOOL "Build PAL with Wayland support" FORCE)
find_package(PkgConfig REQUIRED)
pkg_check_modules(WAYLAND REQUIRED wayland-client)
endif()

### Generator Dependencies #############################################################################################
find_package(PythonInterp 3)
if(NOT PYTHONINTERP_FOUND)
Expand Down Expand Up @@ -190,4 +181,7 @@ if (BUILD_WAYLAND_SUPPORT)
set(PAL_HAVE_WAYLAND_PLATFORM ON)
target_compile_definitions(xgl PRIVATE PAL_HAVE_WAYLAND_PLATFORM=1)
target_compile_definitions(xgl PRIVATE VK_USE_PLATFORM_WAYLAND_KHR)
find_package(PkgConfig REQUIRED)
pkg_check_modules(WAYLAND REQUIRED wayland-client)
target_include_directories ( xgl PUBLIC ${WAYLAND_INCLUDE_DIRS} )
endif()
9 changes: 2 additions & 7 deletions icd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@ endif()
# Configure Vulkan SDK version definitions
if(USE_NEXT_SDK)
set(VULKAN_SDK_VERSION sdk-1.1)
target_compile_definitions(xgl PRIVATE ICD_VULKAN_1_1)
target_compile_definitions(llpc PRIVATE ICD_VULKAN_1_1)
target_compile_definitions(xgl PRIVATE VKI_SDK_1_1=1)
else()
set(VULKAN_SDK_VERSION sdk-1.0)
target_compile_definitions(xgl PRIVATE VKI_SDK_1_0=1)
endif()

# Enable relevant GPUOpen preprocessor definitions
Expand All @@ -122,11 +122,6 @@ endif()
target_compile_definitions(xgl PRIVATE PAL_CLIENT_INTERFACE_MAJOR_VERSION=${PAL_CLIENT_INTERFACE_MAJOR_VERSION})
target_compile_definitions(xgl PRIVATE PAL_CLIENT_INTERFACE_MAJOR_VERSION_SUPPORTS_SHADER_CACHE_EXPECTED_ENTRIES=${PAL_CLIENT_INTERFACE_MAJOR_VERSION})

if (BUILD_WAYLAND_SUPPORT)
target_compile_definitions(xgl PRIVATE VK_USE_PLATFORM_WAYLAND_KHR)
target_include_directories(xgl PUBLIC ${WAYLAND_INCLUDE_DIRS})
endif()

if(UNIX)
target_compile_definitions(xgl PRIVATE VK_USE_PLATFORM_XCB_KHR)
target_compile_definitions(xgl PRIVATE VK_USE_PLATFORM_XLIB_KHR)
Expand Down
98 changes: 68 additions & 30 deletions icd/api/app_profile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,36 +416,62 @@ static char* GetExecutableName(
// Parse profile data to uint32_t
static uint32_t ParseProfileDataToUint32(
const wchar_t* wcharData,
bool isUser3DAreaFormat)
bool isUser3DAreaFormat,
const uint32_t targetAppGpuID = 0u)
{
uint32_t dataValue;
bool haveGoodData = false;
bool haveGoodData = false;

if (isUser3DAreaFormat == true)
{
// The data in user 3D area is in format: "0x0200::2;;".
// On MGPU systems, the data can look like this: "0x0300::2;;0x0400::2;;"
// We need to skip the first part which is GPU ID and take the first number between :: and ;;
const wchar_t* pStart = wcschr(wcharData, L':'); // search pattern "::" forward
const wchar_t* pEnd = wcschr(wcharData, L';'); // search pattern ";;" forward
if ((pStart != nullptr) &&
(pEnd != nullptr) &&
(*(pStart + 1) == L':') &&
((pStart + 2) < pEnd))
const wchar_t* pStart = wcharData;
const wchar_t* pMiddle = wcschr(wcharData, L':'); // search pattern "::" forward
const wchar_t* pEnd = wcschr(wcharData, L';'); // search pattern ";;" forward
bool ignoreGpuID = false;

do
{
constexpr uint32_t stringLen = 50;
wchar_t pParsedVal[stringLen];
pStart += 2; // Move past the first 2 ':' characters
VK_ASSERT(pStart < pEnd); //This should never happen due to above checks.
uint32_t size = static_cast<uint32_t>(pEnd - pStart);
VK_ASSERT(size <= stringLen); // If this happens we will truncate data but not crash.
size = Util::Min(size, stringLen);

wcsncpy(pParsedVal, pStart, size);
pParsedVal[size] = '\0';

dataValue = wcstoul(pParsedVal, NULL, 0);
haveGoodData = true;
}
uint32_t appGpuID = 0u;

if ((pStart != nullptr) &&
(pMiddle != nullptr) &&
(pStart < pMiddle))
{
appGpuID = wcstoul(pStart, NULL, 0);;
}

if (((appGpuID == targetAppGpuID) || ignoreGpuID) &&
(pMiddle != nullptr) &&
(pEnd != nullptr) &&
(*(pMiddle + 1) == L':') &&
((pMiddle + 2) < pEnd))
{
pMiddle += 2; // Move past the first 2 ':' characters
dataValue = wcstoul(pMiddle, NULL, 0);

haveGoodData = true;
}

pStart = pEnd + 2;
pEnd = wcschr(pStart, L';'); // search pattern ";;" forward
pMiddle = wcschr(pStart, L':'); // search pattern "::" forward

if ((pEnd == nullptr) &&
(!haveGoodData) &&
(!ignoreGpuID))
{
// We could not find our target GPU ID, so we will use the data for
// the GPU that was listed first
pStart = wcharData; // point to beginning
pMiddle = wcschr(wcharData, L':'); // search pattern "::" forward from beginning
pEnd = wcschr(wcharData, L';'); // search pattern ";;" forward from beginning
ignoreGpuID = true;
}

} while ((pEnd != nullptr) &&
(!haveGoodData));
}

if (haveGoodData == false)
Expand All @@ -469,20 +495,32 @@ void ProcessProfileEntry(
// Skip if the data is empty
if (dataSize != 0)
{
const wchar_t* wcharData = reinterpret_cast<const wchar_t *>(data);
bool* pBoolSetting = nullptr;
uint32_t* pUint32Setting = nullptr;
bool assertOnZero = false;
bool doNotSetOnZero = false;
const wchar_t* wcharData = reinterpret_cast<const wchar_t *>(data);
bool* pBoolSetting = nullptr;
uint32_t* pUint32Setting = nullptr;
bool assertOnZero = false;
bool doNotSetOnZero = false;
uint32_t appGpuID = 0u;

if (pRuntimeSettings != nullptr)
{
appGpuID = pRuntimeSettings->appGpuID;

if (strcmp(entryName, "TFQ") == 0 && (pRuntimeSettings != nullptr))
{
pUint32Setting = reinterpret_cast<uint32_t*>(&(pRuntimeSettings->vulkanTexFilterQuality));
}

}

if (pBoolSetting != nullptr)
{
uint32_t dataValue = ParseProfileDataToUint32(wcharData, isUser3DAreaFormat);
uint32_t dataValue = ParseProfileDataToUint32(wcharData, isUser3DAreaFormat, appGpuID);
*pBoolSetting = dataValue ? true : false;
}
else if (pUint32Setting != nullptr)
{
uint32_t dataValue = ParseProfileDataToUint32(wcharData, isUser3DAreaFormat);
uint32_t dataValue = ParseProfileDataToUint32(wcharData, isUser3DAreaFormat, appGpuID);
#if DEBUG
if (assertOnZero)
{
Expand Down
69 changes: 0 additions & 69 deletions icd/api/include/khronos/devext/vk_khx_multiview.h

This file was deleted.

Loading

0 comments on commit 9e6992f

Please sign in to comment.