8 Commits
ci ... master

Author SHA1 Message Date
qurious-pixel
e6c528a20a Shallow clone vcpkg 2023-11-09 07:41:36 +00:00
qurious-pixel
7216269309 Shallow clone vcpkg 2023-11-09 07:41:36 +00:00
Live session user
eb146c53a0 CI fix 2023-11-09 07:41:36 +00:00
GaryOderNichts
a0f9d66703 ios/kernel: Check block state in IOS_HeapRealloc 2023-10-20 04:10:03 -07:00
GaryOderNichts
d985cc8b2b ios/kernel: IOS_HeapRealloc allocates a new block if ptr is null 2023-10-20 04:10:03 -07:00
James Benton
dd0b1be358 Replace use of removed vk::createResultValue with vk::resultCheck.
Fixes #649.
2023-04-14 11:05:36 +01:00
James
e8c9af3057 Update BUILDING.md 2022-05-08 21:21:26 +01:00
James Benton
b1ca72f1ae ci: Fix Windows Vulkan SDK installation. 2022-05-07 15:54:58 +01:00
7 changed files with 26 additions and 15 deletions

View File

@@ -26,6 +26,12 @@ jobs:
- name: Initialise
run: mkdir build
- name: "Fetch full history for vcpkg submodule"
run: |
cd libraries/vcpkg
git fetch --unshallow
git pull --all
- name: 'Setup vcpkg'
run: ./libraries/vcpkg/bootstrap-vcpkg.bat
@@ -56,16 +62,12 @@ jobs:
mkdir "C:\\VulkanSDK"
cd "C:\\VulkanSDK"
Invoke-WebRequest "https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_VERSION }}/windows/VulkanSDK-${{ env.VULKAN_VERSION }}-Installer.exe?u=" -OutFile "VulkanSDK.exe"
Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("/S");
Start-Process -FilePath VulkanSDK.exe -Wait -PassThru -ArgumentList @("in --al --da --ao --confirm-command");
cd "C:\\VulkanSDK\\${{ env.VULKAN_VERSION }}"
Remove-Item -Force -Recurse Bin32
Remove-Item -Force -Recurse Demos
Remove-Item -Force -Recurse Lib32
Remove-Item -Force -Recurse Templates
Remove-Item -Force -Recurse Tools
Remove-Item -Force -Recurse Tools32
Remove-Item -Force -Recurse Third-Party
Remove-Item -Force Uninstall.exe
Remove-Item -Force maintenancetool.exe
Remove-Item -Force Bin\\VkLayer*
Remove-Item -Force Lib\\shaderc*
dir
@@ -145,7 +147,7 @@ jobs:
run: |
cd build
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-bionic.list http://packages.lunarg.com/vulkan/lunarg-vulkan-bionic.list
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-focal.list http://packages.lunarg.com/vulkan/lunarg-vulkan-focal.list
sudo apt-add-repository ppa:cginternals/ppa
sudo apt-get update
sudo apt-get install -y cmake ccache vulkan-sdk python3-setuptools mesa-common-dev libglu1-mesa-dev ninja-build libcurl4-openssl-dev libsdl2-dev libssl-dev zlib1g-dev libuv1-dev libc-ares-dev libavcodec-dev libavfilter-dev libavutil-dev libswscale-dev

View File

@@ -27,7 +27,7 @@ Use cmake-gui to generate a VS project file:
- Ensure `Specify the generator for this project` is set to a version of Visual Studio installed on your computer
- Select `Specify toolchain for cross-compiling`
- Click `Next`
- Set `Specify the toolchain file` to `[path to decaf-emu.git]/libraries/scripts/buildsystems/vcpkg.cmake`
- Set `Specify the toolchain file` to `[path to decaf-emu.git]/libraries/vcpkg/scripts/buildsystems/vcpkg.cmake`
- Click `Finish`
- Configure will run, which may take a while as vcpkg acquires the dependencies, if all works the console should say `Configuring done`
- Click `Generate`, if all works the console should say `Generating done`

View File

@@ -85,12 +85,12 @@ if(VCPKG_TARGET_TRIPLET)
find_package(CURL CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(SDL2 CONFIG REQUIRED)
find_package(unofficial-libuv CONFIG REQUIRED)
find_package(libuv CONFIG REQUIRED)
find_package(ZLIB REQUIRED)
set(CARES_LIBRARY c-ares::cares)
set(CURL_LIBRARY CURL::libcurl)
set(LIBUV_LIBRARY unofficial::libuv::libuv)
set(LIBUV_LIBRARY libuv::uv)
set(OPENSSL_LIBRARY OpenSSL::SSL)
set(SDL2_LIBRARY SDL2::SDL2)
set(SDL2_MAIN_LIBRARY SDL2::SDL2main)

View File

@@ -438,12 +438,22 @@ IOS_HeapRealloc(HeapId heapId,
return nullptr;
}
// Allocate a new block if ptr is null
if (!ptr) {
return IOS_HeapAllocAligned(heapId, size, HeapAllocAlignAlign);
}
if (!heapContainsPtr(heap, ptr)) {
heap->errorCountExpandInvalidBlock++;
return nullptr;
}
auto block = phys_cast<HeapBlock *>(phys_cast<uint8_t *>(ptr) - sizeof(HeapBlock));
if (block->state != HeapBlockState::Allocated && block->state != HeapBlockState::InnerBlock) {
heap->errorCountExpandInvalidBlock++;
return nullptr;
}
auto blockSize = block->size;
size = align_up(size, HeapAllocSizeAlign);

View File

@@ -30,9 +30,7 @@
// Evaluate f and if result is not a success throw proper vk exception.
#define CHECK_VK_RESULT(x) do { \
vk::Result res = vk::Result(x); \
int tmp = 0; \
vk::createResultValue(res, tmp, __FILE__ ":" TOSTRING(__LINE__)); \
vk::resultCheck(static_cast<vk::Result>(x), __FILE__ ":" TOSTRING(__LINE__)); \
} while (0)
namespace vulkan

View File

@@ -1,6 +1,7 @@
{
"name": "decaf-emu",
"version-string": "0.1.0",
"version-string": "0.2.0",
"builtin-baseline": "06c79a9afa6f99f02f44d20df9e0848b2a56bf1b",
"dependencies": [
{
"name": "ffmpeg",