mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-05-20 18:34:58 +00:00
vulkan: Fix two more validation errors. (#1250)
This commit is contained in:
parent
1dabea7514
commit
ee57c2fd69
2 changed files with 8 additions and 2 deletions
|
@ -392,8 +392,9 @@ void EmitContext::DefineBuffers() {
|
||||||
const bool is_storage = desc.IsStorage(sharp);
|
const bool is_storage = desc.IsStorage(sharp);
|
||||||
const auto* data_types = True(desc.used_types & IR::Type::F32) ? &F32 : &U32;
|
const auto* data_types = True(desc.used_types & IR::Type::F32) ? &F32 : &U32;
|
||||||
const Id data_type = (*data_types)[1];
|
const Id data_type = (*data_types)[1];
|
||||||
const Id record_array_type{is_storage ? TypeRuntimeArray(data_type)
|
const Id record_array_type{
|
||||||
: TypeArray(data_type, ConstU32(sharp.NumDwords()))};
|
is_storage ? TypeRuntimeArray(data_type)
|
||||||
|
: TypeArray(data_type, ConstU32(std::max(sharp.NumDwords(), 1U)))};
|
||||||
const Id struct_type{define_struct(record_array_type, desc.is_instance_data)};
|
const Id struct_type{define_struct(record_array_type, desc.is_instance_data)};
|
||||||
|
|
||||||
const auto storage_class =
|
const auto storage_class =
|
||||||
|
|
|
@ -197,6 +197,11 @@ void Swapchain::SetSurfaceProperties() {
|
||||||
|
|
||||||
void Swapchain::Destroy() {
|
void Swapchain::Destroy() {
|
||||||
vk::Device device = instance.GetDevice();
|
vk::Device device = instance.GetDevice();
|
||||||
|
const auto wait_result = device.waitIdle();
|
||||||
|
if (wait_result != vk::Result::eSuccess) {
|
||||||
|
LOG_WARNING(Render_Vulkan, "Failed to wait for device to become idle: {}",
|
||||||
|
vk::to_string(wait_result));
|
||||||
|
}
|
||||||
if (swapchain) {
|
if (swapchain) {
|
||||||
device.destroySwapchainKHR(swapchain);
|
device.destroySwapchainKHR(swapchain);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue