FreeBSD/clang update proposal.

silence few build warnings, VKDMA: disable Intel chipset for host buffer as it requires root privilege.
This commit is contained in:
David Carlier 2021-04-16 20:54:34 +01:00 committed by Ivan
parent b6732fbae9
commit 7618e7f3fb
2 changed files with 8 additions and 4 deletions

View file

@ -258,7 +258,7 @@ namespace vk
const auto vendor = g_render_device->gpu().get_driver_vendor();
[[maybe_unused]] const auto chip = g_render_device->gpu().get_chip_class();
#ifdef _WIN32
#if defined(_WIN32)
bool allow_host_buffers;
if (vendor == driver_vendor::NVIDIA)
{
@ -277,9 +277,13 @@ namespace vk
{
allow_host_buffers = true;
}
#else
#elif defined(__linux__)
// Anything running on AMDGPU kernel driver will not work due to the check for fd-backed memory allocations
const bool allow_host_buffers = (vendor != driver_vendor::AMD && vendor != driver_vendor::RADV);
#else
// Anything running on AMDGPU kernel driver will not work due to the check for fd-backed memory allocations
// Intel chipsets woulf fail in most cases and DRM_IOCTL_i915_GEM_USERPTR unimplemented
const bool allow_host_buffers = (vendor != driver_vendor::AMD && vendor != driver_vendor::RADV && vendor != driver_vendor::INTEL);
#endif
if (allow_host_buffers && g_render_device->get_external_memory_host_support())
{

View file

@ -617,11 +617,11 @@ void debugger_frame::UpdateUI()
const auto size_context = cpu->id_type() == 1 ? sizeof(ppu_thread) :
cpu->id_type() == 2 ? sizeof(spu_thread) : sizeof(cpu_thread);
if (m_last_pc != cia || m_last_query_state.size() != size_context || std::memcmp(m_last_query_state.data(), cpu, size_context))
if (m_last_pc != cia || m_last_query_state.size() != size_context || std::memcmp(m_last_query_state.data(), static_cast<void *>(cpu), size_context))
{
// Copy thread data
m_last_query_state.resize(size_context);
std::memcpy(m_last_query_state.data(), cpu, size_context);
std::memcpy(m_last_query_state.data(), static_cast<void *>(cpu), size_context);
m_last_pc = cia;
DoUpdate();