Add Xbox One/Series X|S port (#526)
* chore: update README.md * ✨ feat: got the audio working * 🔧 feat: add appxmanifest * 🩹 fix: remove opengl stuff * ⚗️ feat: add button support * ⚗️ chore: try to make less modification from upstream * 🩹 fix: doesnt compile * ✨ feat: forcibly draw cursor and map right joystick to cursor * 🩹 fix: remap joystick * 🎨 fix: formatting * 🎨 fix: cmakelists formatting * 🩹 fix: 3ds build * 👷 feat: add xbox one ci build * 💚 fix: github hates xbox series naming * 💚 fix: dont run cpack for xbox one, vs does that for you * 💚 fix: xbox one need to use vs as generator * 💚 fix: please * 💚 fix: it could be msix not bundle * 💚 fix: try recursive directory search when upload release * 🔨 feat: support cpack * 👷 feat: better packaging * 💚 fix: ignore if mv fails * 🔧 feat: add mouse sensitivity config * 🔥 chore: dont need you * ⚗️ chore: use d3d11 * ✨ feat: hardware acceleration!! * 🚸 chore: change default cd path so user can easily copy the assets to xbox * 🧑💻 chore: improve reusability * 🚨 fix: formatting error * 🚸 chore: draw cursor by default * 🎨 chore: cmakelists formatting * chore: match with upstream * chore: more matching with upstream * chore: don't need you * 🩹 fix: apply changes * 🔥 fix: we don't need controller map anymore * 🩹 fix: use isle style include guard * 🩹 fix: last newline fix * 👷 chore: use cpack * 💚 fix: try to fix ci * 💚 fix: i tried my best...
23
.github/workflows/ci.yml
vendored
@ -34,15 +34,16 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, linux: true, werror: true, clang-tidy: true }
|
||||
- { name: 'MSVC (x86)', os: 'windows-latest', dx5: true, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' }
|
||||
- { name: 'MSVC (x64)', os: 'windows-latest', dx5: false, config: true, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' }
|
||||
- { name: 'MSVC (arm64)', os: 'windows-latest', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' }
|
||||
- { name: 'msys2 mingw32', os: 'windows-latest', dx5: false, config: false, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' }
|
||||
- { name: 'msys2 mingw64', os: 'windows-latest', dx5: false, config: true, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' }
|
||||
- { name: 'macOS', os: 'macos-latest', dx5: false, config: true, brew: true, werror: true, clang-tidy: false }
|
||||
- { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
||||
- { name: 'Nintendo 3DS', os: 'ubuntu-latest', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' }
|
||||
- { name: 'Linux', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: true, linux: true, werror: true, clang-tidy: true }
|
||||
- { name: 'MSVC (x86)', os: 'windows-latest', generator: 'Ninja', dx5: true, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' }
|
||||
- { name: 'MSVC (x64)', os: 'windows-latest', generator: 'Ninja', dx5: false, config: true, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' }
|
||||
- { name: 'MSVC (arm64)', os: 'windows-latest', generator: 'Ninja', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' }
|
||||
- { name: 'msys2 mingw32', os: 'windows-latest', generator: 'Ninja', dx5: false, config: false, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' }
|
||||
- { name: 'msys2 mingw64', os: 'windows-latest', generator: 'Ninja', dx5: false, config: true, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' }
|
||||
- { name: 'macOS', os: 'macos-latest', generator: 'Ninja', dx5: false, config: true, brew: true, werror: true, clang-tidy: false }
|
||||
- { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' }
|
||||
- { name: 'Nintendo 3DS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' }
|
||||
- { name: 'Xbox One', os: 'windows-latest', generator: 'Visual Studio 17 2022', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64', cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0', xbox-one: true}
|
||||
steps:
|
||||
- name: Setup vcvars
|
||||
if: ${{ !!matrix.msvc }}
|
||||
@ -95,7 +96,7 @@ jobs:
|
||||
|
||||
- name: Configure (CMake)
|
||||
run: |
|
||||
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \
|
||||
${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -G "${{ matrix.generator }}" \
|
||||
${{ matrix.cmake-args || '' }} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DISLE_USE_DX5=${{ !!matrix.dx5 }} \
|
||||
@ -106,7 +107,7 @@ jobs:
|
||||
-Werror=dev
|
||||
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build --verbose
|
||||
run: cmake --build build --verbose --config Release
|
||||
|
||||
- name: Package (CPack)
|
||||
if: ${{ !matrix.n3ds }}
|
||||
|
||||
137
CMakeLists.txt
@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.25...4.0 FATAL_ERROR)
|
||||
|
||||
project(isle LANGUAGES CXX C VERSION 0.1)
|
||||
|
||||
if (WINDOWS_STORE)
|
||||
add_compile_definitions(WINDOWS_STORE)
|
||||
endif()
|
||||
|
||||
if (EMSCRIPTEN)
|
||||
add_compile_options(-pthread)
|
||||
add_link_options(-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=2gb -sUSE_PTHREADS=1 -sPROXY_TO_PTHREAD=1 -sOFFSCREENCANVAS_SUPPORT=1 -sPTHREAD_POOL_SIZE_STRICT=0 -sFORCE_FILESYSTEM=1 -sWASMFS=1 -sEXIT_RUNTIME=1)
|
||||
@ -38,7 +42,7 @@ option(ISLE_WERROR "Treat warnings as errors" OFF)
|
||||
option(ISLE_DEBUG "Enable imgui debug" ON)
|
||||
cmake_dependent_option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" "${NOT_MINGW}" "WIN32;CMAKE_SIZEOF_VOID_P EQUAL 4" OFF)
|
||||
cmake_dependent_option(ISLE_MINIWIN "Use miniwin" ON "NOT ISLE_USE_DX5" OFF)
|
||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN;NOT NINTENDO_3DS" OFF)
|
||||
cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "MSVC OR ISLE_MINIWIN;NOT NINTENDO_3DS;NOT WINDOWS_STORE" OFF)
|
||||
cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROSS_BIN;TARGET Python3::Interpreter" OFF)
|
||||
option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON)
|
||||
option(ENABLE_CLANG_TIDY "Enable clang-tidy")
|
||||
@ -57,44 +61,53 @@ message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}")
|
||||
add_library(Isle::iniparser INTERFACE IMPORTED)
|
||||
|
||||
if (DOWNLOAD_DEPENDENCIES)
|
||||
# FetchContent downloads and configures dependencies
|
||||
message(STATUS "Fetching SDL3 and iniparser. This might take a while...")
|
||||
include(FetchContent)
|
||||
# FetchContent downloads and configures dependencies
|
||||
message(STATUS "Fetching SDL3 and iniparser. This might take a while...")
|
||||
include(FetchContent)
|
||||
if (WINDOWS_STORE)
|
||||
FetchContent_Declare(
|
||||
SDL3
|
||||
GIT_REPOSITORY "https://github.com/Helloyunho/SDL3-uwp.git"
|
||||
GIT_TAG "main"
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
else()
|
||||
FetchContent_Declare(
|
||||
SDL3
|
||||
GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git"
|
||||
GIT_TAG "main"
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
FetchContent_MakeAvailable(SDL3)
|
||||
endif()
|
||||
FetchContent_MakeAvailable(SDL3)
|
||||
|
||||
FetchContent_Declare(
|
||||
iniparser
|
||||
GIT_REPOSITORY "https://gitlab.com/iniparser/iniparser.git"
|
||||
GIT_TAG "main"
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
block()
|
||||
set(BUILD_DOCS off)
|
||||
set(BUILD_SHARED_LIBS off)
|
||||
FetchContent_MakeAvailable(iniparser)
|
||||
target_link_libraries(Isle::iniparser INTERFACE iniparser-static)
|
||||
endblock()
|
||||
FetchContent_Declare(
|
||||
iniparser
|
||||
GIT_REPOSITORY "https://gitlab.com/iniparser/iniparser.git"
|
||||
GIT_TAG "main"
|
||||
EXCLUDE_FROM_ALL
|
||||
)
|
||||
block()
|
||||
set(BUILD_DOCS off)
|
||||
set(BUILD_SHARED_LIBS off)
|
||||
FetchContent_MakeAvailable(iniparser)
|
||||
target_link_libraries(Isle::iniparser INTERFACE iniparser-static)
|
||||
endblock()
|
||||
else()
|
||||
# find_package looks for already-installed system packages.
|
||||
# Configure with `-DCMAKE_PREFIX_PATH="/path/to/package1;/path/to/package2"`
|
||||
# to add search paths.
|
||||
find_package(SDL3 CONFIG REQUIRED)
|
||||
# find_package looks for already-installed system packages.
|
||||
# Configure with `-DCMAKE_PREFIX_PATH="/path/to/package1;/path/to/package2"`
|
||||
# to add search paths.
|
||||
find_package(SDL3 CONFIG REQUIRED)
|
||||
|
||||
find_package(iniparser REQUIRED CONFIG COMPONENTS shared)
|
||||
target_link_libraries(Isle::iniparser INTERFACE iniparser-shared)
|
||||
find_package(iniparser REQUIRED CONFIG COMPONENTS shared)
|
||||
target_link_libraries(Isle::iniparser INTERFACE iniparser-shared)
|
||||
endif()
|
||||
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||
if (ENABLE_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_BIN NAMES "clang-tidy" ENV "LLVM_ROOT" REQUIRED)
|
||||
set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_BIN}")
|
||||
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}")
|
||||
find_program(CLANG_TIDY_BIN NAMES "clang-tidy" ENV "LLVM_ROOT" REQUIRED)
|
||||
set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_BIN}")
|
||||
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}")
|
||||
endif()
|
||||
|
||||
if (ISLE_ASAN)
|
||||
@ -112,26 +125,26 @@ add_subdirectory(miniwin EXCLUDE_FROM_ALL)
|
||||
set(isle_targets)
|
||||
|
||||
function(add_cxx_warning WARNING)
|
||||
if (ISLE_WERROR)
|
||||
set(compiler_option "-Werror=${WARNING}")
|
||||
else()
|
||||
set(compiler_option "-W${WARNING}")
|
||||
endif()
|
||||
string(MAKE_C_IDENTIFIER "COMPILER_SUPPORTS${compiler_option}" varname)
|
||||
if (ISLE_WERROR)
|
||||
set(compiler_option "-Werror=${WARNING}")
|
||||
else()
|
||||
set(compiler_option "-W${WARNING}")
|
||||
endif()
|
||||
string(MAKE_C_IDENTIFIER "COMPILER_SUPPORTS${compiler_option}" varname)
|
||||
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${compiler_option} ")
|
||||
if (MSVC)
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS "/WX")
|
||||
else()
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS "-Werror")
|
||||
endif()
|
||||
check_cxx_source_compiles("int main() { return 0; }" ${varname})
|
||||
cmake_pop_check_state()
|
||||
cmake_push_check_state(RESET)
|
||||
set(CMAKE_REQUIRED_FLAGS "${compiler_option} ")
|
||||
if (MSVC)
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS "/WX")
|
||||
else()
|
||||
string(APPEND CMAKE_REQUIRED_FLAGS "-Werror")
|
||||
endif()
|
||||
check_cxx_source_compiles("int main() { return 0; }" ${varname})
|
||||
cmake_pop_check_state()
|
||||
|
||||
if (${varname})
|
||||
add_compile_options(${compiler_option})
|
||||
endif()
|
||||
if (${varname})
|
||||
add_compile_options(${compiler_option})
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(3rdparty EXCLUDE_FROM_ALL SYSTEM)
|
||||
@ -532,6 +545,11 @@ if (ISLE_BUILD_APP)
|
||||
ISLE/3ds/config.cpp
|
||||
)
|
||||
endif()
|
||||
if(WINDOWS_STORE)
|
||||
target_sources(isle PRIVATE
|
||||
ISLE/xbox_one_series/config.cpp
|
||||
)
|
||||
endif()
|
||||
if(Python3_FOUND)
|
||||
if(NOT DEFINED PYTHON_PIL_AVAILABLE)
|
||||
execute_process(
|
||||
@ -612,6 +630,12 @@ if (MSVC)
|
||||
if (TARGET isle-config)
|
||||
target_compile_definitions(isle-config PRIVATE "_CRT_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
if (TARGET iniparser-static)
|
||||
target_compile_definitions(iniparser-static PRIVATE "_CRT_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
if (TARGET libsmacker)
|
||||
target_compile_definitions(libsmacker PRIVATE "_CRT_SECURE_NO_WARNINGS")
|
||||
endif()
|
||||
endif()
|
||||
# Visual Studio 2017 version 15.7 needs "/Zc:__cplusplus" for __cplusplus
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.14.26428")
|
||||
@ -671,14 +695,20 @@ endif()
|
||||
|
||||
string(REPLACE ";" "-" ISLE_CPUS_STRING "${ISLE_CPUS}")
|
||||
string(TOLOWER "${ISLE_CPUS_STRING}" ISLE_CPUS_STRING)
|
||||
set(ISLE_PACKAGE_NAME "${CMAKE_SYSTEM_NAME}-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package")
|
||||
if (WINDOWS_STORE)
|
||||
set(ISLE_PACKAGE_NAME "Xbox_One_Series_XS-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package")
|
||||
else()
|
||||
set(ISLE_PACKAGE_NAME "${CMAKE_SYSTEM_NAME}-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package")
|
||||
endif()
|
||||
if(BUILD_SHARED_LIBS)
|
||||
list(APPEND install_extra_targets lego1)
|
||||
endif()
|
||||
install(TARGETS isle ${install_extra_targets}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
if (NOT (NINTENDO_3DS OR WINDOWS_STORE))
|
||||
install(TARGETS isle ${install_extra_targets}
|
||||
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
||||
)
|
||||
endif()
|
||||
if (ISLE_BUILD_CONFIG)
|
||||
if(WIN32)
|
||||
find_program(WINDEPLOYQT_EXECUTABLE windeployqt)
|
||||
@ -726,6 +756,15 @@ if(NINTENDO_3DS)
|
||||
ctr_create_3dsx(isle SMDH isle.smdh)
|
||||
install(FILES "$<TARGET_FILE_DIR:isle>/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
||||
endif()
|
||||
if(WINDOWS_STORE)
|
||||
install(
|
||||
DIRECTORY
|
||||
"${CMAKE_BINARY_DIR}/AppPackages/isle/"
|
||||
DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
||||
FILES_MATCHING PATTERN "*/Dependencies/x64/Microsoft.VCLibs.x64*.14.00.appx"
|
||||
PATTERN "*/*.msix"
|
||||
PATTERN "*/*.msixbundle")
|
||||
endif()
|
||||
if(MSVC)
|
||||
set(CPACK_GENERATOR ZIP)
|
||||
else()
|
||||
|
||||
@ -58,6 +58,10 @@
|
||||
#include "3ds/config.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS_STORE
|
||||
#include "xbox_one_series/config.h"
|
||||
#endif
|
||||
|
||||
DECOMP_SIZE_ASSERT(IsleApp, 0x8c)
|
||||
|
||||
// GLOBAL: ISLE 0x410030
|
||||
@ -801,7 +805,7 @@ MxResult IsleApp::SetupWindow()
|
||||
SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, g_targetHeight);
|
||||
SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN, m_fullScreen);
|
||||
SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING, WINDOW_TITLE);
|
||||
#if defined(MINIWIN) && !defined(__3DS__)
|
||||
#if defined(MINIWIN) && !defined(__3DS__) && !defined(WINDOWS_STORE)
|
||||
SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, true);
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
@ -982,6 +986,9 @@ bool IsleApp::LoadConfig()
|
||||
|
||||
#ifdef __3DS__
|
||||
N3DS_SetupDefaultConfigOverrides(dict);
|
||||
#endif
|
||||
#ifdef WINDOWS_STORE
|
||||
XBONE_SetupDefaultConfigOverrides(dict);
|
||||
#endif
|
||||
iniparser_dump_ini(dict, iniFP);
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "New config written at '%s'", iniConfig);
|
||||
|
||||
18
ISLE/xbox_one_series/config.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <SDL3/SDL_log.h>
|
||||
#include <iniparser.h>
|
||||
|
||||
void XBONE_SetupDefaultConfigOverrides(dictionary* p_dictionary)
|
||||
{
|
||||
SDL_Log("Overriding default config for Xbox One/Series");
|
||||
|
||||
// Use DevelopmentFiles path for disk and cd paths
|
||||
// It's good to use that path since user can easily
|
||||
// connect through SMB and copy the files
|
||||
iniparser_set(p_dictionary, "isle:diskpath", "D:\\DevelopmentFiles\\isle\\");
|
||||
iniparser_set(p_dictionary, "isle:cdpath", "D:\\DevelopmentFiles\\isle\\");
|
||||
|
||||
// Enable cursor by default
|
||||
iniparser_set(p_dictionary, "isle:Draw Cursor", "true");
|
||||
}
|
||||
8
ISLE/xbox_one_series/config.h
Normal file
@ -0,0 +1,8 @@
|
||||
#ifndef XBOX_ONE_SERIES_CONFIG_H
|
||||
#define XBOX_ONE_SERIES_CONFIG_H
|
||||
|
||||
#include "dictionary.h"
|
||||
|
||||
void XBONE_SetupDefaultConfigOverrides(dictionary* p_dictionary);
|
||||
|
||||
#endif // XBOX_ONE_SERIES_CONFIG_H
|
||||
@ -386,7 +386,7 @@ MxLong CarRace::HandleType0Notification(MxNotificationParam&)
|
||||
void CarRace::FUN_10017820(MxS32 p_param1, MxS16 p_param2)
|
||||
{
|
||||
MxS32 local4;
|
||||
MxStillPresenter* presenter;
|
||||
MxStillPresenter* presenter = NULL;
|
||||
MxS32 x, y;
|
||||
|
||||
if (p_param1 == 11) {
|
||||
|
||||
@ -263,7 +263,7 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param)
|
||||
void JetskiRace::FUN_10016930(MxS32 p_param1, MxS16 p_param2)
|
||||
{
|
||||
MxS32 local4;
|
||||
MxStillPresenter* presenter;
|
||||
MxStillPresenter* presenter = NULL;
|
||||
MxS32 x, y;
|
||||
|
||||
if (p_param1 == 11) {
|
||||
|
||||
@ -108,7 +108,7 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size)
|
||||
{
|
||||
MxU32 id;
|
||||
MxU8* data = p_buffer;
|
||||
MxU8* data2;
|
||||
MxU8* data2 = NULL;
|
||||
|
||||
while (data < p_buffer + p_size) {
|
||||
if (data + sizeof(MxU32) <= p_buffer + p_size && UnalignedRead<MxU32>(data) == FOURCC('M', 'x', 'O', 'b')) {
|
||||
|
||||
@ -32,7 +32,7 @@ target_compile_definitions(miniwin PRIVATE
|
||||
)
|
||||
|
||||
find_package(OpenGL)
|
||||
if(OpenGL_FOUND)
|
||||
if(OpenGL_FOUND AND NOT WINDOWS_STORE)
|
||||
message(STATUS "Found OpenGL: enabling OpenGL 1.x renderer")
|
||||
target_sources(miniwin PRIVATE
|
||||
src/d3drm/backends/opengl1/actual.cpp
|
||||
@ -45,7 +45,7 @@ else()
|
||||
endif()
|
||||
|
||||
find_library(OPENGL_ES2_LIBRARY NAMES GLESv2)
|
||||
if(EMSCRIPTEN OR OPENGL_ES2_LIBRARY)
|
||||
if(EMSCRIPTEN OR OPENGL_ES2_LIBRARY AND NOT WINDOWS_STORE)
|
||||
message(STATUS "Found OpenGL: enabling OpenGL ES 2.x renderer")
|
||||
target_sources(miniwin PRIVATE src/d3drm/backends/opengles2/renderer.cpp)
|
||||
target_compile_definitions(miniwin PRIVATE USE_OPENGLES2)
|
||||
@ -73,7 +73,7 @@ if(NINTENDO_3DS)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(WIN32 AND NOT WINDOWS_STORE)
|
||||
target_sources(miniwin PRIVATE
|
||||
src/d3drm/backends/directx9/actual.cpp
|
||||
src/d3drm/backends/directx9/renderer.cpp
|
||||
@ -81,6 +81,10 @@ if(WIN32)
|
||||
target_link_libraries(miniwin PRIVATE d3d9)
|
||||
endif()
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
add_compile_definitions(WINDOWS_STORE)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(miniwin PUBLIC MINIWIN)
|
||||
|
||||
target_include_directories(miniwin
|
||||
|
||||
@ -190,7 +190,7 @@ static SDL_GPUGraphicsPipeline* InitializeGraphicsPipeline(
|
||||
Direct3DRMRenderer* Direct3DRMSDL3GPURenderer::Create(DWORD width, DWORD height)
|
||||
{
|
||||
ScopedDevice device{SDL_CreateGPUDevice(
|
||||
SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL,
|
||||
SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXBC | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL,
|
||||
#ifdef DEBUG
|
||||
true,
|
||||
#else
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
// DXIL only makes sense on Windows platforms
|
||||
// DX only makes sense on Windows platforms
|
||||
#if defined(SDL_PLATFORM_WINDOWS)
|
||||
static const Uint8 PositionColor_vert_dxil[5132] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0x4a, 0x28, 0x54, 0x85, 0x4b, 0xb0, 0x04, 0x11, 0x56, 0x33, 0x94, 0x85,
|
||||
@ -333,6 +333,104 @@ static const Uint8 PositionColor_vert_dxil[5132] = {
|
||||
0x83, 0x3f, 0xcc, 0xc3, 0x37, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x49, 0xb8, 0x83, 0x3e,
|
||||
0xf8, 0x03, 0x3d, 0x6c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static const Uint8 PositionColor_vert_dxbc[1528] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0x26, 0x81, 0xf8, 0x51, 0x4d, 0x47, 0xfd, 0xfd, 0xa8, 0xbd, 0xce, 0x70,
|
||||
0x72, 0xe8, 0x3f, 0x4e, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x34, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0xe0, 0x02, 0x00, 0x00,
|
||||
0x5c, 0x05, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xb8, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0xff,
|
||||
0x00, 0x01, 0x00, 0x00, 0x8f, 0x01, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x56, 0x69, 0x65,
|
||||
0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0xab, 0xab,
|
||||
0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x50, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x71, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x56, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73,
|
||||
0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x66, 0x6c, 0x6f, 0x61,
|
||||
0x74, 0x34, 0x78, 0x34, 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x56, 0x69, 0x65, 0x77,
|
||||
0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x77, 0x6f, 0x72,
|
||||
0x6c, 0x64, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x56, 0x69, 0x65,
|
||||
0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x6e, 0x6f,
|
||||
0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f,
|
||||
0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68,
|
||||
0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30,
|
||||
0x2e, 0x31, 0x00, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x07, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43,
|
||||
0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00,
|
||||
0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00,
|
||||
0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
|
||||
0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, 0xab, 0xab,
|
||||
0x53, 0x48, 0x45, 0x58, 0x74, 0x02, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x9d, 0x00, 0x00, 0x00,
|
||||
0x6a, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0b, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03,
|
||||
0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04,
|
||||
0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
|
||||
0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
|
||||
0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
|
||||
0x94, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif
|
||||
|
||||
// MSL only makes sense on Apple platforms
|
||||
@ -557,4 +655,4 @@ static const Uint8 PositionColor_vert_spirv[1924] = {
|
||||
0x3d, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00,
|
||||
0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00,
|
||||
0x38, 0x00, 0x01, 0x00,
|
||||
};
|
||||
};
|
||||
@ -24,6 +24,20 @@ static const SDL_GPUShaderCreateInfo VertexShaderDXILCodes[] = {
|
||||
/* num_uniform_buffers */ 1,
|
||||
},
|
||||
};
|
||||
static const SDL_GPUShaderCreateInfo VertexShaderDXBCCodes[] = {
|
||||
// VertexShaderId::PositionColor
|
||||
{
|
||||
/* code_size */ sizeof(PositionColor_vert_dxbc),
|
||||
/* code */ PositionColor_vert_dxbc,
|
||||
/* entrypoint */ "main",
|
||||
/* format */ SDL_GPU_SHADERFORMAT_DXBC,
|
||||
/* stage */ SDL_GPU_SHADERSTAGE_VERTEX,
|
||||
/* num_samplers */ 0,
|
||||
/* num_storage_textures */ 0,
|
||||
/* num_storage_buffers */ 0,
|
||||
/* num_uniform_buffers */ 1,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(SDL_PLATFORM_APPLE)
|
||||
@ -71,6 +85,20 @@ static const SDL_GPUShaderCreateInfo FragmentShaderDXILCodes[] = {
|
||||
/* num_uniform_buffers */ 1,
|
||||
},
|
||||
};
|
||||
static const SDL_GPUShaderCreateInfo FragmentShaderDXBCCodes[] = {
|
||||
// FragmentShaderId::SolidColor
|
||||
{
|
||||
/* code_size */ sizeof(SolidColor_frag_dxbc),
|
||||
/* code */ SolidColor_frag_dxbc,
|
||||
/* entrypoint */ "main",
|
||||
/* format */ SDL_GPU_SHADERFORMAT_DXBC,
|
||||
/* stage */ SDL_GPU_SHADERSTAGE_FRAGMENT,
|
||||
/* num_samplers */ 1,
|
||||
/* num_storage_textures */ 0,
|
||||
/* num_storage_buffers */ 0,
|
||||
/* num_uniform_buffers */ 1,
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
||||
#if defined(SDL_PLATFORM_APPLE)
|
||||
@ -109,6 +137,10 @@ const SDL_GPUShaderCreateInfo* GetVertexShaderCode(VertexShaderId id, SDL_GPUSha
|
||||
SDL_assert(id < SDL_arraysize(VertexShaderDXILCodes));
|
||||
return &VertexShaderDXILCodes[id];
|
||||
}
|
||||
if (formats & SDL_GPU_SHADERFORMAT_DXBC) {
|
||||
SDL_assert(id < SDL_arraysize(VertexShaderDXBCCodes));
|
||||
return &VertexShaderDXBCCodes[id];
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_PLATFORM_APPLE)
|
||||
if (formats & SDL_GPU_SHADERFORMAT_MSL) {
|
||||
@ -130,6 +162,10 @@ const SDL_GPUShaderCreateInfo* GetFragmentShaderCode(FragmentShaderId id, SDL_GP
|
||||
SDL_assert(id < SDL_arraysize(FragmentShaderDXILCodes));
|
||||
return &FragmentShaderDXILCodes[id];
|
||||
}
|
||||
if (formats & SDL_GPU_SHADERFORMAT_DXBC) {
|
||||
SDL_assert(id < SDL_arraysize(FragmentShaderDXBCCodes));
|
||||
return &FragmentShaderDXBCCodes[id];
|
||||
}
|
||||
#endif
|
||||
#if defined(SDL_PLATFORM_APPLE)
|
||||
if (formats & SDL_GPU_SHADERFORMAT_MSL) {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
#include <SDL3/SDL.h>
|
||||
|
||||
// DXIL only makes sense on Windows platforms
|
||||
// DX only makes sense on Windows platforms
|
||||
#if defined(SDL_PLATFORM_WINDOWS)
|
||||
static const Uint8 SolidColor_frag_dxil[6648] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0xd8, 0xfe, 0x4c, 0xec, 0x17, 0x1b, 0x52, 0xee, 0xf7, 0xc8, 0x8d, 0xcf,
|
||||
@ -428,6 +428,206 @@ static const Uint8 SolidColor_frag_dxil[6648] = {
|
||||
0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xe9, 0xe1, 0x17, 0xe1, 0x01, 0x1e, 0xb5, 0x81,
|
||||
0x16, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
static const Uint8 SolidColor_frag_dxbc[3160] = {
|
||||
0x44, 0x58, 0x42, 0x43, 0xe8, 0x49, 0xcf, 0x45, 0xf9, 0x5a, 0x8f, 0xd1, 0xe0, 0x69, 0x77, 0x8f,
|
||||
0x38, 0xc7, 0x7b, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x58, 0x0c, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
|
||||
0x34, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x94, 0x04, 0x00, 0x00,
|
||||
0xbc, 0x0b, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x7c, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff,
|
||||
0x00, 0x01, 0x00, 0x00, 0x53, 0x03, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00,
|
||||
0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00,
|
||||
0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00,
|
||||
0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x46, 0x72, 0x61,
|
||||
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61,
|
||||
0x00, 0xab, 0xab, 0xab, 0xac, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00,
|
||||
0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00,
|
||||
0x94, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0xec, 0x02, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x34, 0x03, 0x00, 0x00,
|
||||
0x9c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64,
|
||||
0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x00, 0x53,
|
||||
0x63, 0x65, 0x6e, 0x65, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00,
|
||||
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x00, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab,
|
||||
0xce, 0x01, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00,
|
||||
0xdc, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00,
|
||||
0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x03, 0x00,
|
||||
0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x69, 0x67, 0x68,
|
||||
0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x69, 0x6e, 0x74, 0x00, 0xab, 0x00, 0x00, 0x02, 0x00,
|
||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x02, 0x00, 0x00,
|
||||
0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44,
|
||||
0x61, 0x74, 0x61, 0x5f, 0x53, 0x68, 0x69, 0x6e, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x00, 0x66, 0x6c,
|
||||
0x6f, 0x61, 0x74, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xc2, 0x02, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74,
|
||||
0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x43, 0x6f, 0x6c, 0x6f,
|
||||
0x72, 0x52, 0x61, 0x77, 0x00, 0x64, 0x77, 0x6f, 0x72, 0x64, 0x00, 0xab, 0x00, 0x00, 0x13, 0x00,
|
||||
0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x03, 0x00, 0x00,
|
||||
0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44,
|
||||
0x61, 0x74, 0x61, 0x5f, 0x55, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x4d,
|
||||
0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53,
|
||||
0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65,
|
||||
0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00,
|
||||
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00,
|
||||
0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00,
|
||||
0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44,
|
||||
0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, 0xab, 0xab,
|
||||
0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x0e, 0x00, 0x00,
|
||||
0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x53, 0x56, 0x5f, 0x44, 0x65, 0x70,
|
||||
0x74, 0x68, 0x00, 0xab, 0x53, 0x48, 0x45, 0x58, 0x20, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||
0xc8, 0x01, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x59, 0x08, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03,
|
||||
0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x04, 0x82, 0x10, 0x10, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x02, 0x01, 0xc0, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02,
|
||||
0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x09, 0x01, 0xc0, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f,
|
||||
0x3a, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x05,
|
||||
0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x36, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x21, 0x00, 0x00, 0x08, 0x82, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x08, 0x00, 0xd0, 0x00, 0x00, 0x82, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03,
|
||||
0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x01, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x1f, 0x00, 0x04, 0x03,
|
||||
0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x07,
|
||||
0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05,
|
||||
0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x07, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x3a, 0x80, 0x20, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x09,
|
||||
0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x86, 0x41, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x06,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x15, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0xf6, 0x0f, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07,
|
||||
0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a,
|
||||
0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
|
||||
0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x07,
|
||||
0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08,
|
||||
0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05,
|
||||
0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x32, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01,
|
||||
0x32, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01,
|
||||
0x1e, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x01,
|
||||
0x01, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00,
|
||||
0xff, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x56, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x0a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x8a, 0x00, 0x00, 0x10, 0x92, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,
|
||||
0x02, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x10, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x56, 0x00, 0x00, 0x05, 0x92, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x10, 0x00,
|
||||
0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x62, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x56, 0x06, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00,
|
||||
0x32, 0x20, 0x00, 0x0c, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x81, 0x80, 0x80, 0x3b,
|
||||
0x81, 0x80, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x1f, 0x00, 0x04, 0x04, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00,
|
||||
0x45, 0x00, 0x00, 0x8b, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0xf2, 0x00, 0x10, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07,
|
||||
0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x01,
|
||||
0x55, 0x00, 0x00, 0x08, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
|
||||
0x56, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b,
|
||||
0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54,
|
||||
0x94, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
|
||||
0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
||||
#endif
|
||||
|
||||
// MSL only makes sense on Apple platforms
|
||||
@ -938,4 +1138,4 @@ static const Uint8 SolidColor_frag_spirv[4616] = {
|
||||
0xb0, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00,
|
||||
0xae, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00,
|
||||
0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00,
|
||||
};
|
||||
};
|
||||
@ -18,3 +18,9 @@ struct SceneLight {
|
||||
float4 position;
|
||||
float4 direction;
|
||||
};
|
||||
|
||||
#ifdef NO_REGISTER_SPACE
|
||||
#define REGISTER_SPACE(REG, SPACE) register(REG)
|
||||
#else
|
||||
#define REGISTER_SPACE(REG, SPACE) register(REG, SPACE)
|
||||
#endif
|
||||
@ -1,6 +1,6 @@
|
||||
#include "Common.hlsl"
|
||||
|
||||
cbuffer ViewportUniforms : register(b0, space1)
|
||||
cbuffer ViewportUniforms : REGISTER_SPACE(b0, space1)
|
||||
{
|
||||
float4x4 projection;
|
||||
float4x4 worldViewMatrix;
|
||||
|
||||
@ -5,7 +5,7 @@ struct FS_Output {
|
||||
float Depth : SV_Depth;
|
||||
};
|
||||
|
||||
cbuffer FragmentShadingData : register(b0, space3)
|
||||
cbuffer FragmentShadingData : REGISTER_SPACE(b0, space3)
|
||||
{
|
||||
SceneLight lights[3];
|
||||
int lightCount;
|
||||
@ -24,8 +24,8 @@ float4 unpackColor(uint packed)
|
||||
return color;
|
||||
}
|
||||
|
||||
Texture2D<float4> Texture : register(t0, space2);
|
||||
SamplerState Sampler : register(s0, space2);
|
||||
Texture2D<float4> Texture : REGISTER_SPACE(t0, space2);
|
||||
SamplerState Sampler : REGISTER_SPACE(s0, space2);
|
||||
|
||||
FS_Output main(FS_Input input)
|
||||
{
|
||||
|
||||
@ -167,7 +167,7 @@ HRESULT Direct3DRMImpl::CreateDeviceFromSurface(
|
||||
DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight);
|
||||
}
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(WINDOWS_STORE)
|
||||
else if (SDL_memcmp(&guid, &DirectX9_GUID, sizeof(GUID)) == 0) {
|
||||
DDRenderer = DirectX9Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight);
|
||||
}
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
#ifdef __3DS__
|
||||
#include "d3drmrenderer_citro3d.h"
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(WINDOWS_STORE)
|
||||
#include "d3drmrenderer_directx9.h"
|
||||
#endif
|
||||
#include "d3drmrenderer_sdl3gpu.h"
|
||||
@ -238,7 +238,7 @@ HRESULT DirectDrawImpl::EnumDevices(LPD3DENUMDEVICESCALLBACK cb, void* ctx)
|
||||
#ifdef __3DS__
|
||||
Citro3DRenderer_EnumDevice(cb, ctx);
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(WINDOWS_STORE)
|
||||
DirectX9Renderer_EnumDevice(cb, ctx);
|
||||
#endif
|
||||
Direct3DRMSoftware_EnumDevice(cb, ctx);
|
||||
@ -357,7 +357,7 @@ HRESULT DirectDrawImpl::CreateDevice(
|
||||
DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight);
|
||||
}
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
#if defined(_WIN32) && !defined(WINDOWS_STORE)
|
||||
else if (SDL_memcmp(&guid, &DirectX9_GUID, sizeof(GUID)) == 0) {
|
||||
DDRenderer = DirectX9Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight);
|
||||
}
|
||||
|
||||
@ -20,3 +20,7 @@ endif()
|
||||
if(LINUX)
|
||||
add_subdirectory(linux)
|
||||
endif()
|
||||
|
||||
if(WINDOWS_STORE)
|
||||
add_subdirectory(UWP)
|
||||
endif()
|
||||
|
||||
15
packaging/UWP/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
file(GLOB_RECURSE GENERATED_ASSETS
|
||||
"assets/*"
|
||||
)
|
||||
set(ASSET_FILES ${GENERATED_ASSETS})
|
||||
set_source_files_properties(${ASSET_FILES} PROPERTIES
|
||||
VS_DEPLOYMENT_CONTENT 1
|
||||
VS_DEPLOYMENT_LOCATION "assets"
|
||||
)
|
||||
|
||||
set(MANIFEST_FILE Package.appxmanifest)
|
||||
set_source_files_properties(${MANIFEST_FILE} PROPERTIES
|
||||
VS_DEPLOYMENT_CONTENT 1
|
||||
)
|
||||
|
||||
target_sources(isle PRIVATE ${ASSET_FILES} ${MANIFEST_FILE})
|
||||
47
packaging/UWP/Package.appxmanifest
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"
|
||||
xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"
|
||||
IgnorableNamespaces="uap mp">
|
||||
<Identity Name="org.legoisland.Isle" Publisher="CN=Helloyunho" Version="0.1.0.0" />
|
||||
<mp:PhoneIdentity PhoneProductId="077047DC-73D0-4EE7-9359-EDFF0ED96127" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
<Properties>
|
||||
<DisplayName>LEGO® Island</DisplayName>
|
||||
<PublisherDisplayName>Helloyunho</PublisherDisplayName>
|
||||
<Logo>StoreLogo.png</Logo>
|
||||
</Properties>
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
</Dependencies>
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
<Applications>
|
||||
<Application
|
||||
Id="App"
|
||||
Executable="isle.exe"
|
||||
EntryPoint="isle.App">
|
||||
<uap:VisualElements
|
||||
DisplayName="LEGO® Island"
|
||||
Description="LEGO® Island Xbox One/Series X|S port"
|
||||
BackgroundColor="transparent"
|
||||
Square150x150Logo="Square150x150Logo.png"
|
||||
Square44x44Logo="Square44x44Logo.png">
|
||||
<uap:SplashScreen Image="SplashScreen.png" uap5:Optional="true" BackgroundColor="black"/>
|
||||
<uap:DefaultTile
|
||||
ShortName="LEGO® Island"
|
||||
Wide310x150Logo="Wide310x150Logo.png"
|
||||
Square310x310Logo="LargeTile.png" Square71x71Logo="Square71x71Logo.png">
|
||||
<uap:ShowNameOnTiles>
|
||||
<uap:ShowOn Tile="square150x150Logo"/>
|
||||
<uap:ShowOn Tile="wide310x150Logo"/>
|
||||
<uap:ShowOn Tile="square310x310Logo"/>
|
||||
</uap:ShowNameOnTiles>
|
||||
</uap:DefaultTile>
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
</Package>
|
||||
BIN
packaging/UWP/assets/LargeTile.scale-100.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
packaging/UWP/assets/LargeTile.scale-125.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
packaging/UWP/assets/LargeTile.scale-150.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
packaging/UWP/assets/LargeTile.scale-200.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
packaging/UWP/assets/LargeTile.scale-400.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
packaging/UWP/assets/SplashScreen.scale-100.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
packaging/UWP/assets/SplashScreen.scale-125.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
packaging/UWP/assets/SplashScreen.scale-150.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
packaging/UWP/assets/SplashScreen.scale-200.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
packaging/UWP/assets/SplashScreen.scale-400.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
packaging/UWP/assets/Square150x150Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 944 B |
BIN
packaging/UWP/assets/Square150x150Logo.scale-125.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
packaging/UWP/assets/Square150x150Logo.scale-150.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
packaging/UWP/assets/Square150x150Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
packaging/UWP/assets/Square150x150Logo.scale-400.png
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 229 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 371 B |
|
After Width: | Height: | Size: 585 B |
|
After Width: | Height: | Size: 229 B |
|
After Width: | Height: | Size: 305 B |
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 371 B |
|
After Width: | Height: | Size: 585 B |
BIN
packaging/UWP/assets/Square44x44Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 407 B |
BIN
packaging/UWP/assets/Square44x44Logo.scale-125.png
Normal file
|
After Width: | Height: | Size: 514 B |
BIN
packaging/UWP/assets/Square44x44Logo.scale-150.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
packaging/UWP/assets/Square44x44Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 842 B |
BIN
packaging/UWP/assets/Square44x44Logo.scale-400.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
packaging/UWP/assets/Square44x44Logo.targetsize-16.png
Normal file
|
After Width: | Height: | Size: 203 B |
BIN
packaging/UWP/assets/Square44x44Logo.targetsize-24.png
Normal file
|
After Width: | Height: | Size: 279 B |
BIN
packaging/UWP/assets/Square44x44Logo.targetsize-256.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
packaging/UWP/assets/Square44x44Logo.targetsize-32.png
Normal file
|
After Width: | Height: | Size: 309 B |
BIN
packaging/UWP/assets/Square44x44Logo.targetsize-48.png
Normal file
|
After Width: | Height: | Size: 436 B |
BIN
packaging/UWP/assets/Square71x71Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 578 B |
BIN
packaging/UWP/assets/Square71x71Logo.scale-125.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
packaging/UWP/assets/Square71x71Logo.scale-150.png
Normal file
|
After Width: | Height: | Size: 808 B |
BIN
packaging/UWP/assets/Square71x71Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
packaging/UWP/assets/Square71x71Logo.scale-400.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
packaging/UWP/assets/StoreLogo.scale-100.png
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
packaging/UWP/assets/StoreLogo.scale-125.png
Normal file
|
After Width: | Height: | Size: 710 B |
BIN
packaging/UWP/assets/StoreLogo.scale-150.png
Normal file
|
After Width: | Height: | Size: 809 B |
BIN
packaging/UWP/assets/StoreLogo.scale-200.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
packaging/UWP/assets/StoreLogo.scale-400.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
packaging/UWP/assets/Wide310x150Logo.scale-100.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
packaging/UWP/assets/Wide310x150Logo.scale-125.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
packaging/UWP/assets/Wide310x150Logo.scale-150.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
packaging/UWP/assets/Wide310x150Logo.scale-200.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
packaging/UWP/assets/Wide310x150Logo.scale-400.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |