Merge pull request #21671 from hrydgard/more-release-prep

Pass Vulkan validation again, update README.md
This commit is contained in:
Henrik Rydgård
2026-05-14 13:23:50 +02:00
committed by GitHub
6 changed files with 67 additions and 119 deletions
+13 -59
View File
@@ -125,12 +125,11 @@ VkResult VulkanContext::CreateInstance(const CreateInfo &info) {
}
instance_layer_names_.clear();
device_layer_names_.clear();
// We can get the list of layers and extensions without an instance so we can use this information
// to enable the extensions we need that are available.
GetInstanceLayerProperties();
GetInstanceLayerExtensionList(nullptr, instance_extension_properties_);
GetInstanceLayerExtensionList(nullptr, &instance_extension_properties_);
if (!IsInstanceExtensionAvailable(VK_KHR_SURFACE_EXTENSION_NAME)) {
// Cannot create a Vulkan display without VK_KHR_SURFACE_EXTENSION.
@@ -176,7 +175,6 @@ VkResult VulkanContext::CreateInstance(const CreateInfo &info) {
// Enable the validation layers
for (size_t i = 0; i < ARRAY_SIZE(validationLayers); i++) {
instance_layer_names_.push_back(validationLayers[i]);
device_layer_names_.push_back(validationLayers[i]);
}
instance_extensions_enabled_.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
extensionsLookup_.EXT_debug_utils = true;
@@ -234,7 +232,6 @@ VkResult VulkanContext::CreateInstance(const CreateInfo &info) {
WARN_LOG(Log::G3D, "Validation on but instance layer not available - dropping layers");
// Drop the validation layers and try again.
instance_layer_names_.clear();
device_layer_names_.clear();
inst_info.enabledLayerCount = 0;
inst_info.ppEnabledLayerNames = nullptr;
res = vkCreateInstance(&inst_info, nullptr, &instance_);
@@ -403,7 +400,7 @@ void VulkanContext::DestroySurface() {
}
}
VkResult VulkanContext::GetInstanceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> &extensions) {
VkResult VulkanContext::GetInstanceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> *extensions) {
VkResult res;
do {
uint32_t instance_extension_count;
@@ -412,8 +409,8 @@ VkResult VulkanContext::GetInstanceLayerExtensionList(const char *layerName, std
return res;
if (instance_extension_count == 0)
return VK_SUCCESS;
extensions.resize(instance_extension_count);
res = vkEnumerateInstanceExtensionProperties(layerName, &instance_extension_count, extensions.data());
extensions->resize(instance_extension_count);
res = vkEnumerateInstanceExtensionProperties(layerName, &instance_extension_count, extensions->data());
} while (res == VK_INCOMPLETE);
return res;
}
@@ -445,10 +442,11 @@ VkResult VulkanContext::GetInstanceLayerProperties() {
} while (res == VK_INCOMPLETE);
// Now gather the extension list for each instance layer.
// (TODO: Is this meaningful, or used for anything?)
for (uint32_t i = 0; i < instance_layer_count; i++) {
LayerProperties layer_props;
layer_props.properties = vk_props[i];
res = GetInstanceLayerExtensionList(layer_props.properties.layerName, layer_props.extensions);
res = GetInstanceLayerExtensionList(layer_props.properties.layerName, &layer_props.extensions);
if (res != VK_SUCCESS)
return res;
instance_layer_properties_.push_back(layer_props);
@@ -456,60 +454,21 @@ VkResult VulkanContext::GetInstanceLayerProperties() {
return res;
}
// Pass layerName == nullptr to get the extension list for the device.
VkResult VulkanContext::GetDeviceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> &extensions) {
VkResult VulkanContext::GetDeviceExtensionList(std::vector<VkExtensionProperties> *extensions) {
VkResult res;
do {
uint32_t device_extension_count;
res = vkEnumerateDeviceExtensionProperties(physical_devices_[physical_device_], layerName, &device_extension_count, nullptr);
res = vkEnumerateDeviceExtensionProperties(physical_devices_[physical_device_], nullptr, &device_extension_count, nullptr);
if (res != VK_SUCCESS)
return res;
if (!device_extension_count)
return VK_SUCCESS;
extensions.resize(device_extension_count);
res = vkEnumerateDeviceExtensionProperties(physical_devices_[physical_device_], layerName, &device_extension_count, extensions.data());
extensions->resize(device_extension_count);
res = vkEnumerateDeviceExtensionProperties(physical_devices_[physical_device_], nullptr, &device_extension_count, extensions->data());
} while (res == VK_INCOMPLETE);
return res;
}
VkResult VulkanContext::GetDeviceLayerProperties() {
/*
* It's possible, though very rare, that the number of
* instance layers could change. For example, installing something
* could include new layers that the loader would pick up
* between the initial query for the count and the
* request for VkLayerProperties. The loader indicates that
* by returning a VK_INCOMPLETE status and will update the
* the count parameter.
* The count parameter will be updated with the number of
* entries loaded into the data pointer - in case the number
* of layers went down or is smaller than the size given.
*/
uint32_t device_layer_count;
std::vector<VkLayerProperties> vk_props;
VkResult res;
do {
res = vkEnumerateDeviceLayerProperties(physical_devices_[physical_device_], &device_layer_count, nullptr);
if (res != VK_SUCCESS)
return res;
if (device_layer_count == 0)
return VK_SUCCESS;
vk_props.resize(device_layer_count);
res = vkEnumerateDeviceLayerProperties(physical_devices_[physical_device_], &device_layer_count, vk_props.data());
} while (res == VK_INCOMPLETE);
// Gather the list of extensions for each device layer.
for (uint32_t i = 0; i < device_layer_count; i++) {
LayerProperties layer_props;
layer_props.properties = vk_props[i];
res = GetDeviceLayerExtensionList(layer_props.properties.layerName, layer_props.extensions);
if (res != VK_SUCCESS)
return res;
device_layer_properties_.push_back(layer_props);
}
return res;
}
// Returns true if all layer names specified in check_names can be found in given layer properties.
bool VulkanContext::CheckLayers(const std::vector<LayerProperties> &layer_props, const std::vector<const char *> &layer_names) const {
uint32_t check_count = (uint32_t)layer_names.size();
@@ -609,11 +568,6 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
vulkanDeviceApiVersion_ = physicalDeviceProperties_[physical_device].properties.apiVersion;
GetDeviceLayerProperties();
if (!CheckLayers(device_layer_properties_, device_layer_names_)) {
WARN_LOG(Log::G3D, "CheckLayers for device %d failed", physical_device);
}
queue_count = 0;
vkGetPhysicalDeviceQueueFamilyProperties(physical_devices_[physical_device_], &queue_count, nullptr);
_dbg_assert_(queue_count >= 1);
@@ -662,7 +616,7 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
(memory_properties_.memoryTypes[i].propertyFlags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) ? "HOST_COHERENT " : "");
}
GetDeviceLayerExtensionList(nullptr, device_extension_properties_);
GetDeviceExtensionList(&device_extension_properties_);
device_extensions_enabled_.push_back(VK_KHR_SWAPCHAIN_EXTENSION_NAME);
@@ -824,8 +778,8 @@ VkResult VulkanContext::CreateDevice(int physical_device) {
VkDeviceCreateInfo device_info{ VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO };
device_info.queueCreateInfoCount = 1;
device_info.pQueueCreateInfos = &queue_info;
device_info.enabledLayerCount = (uint32_t)device_layer_names_.size();
device_info.ppEnabledLayerNames = device_info.enabledLayerCount ? device_layer_names_.data() : nullptr;
device_info.enabledLayerCount = 0;
device_info.ppEnabledLayerNames = nullptr;
device_info.enabledExtensionCount = (uint32_t)device_extensions_enabled_.size();
device_info.ppEnabledExtensionNames = device_info.enabledExtensionCount ? device_extensions_enabled_.data() : nullptr;
+2 -6
View File
@@ -302,11 +302,10 @@ public:
return queueFamilyProperties_[family];
}
VkResult GetInstanceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> &extensions);
VkResult GetInstanceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> *extensions);
VkResult GetInstanceLayerProperties();
VkResult GetDeviceLayerExtensionList(const char *layerName, std::vector<VkExtensionProperties> &extensions);
VkResult GetDeviceLayerProperties();
VkResult GetDeviceExtensionList(std::vector<VkExtensionProperties> *extensions);
const std::vector<VkExtensionProperties> &GetDeviceExtensionsAvailable() const {
return device_extension_properties_;
@@ -479,9 +478,6 @@ private:
std::vector<const char *> instance_extensions_enabled_;
std::vector<VkExtensionProperties> instance_extension_properties_;
std::vector<const char *> device_layer_names_;
std::vector<LayerProperties> device_layer_properties_;
std::vector<const char *> device_extensions_enabled_;
std::vector<VkExtensionProperties> device_extension_properties_;
VulkanExtensions extensionsLookup_{};
+3 -5
View File
@@ -256,16 +256,14 @@ void TextureCacheVulkan::DeviceRestore(Draw::DrawContext *draw) {
VkResult res = vkCreateSampler(vulkan->GetDevice(), &samp, nullptr, &samplerNearest_);
_assert_(res == VK_SUCCESS);
VkCommandBuffer cmdInit = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
CompileScalingShader(cmdInit);
CompileScalingShader();
computeShaderManager_.DeviceRestore(draw);
}
void TextureCacheVulkan::NotifyConfigChanged() {
TextureCacheCommon::NotifyConfigChanged();
VkCommandBuffer cmdInit = (VkCommandBuffer)draw_->GetNativeObject(Draw::NativeObject::INIT_COMMANDBUFFER);
CompileScalingShader(cmdInit);
CompileScalingShader();
}
static std::string ReadShaderSrc(const Path &filename) {
@@ -364,7 +362,7 @@ bool TextureCacheVulkan::CompileMultipassShader(VulkanContext *vulkan, const Tex
return true;
}
void TextureCacheVulkan::CompileScalingShader(VkCommandBuffer cmdInit) {
void TextureCacheVulkan::CompileScalingShader() {
if (!draw_) {
// Something is very wrong.
return;
+1 -1
View File
@@ -121,7 +121,7 @@ private:
void BuildTexture(TexCacheEntry *const entry) override;
void CompileScalingShader(VkCommandBuffer cmdInit);
void CompileScalingShader();
bool CompileMultipassShader(VulkanContext *vulkan, const TextureShaderInfo &shaderInfo, std::string *error);
void ClearScalingShaders(VulkanContext *vulkan);
bool HasScalingShader() const;
+14 -4
View File
@@ -45,18 +45,20 @@ During this cycle, I've mostly focused on UX improvements.
- Rendering fixes
- Fix a bug in lens flare occlusion for the Syphon Filter games ([#21511])
- Fix a bug in the software renderer ([#21648])
- Misc UI improvements
- Soft keyboard has more symbols ([#21625])
- Basic deep link support on iOS ([#21615])
- Fix file picker problems on some Android devices (regression) ([#21614])
- Instant type-to-search in game browser ([#21559], [#21565], [#21630])
- Fix file picker problems on some Android devices (regression) ([#21614], [#21656])
- Fix crash in text edit fields on Mac/iOS ([#21601])
- PSP DVD prototypes can now load directly ([#21599], [#21601])
- Cheat UI has been cleaned up and supports titles and comments natively ([#21590])
- Instant type-to-search in game browser ([#21559], [#21565], [#21630])
- RetroAchievements subset display improvements ([#21536])
- Basic deep link support on iOS ([#21615])
- Soft keyboard has more symbols ([#21625])
- Other
- Fix important (but mostly rare) crash bug affecting games that draw a lot ([#21669])
- More plugin zip files can now auto-install ([#21556])
- Pause on lost-focus on Linux ([#21517])
- Frameskipping no longer breaks analog stick auto-rotation in GoW, however manual rotation still broken ([#21508])
@@ -67,6 +69,8 @@ During this cycle, I've mostly focused on UX improvements.
- Fix music looping in Death JR ([#21490])
- Hide the save-load indicator in the corner by default ([#21528])
- Fix crash in the remote debugger, by Nemoumbra ([#21652])
- Fix screenshot cropping bug ([#21665])
- mfplat.dll is no longer required on Windows unless you need camera/microphone ([#21660])
What's new in 1.20.3
--------------------
@@ -538,3 +542,9 @@ See [history.md](history.md).
[#21565]: https://github.com/hrydgard/ppsspp/issues/21565 "Improve search to support full-width chars and to clear search on navigation"
[#21630]: https://github.com/hrydgard/ppsspp/issues/21630 "Refactor type-to-search code for reuse, use in cheats dialog"
[#21595]: https://github.com/hrydgard/ppsspp/issues/21595 "loongarch: Fix Jit_WeightsU16Skin in VertexDecoderLoongArch64.cpp"
[#21648]: https://github.com/hrydgard/ppsspp/issues/21648 "Remove 2 cases for fast path for soft gpu"
[#21656]: https://github.com/hrydgard/ppsspp/issues/21656 "Fix the java exception reporting for Android file picker errors, fix some search issues"
[#21669]: https://github.com/hrydgard/ppsspp/issues/21669 "Add \"allocation slack\" to our pushbuffers. Fixes a memory overwrite bug"
[#21652]: https://github.com/hrydgard/ppsspp/issues/21652 "Critical bug in the remote debugger"
[#21665]: https://github.com/hrydgard/ppsspp/issues/21665 "Raw screenshot cropping fix"
[#21660]: https://github.com/hrydgard/ppsspp/issues/21660 "Remove the mfplat.dll hard dependency (now fully dynamic)."
+34 -44
View File
@@ -81,9 +81,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "aws-lc-rs"
version = "1.16.3"
version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ec6fb3fe69024a75fa7e1bfb48aa6cf59706a101658ea01bfd33b2b248a038f"
checksum = "5ec2f1fc3ec205783a5da9a7e6c1509cc69dedf09a1949e412c1e18469326d00"
dependencies = [
"aws-lc-sys",
"zeroize",
@@ -91,9 +91,9 @@ dependencies = [
[[package]]
name = "aws-lc-sys"
version = "0.40.0"
version = "0.41.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f50037ee5e1e41e7b8f9d161680a725bd1626cb6f8c7e901f91f942850852fe7"
checksum = "1a2f9779ce85b93ab6170dd940ad0169b5766ff848247aff13bb788b832fe3f4"
dependencies = [
"cc",
"cmake",
@@ -139,9 +139,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "cc"
version = "1.2.61"
version = "1.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d"
checksum = "a1dce859f0832a7d088c4f1119888ab94ef4b5d6795d1ce05afb7fe159d79f98"
dependencies = [
"find-msvc-tools",
"jobserver",
@@ -492,9 +492,9 @@ dependencies = [
[[package]]
name = "h2"
version = "0.4.13"
version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f44da3a8150a6703ed5d34e164b875fd14c2cdab9af1252a9a1020bde2bdc54"
checksum = "171fefbc92fe4a4de27e0698d6a5b392d6a0e333506bc49133760b3bcf948733"
dependencies = [
"atomic-waker",
"bytes",
@@ -520,9 +520,9 @@ dependencies = [
[[package]]
name = "hashbrown"
version = "0.17.0"
version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
[[package]]
name = "heck"
@@ -746,7 +746,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
dependencies = [
"equivalent",
"hashbrown 0.17.0",
"hashbrown 0.17.1",
"serde",
"serde_core",
]
@@ -757,16 +757,6 @@ version = "2.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2"
[[package]]
name = "iri-string"
version = "0.7.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20"
dependencies = [
"memchr",
"serde",
]
[[package]]
name = "is_terminal_polyfill"
version = "1.70.2"
@@ -840,9 +830,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.97"
version = "0.3.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1840c94c045fbcf8ba2812c95db44499f7c64910a912551aaaa541decebcacf"
checksum = "67df7112613f8bfd9150013a0314e196f4800d3201ae742489d999db2f979f08"
dependencies = [
"cfg-if",
"futures-util",
@@ -1685,9 +1675,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
version = "1.52.1"
version = "1.52.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6"
checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe"
dependencies = [
"bytes",
"libc",
@@ -1737,20 +1727,20 @@ dependencies = [
[[package]]
name = "tower-http"
version = "0.6.8"
version = "0.6.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8"
checksum = "68d6fdd9f81c2819c9a8b0e0cd91660e7746a8e6ea2ba7c6b2b057985f6bcb51"
dependencies = [
"bitflags 2.11.1",
"bytes",
"futures-util",
"http",
"http-body",
"iri-string",
"pin-project-lite",
"tower",
"tower-layer",
"tower-service",
"url",
]
[[package]]
@@ -1888,9 +1878,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen"
version = "0.2.120"
version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df52b6d9b87e0c74c9edfa1eb2d9bf85e5d63515474513aa50fa181b3c4f5db1"
checksum = "49ace1d07c165b0864824eee619580c4689389afa9dc9ed3a4c75040d82e6790"
dependencies = [
"cfg-if",
"once_cell",
@@ -1901,9 +1891,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.70"
version = "0.4.71"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "af934872acec734c2d80e6617bbb5ff4f12b052dd8e6332b0817bce889516084"
checksum = "96492d0d3ffba25305a7dc88720d250b1401d7edca02cc3bcd50633b424673b8"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -1911,9 +1901,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.120"
version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b1041f495fb322e64aca85f5756b2172e35cd459376e67f2a6c9dffcedb103"
checksum = "8e68e6f4afd367a562002c05637acb8578ff2dea1943df76afb9e83d177c8578"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -1921,9 +1911,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.120"
version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dcd0ff20416988a18ac686d4d4d0f6aae9ebf08a389ff5d29012b05af2a1b41"
checksum = "d95a9ec35c64b2a7cb35d3fead40c4238d0940c86d107136999567a4703259f2"
dependencies = [
"bumpalo",
"proc-macro2",
@@ -1934,9 +1924,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.120"
version = "0.2.121"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49757b3c82ebf16c57d69365a142940b384176c24df52a087fb748e2085359ea"
checksum = "c4e0100b01e9f0d03189a92b96772a1fb998639d981193d7dbab487302513441"
dependencies = [
"unicode-ident",
]
@@ -2036,9 +2026,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.97"
version = "0.3.98"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2eadbac71025cd7b0834f20d1fe8472e8495821b4e9801eb0a60bd1f19827602"
checksum = "4b572dff8bcf38bad0fa19729c89bb5748b2b9b1d8be70cf90df697e3a8f32aa"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -2390,9 +2380,9 @@ dependencies = [
[[package]]
name = "wl-clipboard-rs"
version = "0.7.0"
version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "981a303dfbb75d659f6612d05a14b2e363c103d24f676a2d44a00d18507a1ad9"
checksum = "0e1b0451f89e40310b8ef524c068cadca8bf0c974cd31c384f210c4ba2095617"
dependencies = [
"derive-new",
"libc",
@@ -2494,9 +2484,9 @@ dependencies = [
[[package]]
name = "zerofrom"
version = "0.1.7"
version = "0.1.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69faa1f2a1ea75661980b013019ed6687ed0e83d069bc1114e2cc74c6c04c4df"
checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"
dependencies = [
"zerofrom-derive",
]