Skip to content

Commit

Permalink
Enabling WDDM_LINUX by default
Browse files Browse the repository at this point in the history
Based on libdxg headers, we're able
to support WDDM_LINUX (WSL2) in our
default build configuration

Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
  • Loading branch information
jchodor authored and Compute-Runtime-Automation committed Jul 14, 2021
1 parent 7581263 commit fad4ee7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
13 changes: 3 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if(WIN32)
set(DISABLE_WDDM_LINUX TRUE)
endif()

if(WIN32 OR NOT DISABLE_WDDM_LINUX)
if(WIN32)
# get WDK location and version to use
if(NOT WDK_DIR)
if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../wdk")
Expand Down Expand Up @@ -100,12 +100,8 @@ if(WIN32 OR NOT DISABLE_WDDM_LINUX)
endif()

if(NOT DISABLE_WDDM_LINUX)
if(NOT EXISTS "${WDK_DIR}/Include/${WindowsTargetPlatformVersion}/shared/d3dkmthk.h")
set(DISABLE_WDDM_LINUX TRUE)
else()
set(D3DKMTHK_INCLUDE_PATHS "${WDK_DIR}/Include/${WindowsTargetPlatformVersion}/shared/")
set(D3DKMTHK_INCLUDE_PATHS_FROM_WDK TRUE)
endif()
get_filename_component(LIBDXG_PATH "${CMAKE_CURRENT_SOURCE_DIR}/third_party/libdxg" ABSOLUTE)
set(D3DKMTHK_INCLUDE_PATHS "${LIBDXG_PATH}/include/")
endif()

if(WIN32)
Expand Down Expand Up @@ -174,9 +170,6 @@ if(WIN32 OR NOT DISABLE_WDDM_LINUX)
add_definitions(-DLEGACY_D3DAPI_VERSION=20)
if(NOT WIN32)
add_definitions(-DWDDM_LINUX=1)
if(NOT D3DKMTHK_INCLUDE_PATHS_FROM_WDK)
add_definitions(-DDXGKDDI_INTERFACE_VERSION_WDDM2_0=1)
endif()
endif()
endif()

Expand Down
1 change: 1 addition & 0 deletions shared/source/memory_manager/residency_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
*/

#pragma once
#include <cstddef>
#include <cstdint>
#include <utility>
#include <vector>
Expand Down
4 changes: 0 additions & 4 deletions shared/source/os_interface/windows/d3dkmthk_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
ScanLineOrdering: \
8; \
int padding
typedef enum _DEVICE_POWER_STATE {
PowerDeviceUnspecified = 0,
} DEVICE_POWER_STATE,
*PDEVICE_POWER_STATE;
#endif
#include <d3dkmthk.h>

Expand Down
4 changes: 0 additions & 4 deletions shared/source/os_interface/windows/windows_wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ LSTATUS APIENTRY RegQueryValueExA(
#endif
#include <x86intrin.h>

typedef int NTSTATUS;
#define STATUS_SUCCESS ((NTSTATUS)0)
#define STATUS_UNSUCCESSFUL ((NTSTATUS)0xC0000001L)
#define STATUS_PENDING ((NTSTATUS)0x00000103L)
#define STATUS_GRAPHICS_NO_VIDEO_MEMORY ((NTSTATUS)0xC01E0100L)

#define PAGE_NOACCESS 0x01
Expand Down

0 comments on commit fad4ee7

Please sign in to comment.