mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-07-15 23:50:45 +00:00
Fix flaky GCN tests (#4693)
fix: flaky tests due to uninitialized values fix: segfault during teardown while running gcn tests fix: vulkan validation error by enabling shaderFloat16 in GCN runner
This commit is contained in:
@@ -136,6 +136,11 @@ std::expected<Runner*, ErrorInfo> Runner::instance() {
|
||||
return g_runner.get();
|
||||
}
|
||||
|
||||
void Runner::DestroyInstance() {
|
||||
std::lock_guard lock{g_runner_mutex};
|
||||
g_runner.reset();
|
||||
}
|
||||
|
||||
std::expected<void, ErrorInfo> Runner::initialize() {
|
||||
VULKAN_HPP_DEFAULT_DISPATCHER.init();
|
||||
|
||||
@@ -223,6 +228,7 @@ std::expected<void, ErrorInfo> Runner::initialize() {
|
||||
vk::PhysicalDeviceVulkan12Features v12_feat{
|
||||
.pNext = &v11_feat,
|
||||
.uniformAndStorageBuffer8BitAccess = VK_TRUE,
|
||||
.shaderFloat16 = VK_TRUE,
|
||||
.shaderInt8 = VK_TRUE,
|
||||
};
|
||||
vk::PhysicalDeviceFeatures phys_feat{
|
||||
|
||||
@@ -42,6 +42,7 @@ struct ErrorInfo {
|
||||
class Runner {
|
||||
public:
|
||||
static std::expected<Runner*, ErrorInfo> instance();
|
||||
static void DestroyInstance();
|
||||
|
||||
std::expected<void, ErrorInfo> run_raw(
|
||||
std::span<const std::uint32_t> spirv,
|
||||
|
||||
@@ -1266,7 +1266,7 @@ private:
|
||||
u64 src2 : 9;
|
||||
u64 omod : 2;
|
||||
u64 neg : 3;
|
||||
} i;
|
||||
} i{};
|
||||
|
||||
static_assert(sizeof(VOP3Internal) == sizeof(u64));
|
||||
};
|
||||
@@ -1345,7 +1345,7 @@ private:
|
||||
u64 src2 : 9;
|
||||
u64 op_sel_hi01 : 2;
|
||||
u64 neg : 3;
|
||||
} i;
|
||||
} i{};
|
||||
|
||||
static_assert(sizeof(VOP3PInternal) == sizeof(u64));
|
||||
};
|
||||
|
||||
@@ -15,6 +15,10 @@ protected:
|
||||
void SetUp() override {}
|
||||
|
||||
void TearDown() override {}
|
||||
|
||||
static void TearDownTestSuite() {
|
||||
gcn_test::Runner::DestroyInstance();
|
||||
}
|
||||
};
|
||||
|
||||
struct F32x2 {
|
||||
|
||||
Reference in New Issue
Block a user