[All] Fixed multiple issues during build on Linux

- Added some fixes introduced by RodoMa92 in PR198

- Lack of AVX2 extension (should be done differently in the future)
- Disable deprecated-volatile warning
- Added missing override in posix EventInfo, ImGui notification class and XContent class
- Removed not used XAudio2.h include in XMP
- Fixed missing switch-case in XObject
- Added fugly template in native_list.h
- Fixed multiple smaller issues
This commit is contained in:
Gliniak
2025-01-08 22:27:51 +01:00
committed by Radosław Gliński
parent cdd3f161fa
commit 09be7e874a
31 changed files with 117 additions and 76 deletions

View File

@@ -580,10 +580,17 @@ static inline void GetScissorTmpl(const RegisterFile& XE_RESTRICT regs,
__m128i pa_sc_scissor = _mm_setr_epi32(
pa_sc_screen_scissor_tl_tl_x, pa_sc_screen_scissor_tl_tl_y,
pa_sc_screen_scissor_br_br_x, pa_sc_screen_scissor_br_br_y);
#if XE_PLATFORM_WIN32
__m128i xyoffsetadd = _mm_cvtsi64x_si128(
static_cast<unsigned long long>(pa_sc_window_offset_window_x_offset) |
(static_cast<unsigned long long>(pa_sc_window_offset_window_y_offset)
<< 32));
#else
__m128i xyoffsetadd = _mm_cvtsi64_si128(
static_cast<unsigned long long>(pa_sc_window_offset_window_x_offset) |
(static_cast<unsigned long long>(pa_sc_window_offset_window_y_offset)
<< 32));
#endif
xyoffsetadd = _mm_unpacklo_epi64(xyoffsetadd, xyoffsetadd);
// chrispy: put this here to make it clear that the shift by 31 is extracting
// this field

View File

@@ -100,7 +100,7 @@ constexpr bool IsPrimitivePolygonal(bool vgt_output_path_is_tessellation_enable,
return (primitive_polygonal_table & (1U << static_cast<uint32_t>(type))) != 0;
}
XE_FORCEINLINE
bool IsPrimitivePolygonal(const RegisterFile& regs) {
static bool IsPrimitivePolygonal(const RegisterFile& regs) {
return IsPrimitivePolygonal(
regs.Get<reg::VGT_OUTPUT_PATH_CNTL>().path_select ==
xenos::VGTOutputPath::kTessellationEnable,

View File

@@ -482,7 +482,7 @@ void SharedMemory::TryFindUploadRange(const uint32_t& block_first,
}
static bool UploadRange_DoBestScanForward(uint64_t v, uint32_t* out) {
#if XE_ARCH_AMD64 == 1
#if XE_ARCH_AMD64 == 1 && XE_PLATFORM_WIN32
if (!v) {
return false;
}

View File

@@ -89,7 +89,7 @@ void TracePlayer::PlayTrace(const uint8_t* trace_data, size_t trace_size,
TracePlaybackMode playback_mode,
bool clear_caches) {
playing_trace_ = true;
graphics_system_->command_processor()->CallInThread([=]() {
graphics_system_->command_processor()->CallInThread([=, this]() {
PlayTraceOnThread(trace_data, trace_size, playback_mode, clear_caches);
});
}

View File

@@ -899,9 +899,11 @@ void TraceViewer::DrawVertexFetcher(Shader* shader,
} break;
case xenos::VertexFormat::k_16_16_FLOAT: {
auto e0 = LOADEL(uint32_t, 0);
ImGui::Text("%.2f", half_float::detail::uint16((e0 >> 16) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e0 >> 16) & 0xFFFF)));
ImGui::NextColumn();
ImGui::Text("%.2f", half_float::detail::uint16((e0 >> 0) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e0 >> 0) & 0xFFFF)));
ImGui::NextColumn();
} break;
case xenos::VertexFormat::k_32_32:
@@ -972,13 +974,17 @@ void TraceViewer::DrawVertexFetcher(Shader* shader,
case xenos::VertexFormat::k_16_16_16_16_FLOAT: {
auto e0 = LOADEL(uint32_t, 0);
auto e1 = LOADEL(uint32_t, 1);
ImGui::Text("%.2f", half_float::detail::uint16((e0 >> 16) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e0 >> 16) & 0xFFFF)));
ImGui::NextColumn();
ImGui::Text("%.2f", half_float::detail::uint16((e0 >> 0) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e0 >> 0) & 0xFFFF)));
ImGui::NextColumn();
ImGui::Text("%.2f", half_float::detail::uint16((e1 >> 16) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e1 >> 16) & 0xFFFF)));
ImGui::NextColumn();
ImGui::Text("%.2f", half_float::detail::uint16((e1 >> 0) & 0xFFFF));
ImGui::Text("%.2f", static_cast<float>(half_float::detail::uint16(
(e1 >> 0) & 0xFFFF)));
ImGui::NextColumn();
} break;
case xenos::VertexFormat::k_32_32_32_32_FLOAT: