--Bug fixes

-Available memory size checking in the final render dialog was accidentally removed during the multi-gpu work last year. Add it back in.
This commit is contained in:
mfeemster
2016-02-25 21:38:45 -08:00
parent 32d6982210
commit 6ff8aa0722
9 changed files with 100 additions and 51 deletions

View File

@ -933,6 +933,7 @@ bool OpenCLWrapper::Shared() const { return m_Shared; }
const cl::Context& OpenCLWrapper::Context() const { return m_Context; }
size_t OpenCLWrapper::PlatformIndex() const { return m_PlatformIndex; }
size_t OpenCLWrapper::DeviceIndex() const { return m_DeviceIndex; }
size_t OpenCLWrapper::TotalDeviceIndex() const { return m_Info->TotalDeviceIndex(m_PlatformIndex, m_DeviceIndex); }
const string& OpenCLWrapper::DeviceName() const { return m_Info->DeviceName(m_PlatformIndex, m_DeviceIndex); }
size_t OpenCLWrapper::LocalMemSize() const { return m_LocalMemSize; }
size_t OpenCLWrapper::GlobalMemSize() const { return m_GlobalMemSize; }

View File

@ -172,8 +172,8 @@ public:
const cl::Context& Context() const;
size_t PlatformIndex() const;
size_t DeviceIndex() const;
const string& DeviceName() const;
size_t TotalDeviceIndex() const;
const string& DeviceName() const;
size_t LocalMemSize() const;
size_t GlobalMemSize() const;
size_t MaxAllocSize() const;

View File

@ -394,6 +394,14 @@ const string& RendererCL<T, bucketT>::DEKernel() const { return m_DEOpenCLKernel
template <typename T, typename bucketT>
const string& RendererCL<T, bucketT>::FinalAccumKernel() const { return m_FinalAccumOpenCLKernelCreator.FinalAccumKernel(EarlyClip(), Renderer<T, bucketT>::NumChannels(), Transparency()); }
/// <summary>
/// Get the a const referece to the devices this renderer will use.
/// Use this cautiously and do not use const_cast to manipulate the vector.
/// </summary>
/// <returns>A const reference to a vector of unique_ptr of devices</returns>
template <typename T, typename bucketT>
const vector<unique_ptr<RendererClDevice>>& RendererCL<T, bucketT>::Devices() const { return m_Devices; }
/// <summary>
/// Virtual functions overridden from RendererCLBase.
/// </summary>

View File

@ -135,6 +135,9 @@ public:
const string& DEKernel() const;
const string& FinalAccumKernel() const;
//Access to underlying OpenCL structures. Use cautiously.
const vector<unique_ptr<RendererClDevice>>& Devices() const;
//Virtual functions overridden from RendererCLBase.
virtual bool ReadFinal(byte* pixels);
virtual bool ClearFinal();

View File

@ -55,6 +55,4 @@ bool RendererClDevice::Ok() const { return m_Init; }
bool RendererClDevice::Shared() const { return m_Shared; }
bool RendererClDevice::Nvidia() const { return m_NVidia; }
size_t RendererClDevice::WarpSize() const { return m_WarpSize; }
size_t RendererClDevice::PlatformIndex() const { return m_PlatformIndex; }
size_t RendererClDevice::DeviceIndex() const { return m_DeviceIndex; }
}

View File

@ -24,8 +24,6 @@ public:
bool Shared() const;
bool Nvidia() const;
size_t WarpSize() const;
size_t PlatformIndex() const;
size_t DeviceIndex() const;
size_t m_Calls;
OpenCLWrapper m_Wrapper;