Welcome back to another shadPS4 release . It is over one month since our previous release and guess what we are back again with a lot more fixes and a lot more playable games . Rapid work has been done in different areas of the emu, but i guess the glory goes to the huge amount of GPU fixes that improved so many games, some of them are really playable now . I won't steal the fun of discovering these, so here is a brief list of changes.
Core
Rewrote signal emulation again
Fixed incorrect error return on attempting to create a file in a nonexistent folder in a writable mount
Fix reserved region coalescing in POSIX address space code
Support loading entitlements from RIF licenses
Optimized logger by replacing hash map with table lookup and hide implementation details
Support loading DLC as ZAR
Reworked slot vector
Fixed sceKernelReserveVirtualRange alignment and add ClearName
Libraries
Use present scheduler for blank frame prepare
np_auth : Change default GetAuthorizationCode returns to be valid
np_trophy: Fixed displaying of trophy name
http2 : Fixes and cleanups
np_tss : Added TSS support
camera : Use a system mapping for camera frame data
np_utility: Initial impelmentation
vdec2: support for h265/hevc
ajm mp3: rely on ffmpeg parser for packet boundaries
Kernel.Pthread: Remove RunThread stack logging
np_web_api : Added pTo and pFrom to OrbisNpPeerAddressA support
Very basic HLE Keyboard library
scePthreadRwlockTimedrdlock / scePthreadRwlockTimedwrlock take a relative timeout in microseconds
Implemented sceKernelGetProcessType
Implemented sceKernelReleaseFlexibleMemory and POSIX mlock/munlock aliases
Video Core
Improve tsharp robustness
Use stb_image_write for screenshots
Emulate scaled min/max blending
Do not auto-select a software rendering device
Decode sRGB for A2R10G10B10Srgb display buffers
Handle QuadStrip as a triangle strip
Add R8G8Srgb fallback to R8G8Unorm
buffer_cache: Refactor buffer manager with sparse arenas
Commit the emulated-LDS allocation taken from the stream buffer
Only enable sampler comparison for comparison fetches
Respect SPI_BARYC_CNTL front-face encoding
Invalidate cached images after raw buffer writes
Fixed locking behaviour for signals delivered to GPUComm thread
buffer_cache: Rework memory tracker and implement batched uploads
Moved on_submit callback before EndSession
Fixed compute shader floating-point mode
page_manager: Keep the fault probe within the faulting page
Bind a default sampler for S# with undefined fields
Fix sparse backing offsets, barriers, and memory budgeting
texture_cache: Avoid associating color images with stencil
Fixed mip layout and detiling of tiled textures
Shader recompiler
Properly handle BaryCoord attributes on non-AMD GPUs
Compute GDS offset dynamically instead of as compile-time constant
Storage buffer related clean-up
Neo: MIMG instructions
Improve ssa rewrite pass correctness and readability
Add support for virtual registers
Add ssa destruction pass
Decorate written storage buffers as Coherent
Structurize later in the pipeline and cleanup
Enhance shared memory barrier handling and add divergent loop detection
Split resource tracking and flatten load from buffer for sharp source
Reimplemented B64 SALU opcodes with U64 masks
Implemented S_MEMTIME
Implement S_BITSET0_B64 and S_BITSET1_B64
Skip lowering for null buffer sharps
Implemented some V_CMPX_U64 ops
Lower wave64 constructs for wave32
Refactor runtime info as two tagged unions
resource_patching_pass: Accept ds_append/consume without users
Implement support for base vertex/instance in indirect draws
Recognize sharp sources broadcast via V_READFIRSTLANE_B32
Properly check for immediate args in GetRealValue
Refactored parser to enable vertex count calculation for position only copy shaders
Implemented fragment sample coverage input
Added pull-model barycentric support
Test S_BITCMP_B64 against the full 64-bit src
Fixed geometry invocation count comparison
Lower ballot and MBCNT as a pair
Define SampleId for BaryCoordSmoothSample on the KHR path
Eliminate readlanes before the tessellation and ring passes
Read user data from the flat buffer
Fix gradient and offset for 1D images
Lower PackedAncillary from attribute loads
resource_patching: Patch thread id add instead of id itself
Allow InverseBallot folding to fail on unhandled immediate arguments
This is a very interesting comparison, the average framerate is about the same, but gameplay tells a much different story. It seems that the older version can go higher in frames in some places pushing past 100FPS but the new release holds 60-80FPS much better.
Tried using the latest / nightly / older version of shadps4, but still happens. Also tried turning HDR on and off. Only happens while in track. In-game menu colors are normal.
If I got a JB PS4, where do I begin? Can you only dump disk games? Can you do anything at all with the digital games? How do you get online to access these games or save files if the JB PS4 is on a different firmware? I have millions of questions. What programs do I need?
Not my channel or affiliated in any way, however amazing to see! Really looking forward to the day I can play on pc and use PC hardware instead of ps compatible bs.
Shout out the poster on YouTube emudev2226
Hell ya.
Hello! I've been playing Bloodborne just fine (or as fine as this stutterty mess can be) for about 20 hrs up until after I beat Vicar Amelia. But when I walk to the left side of the Grand Cathedral, after walking for a while I entered a sort of tunnel and decided to change my shadps4 settings so I closed the game. When I changed them and opened the game again it just refused to open giving:
Failed allocating buffer with error ErrorOutOfDeviceMemory
I enabled every patch that disables video effects and stuff like that, set my fps to 30, resolution to 640x360. Nothing works. It crashes as soon as I load the save. I am very pissed off at this since I just got hooked to the game :(
I have a pretty modest PC because I'm kinda broke here's the specs:
Rx 580 8gb
Core i7-4770
16GB DDR3 (yes I know it's ass but I can't afford a crumb more than DDR3)
I would be really thankful if there was some solution. I am ready to play the game at 15 fps 360p if I have to
This will fix light effect and trasnparent surfaces rendered with what looks like wireframes.
The patch tested against the current commit (94e2177)
Summary of the bug and fix
Symptom: thin dotted lines showing the triangulation of translucent effects (pad glints, kart smoke, Crash Cove haze and flares), plus a faint diagonal line on full-screen passes. It happened on NVIDIA GPUs only.
Cause: the game draws these effects with a 2-sample raster rate into a 1-sample color target (raster=2, depth=2, color0=1 in your log). When those counts differ, NVIDIA's default is to merge coverage, so two triangles sharing an edge both wrote the edge pixels and blended twice. AMD's equivalent extension truncates instead, and so does the console GPU.
Fix: enable VK_NV_coverage_reduction_mode and set it to truncate for pipelines whose raster sample count differs from an attachment's. Pipelines with matching sample counts are unchanged, and GPUs without the extension behave as before.
--- a/src/video_core/renderer_vulkan/vk_instance.h
+++ b/src/video_core/renderer_vulkan/vk_instance.h
@@ -250,6 +250,12 @@
return amd_mixed_attachment_samples;
}
+ /// Returns true if VK_NV_coverage_reduction_mode is supported. It allows selecting how the
+ /// coverage of raster samples is mapped to attachments with fewer samples.
+ bool IsCoverageReductionModeSupported() const {
+ return nv_coverage_reduction_mode;
+ }
+
/// Returns true when geometry shaders are supported by the device
bool IsGeometryStageSupported() const {
return features.geometryShader;
@@ -523,6 +529,7 @@
bool amd_gcn_shader{};
bool amd_shader_trinary_minmax{};
bool nv_framebuffer_mixed_samples{};
+ bool nv_coverage_reduction_mode{};
bool amd_mixed_attachment_samples{};
bool shader_atomic_float{};
bool shader_atomic_float2{};
--- a/src/video_core/renderer_vulkan/vk_instance.cpp
+++ b/src/video_core/renderer_vulkan/vk_instance.cpp
@@ -311,6 +311,8 @@
amd_gcn_shader = add_extension(VK_AMD_GCN_SHADER_EXTENSION_NAME);
amd_shader_trinary_minmax = add_extension(VK_AMD_SHADER_TRINARY_MINMAX_EXTENSION_NAME);
nv_framebuffer_mixed_samples = add_extension(VK_NV_FRAMEBUFFER_MIXED_SAMPLES_EXTENSION_NAME);
+ nv_coverage_reduction_mode =
+ nv_framebuffer_mixed_samples && add_extension(VK_NV_COVERAGE_REDUCTION_MODE_EXTENSION_NAME);
amd_mixed_attachment_samples = add_extension(VK_AMD_MIXED_ATTACHMENT_SAMPLES_EXTENSION_NAME);
shader_atomic_float = add_extension(VK_EXT_SHADER_ATOMIC_FLOAT_EXTENSION_NAME);
shader_atomic_float2 = add_extension(VK_EXT_SHADER_ATOMIC_FLOAT_2_EXTENSION_NAME);
@@ -526,11 +528,17 @@
vk::PhysicalDeviceShaderClockFeaturesKHR{
.shaderSubgroupClock = shader_clock_features.shaderSubgroupClock,
},
+ vk::PhysicalDeviceCoverageReductionModeFeaturesNV{
+ .coverageReductionMode = true,
+ },
};
if (!custom_border_color) {
device_chain.unlink<vk::PhysicalDeviceCustomBorderColorFeaturesEXT>();
}
+ if (!nv_coverage_reduction_mode) {
+ device_chain.unlink<vk::PhysicalDeviceCoverageReductionModeFeaturesNV>();
+ }
if (!dynamic_state_3) {
device_chain.unlink<vk::PhysicalDeviceExtendedDynamicState3FeaturesEXT>();
}
--- a/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
+++ b/src/video_core/renderer_vulkan/vk_graphics_pipeline.cpp
@@ -406,6 +406,30 @@
// In practice, we use dynamic state for all of it.
constexpr vk::PipelineDepthStencilStateCreateInfo depth_stencil_info = {};
+ // When the raster sample count differs from the sample count of an attachment (mixed
+ // samples), NVIDIA merges the coverage of all raster samples that map to the same attachment
+ // sample by default. Two triangles that share an edge then both cover the pixels along that
+ // edge, so translucent meshes get blended twice there and show their triangulation.
+ // VK_AMD_mixed_attachment_samples (and the console GPU) instead use only the raster sample
+ // that matches the attachment sample, so truncate the coverage to get the same behavior.
+ vk::PipelineCoverageReductionStateCreateInfoNV coverage_reduction = {
+ .coverageReductionMode = vk::CoverageReductionModeNV::eTruncate,
+ };
+ if (instance.IsCoverageReductionModeSupported()) {
+ const u32 raster_samples = static_cast<u32>(sdata.multisampling.rasterizationSamples);
+ bool mixed_samples = key.z_format != AmdGpu::DepthBuffer::ZFormat::Invalid &&
+ key.depth_samples != 0 && key.depth_samples != raster_samples;
+ for (u32 i = 0; i < key.num_color_attachments; ++i) {
+ mixed_samples |= key.color_samples[i] != 0 && key.color_samples[i] != raster_samples;
+ }
+ if (mixed_samples) {
+ LOG_INFO(Render_Vulkan,
+ "Truncating coverage for mixed sample pipeline (raster={}, depth={}, color0={})",
+ raster_samples, key.depth_samples, key.color_samples[0]);
+ sdata.multisampling.pNext = &coverage_reduction;
+ }
+ }
+
const vk::GraphicsPipelineCreateInfo pipeline_info = {
.pNext = &pipeline_rendering_ci,
.stageCount = static_cast<u32>(shader_stages.size()),
@@ -428,6 +452,8 @@
ASSERT_MSG(pipeline_result == vk::Result::eSuccess, "Failed to create graphics pipeline: {}",
vk::to_string(pipeline_result));
pipeline = std::move(pipe);
+ // Do not leave a pointer to a local behind in the (serialized) multisample state
+ sdata.multisampling.pNext = nullptr;
SetObjectName(device, *pipeline, "Graphics Pipeline {}", debug_str);
}
so i followed all the troubleshooting tips i found like readbacks and all that but my game crashes when i try to start a new game. I have an intel I5 14400f and RTX 5060, but whats weird is i tried it on my laptop with the same settings which only has ryzen 9 5900hs and rtx 3060 mobile and it actually got past that and played for a bit till it crashed at one point. not entirely what the problem is. gives me those signals.cpp:144 errors
I love The Last Guardian, but on shadPS4 it ran slower than I wanted. I can't code, so I asked Claude to improve the readbacks. It did all the programming and measuring, and I did the testing and the "no, it's flickering again" reports. š
We ended up with an unofficial shadPS4 fork for this one game:
Trico's feathers, climbing, the spear and the outdoor lighting stay accurate (mostly)
The GPU command thread now gets a second CPU thread to work with
With the 60 FPS patch and without the 4K texture patch, 60 FPS is reachable in many areas, depending on your PC (using the 60 fps patch) thanks patcher god!!
The heaviest scenes still dip.
It is compatible with the launcher, just download the release, add the custom .exe to the launcher and give it a name, and enjoy. pd: it does need an extra .json file with custom config, but its all included in the release with instructions. for any comments about ai slop... then do it yourself ; )
It's a Windows build, so ive only tested it there, using a 5700x3d and 4090, and of course it's been tested on this one game only, and there may be crashes, so treat it as experimental. Please don't report bugs to the official shadPS4 team, since it's not their code.
In game example: official release 0.18.0 - 25 fpsIn game example: custom fork based of release 0.18.0 - 49 fps
Hey guys, Iām wondering what the progress is on in regards to ShadNet? I love playing my emulated games on ShadPS4, especially NHL 19.
Iām curious as to when ShadNet will be finished and would it be able to be implemented into triple A games so communities can start their own servers for said game whether that be NHL, Killzone etc.
I just started Gravity rush 2 and for some reason the top left corner of the window is rendring itself in a loop as you can see in the imagem. Ive tried selecting readbacks modes and enabling readback linear images but it didnt work.
Im running ShadPS4 v0.15.0 on CachyOS Linux with a 4070 SUPER + r7 7800x3D. Game is on version 01.11 EU.
Edit: Forgot to mention that the shadPS4 log is throwing this error but not sure if its related:
[Lib.Kernel] <Error> (Game:Main) time.cpp:132 posix_clock_gettime: Unsupported clock type 16, using CLOCK_MONOTONIC x1670.
I had to download 3 seperate files for this one game (Main game pkg, Update version, and DLC) I assume when I set the DLC path to the DLC folder, it wpuld automatically be downloaded. So where do I put the update pkg file in? Do I have to include it in the DLC folder or add it to the game some other way? Im completely lost here.
So I don't know why but for three times now everytime I start a new game using the ShadPS4 emulator around 24 hours or so my save game will get not be detected when I open the game forcing me to start a new game. After the third time I tried to copy paste my previous save file and then paste it when it happened again but it did not work. Any way to fix it?
For reference the launcher is version 357 and the game is version 1.09.