Skip to content

Commit 98d6d1e

Browse files
committed
Windowsビルドを修正。
1 parent bc8826d commit 98d6d1e

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

VCECore/vce_amf.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,9 @@ RGY_ERR VCEAMF::initTracer(int log_level) {
125125

126126
std::vector<std::unique_ptr<VCEDevice>> VCEAMF::createDeviceList(bool interopD3d9, bool interopD3d11, RGYParamInitVulkan interopVulkan, bool enableOpenCL, bool enableVppPerfMonitor, bool enableAV1HWDec, int openCLBuildThreads, int targetDeviceId) {
127127
std::vector<std::unique_ptr<VCEDevice>> devs;
128+
int adapterCount = 0;
128129
#if ENABLE_D3D11
129-
const int adapterCount = DeviceDX11::adapterCount(m_pLog.get());
130+
adapterCount = DeviceDX11::adapterCount(m_pLog.get());
130131
#elif ENABLE_VULKAN
131132
std::vector<int> adapterIndices;
132133
if (VULKAN_DEFAULT_DEVICE_ONLY == 0) {
@@ -154,17 +155,17 @@ std::vector<std::unique_ptr<VCEDevice>> VCEAMF::createDeviceList(bool interopD3d
154155
}),
155156
adapterIndices.end());
156157
}
158+
adapterCount = (int)adapterIndices.size();
157159
#else
158160
RGYOpenCL cl(m_pLog);
159161
auto platforms = cl.getPlatforms("AMD");
160-
const int adapterCount = std::accumulate(platforms.begin(), platforms.end(), 0, [](int acc, std::shared_ptr<RGYOpenCLPlatform>& p) {
162+
adapterCount = std::accumulate(platforms.begin(), platforms.end(), 0, [](int acc, std::shared_ptr<RGYOpenCLPlatform>& p) {
161163
if (p->createDeviceList(CL_DEVICE_TYPE_GPU) == RGY_ERR_NONE) {
162164
acc += (int)p->devs().size();
163165
}
164166
return acc;
165167
});
166168
#endif
167-
const int adapterCount = (int)adapterIndices.size();
168169
PrintMes(RGY_LOG_DEBUG, _T("adapterCount %d.\n"), adapterCount);
169170

170171
for (int i = 0; i < adapterCount; i++) {

VCECore/vce_device.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include "vce_util.h"
3030
#include "VideoDecoderUVD.h"
3131
#include "rgy_avutil.h"
32+
#include <algorithm>
3233
#include <array>
3334
#include <cstring>
3435

VCEEncC/VCEEncC.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
//
2626
// ------------------------------------------------------------------------------------------
2727

28+
#include <algorithm>
2829
#include <vector>
2930
#include <set>
3031
#include <numeric>

0 commit comments

Comments
 (0)