mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-07 04:26:01 -10:00
Builds parallel_gamecubewii_libretro for every lane .gitlab-ci.yml covers: unix (Linux x86_64/aarch64), webos, win64 (MinGW-w64), osx (x86_64/arm64, CROSS_COMPILE), ios-arm64, tvos-arm64, android-arm64 and android-x86_64. The source lists and per-library flags follow what the CMake LIBRETRO=ON build links into the core, without the units only the standalone frontends use. The per-platform configure results for curl, libusb, libiconv and mGBA are checked in under Externals/<library>/makefile; the remaining generated files are produced by the Makefile under obj/gen. The Android input backend's JNI entry points belong to the Android app and are left out of the core, which links with --no-undefined everywhere. The Windows code builds against MinGW-w64 headers older than 12.0 as well: D3D12 includes d3d12sdklayers.h explicitly, and the constants, declarations and const-correct pointer types those headers lack for D3D12, device notifications, the Wii Remote Bluetooth path, the IOS IP stack and thread naming are provided locally.
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
// Copyright 2019 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
#pragma once
|
|
|
|
#include <d3d12.h>
|
|
#include <d3d12sdklayers.h>
|
|
#include <wrl/client.h>
|
|
|
|
// MinGW-w64 headers before 12.0 do not define these.
|
|
#ifndef D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT
|
|
#define D3D12_MAX_MULTISAMPLE_SAMPLE_COUNT 32
|
|
#endif
|
|
#ifndef D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE
|
|
#define D3D12_MAX_SHADER_VISIBLE_SAMPLER_HEAP_SIZE 2048
|
|
#endif
|
|
|
|
#include "Common/MsgHandler.h"
|
|
#include "VideoBackends/D3DCommon/D3DCommon.h"
|
|
|
|
namespace DX12
|
|
{
|
|
using Microsoft::WRL::ComPtr;
|
|
|
|
static void ResourceBarrier(ID3D12GraphicsCommandList* cmdlist, ID3D12Resource* resource,
|
|
D3D12_RESOURCE_STATES from_state, D3D12_RESOURCE_STATES to_state)
|
|
{
|
|
const D3D12_RESOURCE_BARRIER barrier = {
|
|
D3D12_RESOURCE_BARRIER_TYPE_TRANSITION,
|
|
D3D12_RESOURCE_BARRIER_FLAG_NONE,
|
|
{{resource, D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES, from_state, to_state}}};
|
|
cmdlist->ResourceBarrier(1, &barrier);
|
|
}
|
|
} // namespace DX12
|