* Fixes PSP emulation with the following changes:
1. Reserved Memory cannot be mapped, this seems to be incorrect and the
PSP emulation relies on reserving then mapping memory at startup.
From other logs, this may affect PS2 emulation as well.
2. Temp directory output may have garbase and the API is not null
terminating the output, resulting in failures when the file
path is not valid.
3. Fix misaligned images when viewport is sized for PSP.
This fixes garbage in movies on the PSP emulator, making the
movies viewable, scaled correctly for the screen.
4. Some PSP moves render incorrectly without sceVideodec2GetAvcPictureInfo
5. Fix dirty hash size calculation and RGB4444 mapping to fix textures
These changes combined allow Jean d'Arc, LocoRoco and Patapon to run
decently.
* fix formatting
* null terminate the temp path rather than using memset
* fix memory mapping in a more correct way
* revert RGB4444 changes as it breaks other games color mapping
[Render.Vulkan] <Error> (shadPS4:GpuComm) vk_platform.cpp:57 DebugUtilsCallback: SYNC-HAZARD-READ-AFTER-WRITE: vkCmdBeginRendering():
READ_AFTER_WRITE hazard detected. vkCmdBeginRendering reads pRenderingInfo.pColorAttachments[0] (VkImageView 0x5f1a0000005f1a[ImageView 1920x1080x1 0x244980000:0x2aa9800 1:1 0:0 (Color)], loadOp VK_ATTACHMENT_LOAD_OP_LOAD), which was previously written during an image layout transition initiated by vkCmdPipelineBarrier2[gfx:0x213a04c50:DrawIndexAuto].
The current synchronization allows
VK_ACCESS_2_SHADER_READ_BIT accesses at VK_PIPELINE_STAGE_2_VERTEX_SHADER_BIT|VK_PIPELINE_STAGE_2_TESSELLATION_CONTROL_SHADER_BIT|VK_PIPELINE_STAGE_2_TESSELLATION_EVALUATION_SHADER_BIT|VK_PIPELINE_STAGE_2_GEOMETRY_SHADER_BIT|VK_PIPELINE_STAGE_2_FRAGMENT_SHADER_BIT|VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT|VK_PIPELINE_STAGE_2_CLUSTER_CULLING_SHADER_BIT_HUAWEI,
VK_ACCESS_2_COLOR_ATTACHMENT_WRITE_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT,
but to prevent this hazard, it must allow VK_ACCESS_2_COLOR_ATTACHMENT_READ_BIT accesses at VK_PIPELINE_STAGE_2_COLOR_ATTACHMENT_OUTPUT_BIT.
* Change buffer check to use num_records instead
* Fix the address fixup check
Since base_address == 0 is possible, this should specifically check against 1 (which we reserve for null buffers).
Kinda shocked TLOU/Uncharted worked at all without setting this.
* renderer_vulkan: Microoptimizations from profiling
* buffer_cache: Only use streaming path on cpu modified memory
If the pages arent cpu modified, then a gpu buffer with valid data exists that can be used instead
* clang format
* fix max num_layers
[Render.Vulkan] <error> (shadPS4:Main) vk_platform.cpp:58 DebugUtilsCallback: VUID-vkDestroyImage-image-01000: vkDestroyImage(): can't be called on VkImage 0x850000000085[Frame image #2] that is currently in use by VkCommandBuffer 0x560ea08752c0[CommandPool: Command Buffer 2].
The Vulkan spec states: All submitted commands that refer to image, either directly or via a VkImageView, must have completed execution (https://docs.vulkan.org/spec/latest/chapters/resources.html#VUID-vkDestroyImage-image-01000)
Finish needed because of:
[Render.Vulkan] <error> (shadPS4:Main) vk_platform.cpp:58 DebugUtilsCallback: VUID-vkEndCommandBuffer-commandBuffer-00059: vkEndCommandBuffer(): Cannot be called for VkCommandBuffer 0x55c62bfbb580[CommandPool: Command Buffer 3] when it is not in a recording state, vkBeginCommandBuffer() must first be called.
The Vulkan spec states: commandBuffer must be in the recording state (https://docs.vulkan.org/spec/latest/chapters/cmdbuffers.html#VUID-vkEndCommandBuffer-commandBuffer-00059)
* using new emulator_settings
* the default user is now just player one
* transfer install, addon dirs
* fix load custom config issue
---------
Co-authored-by: kalaposfos13 <153381648+kalaposfos13@users.noreply.github.com>
* fallback for IMAGE_STORE_MIP when not natively supported
* Lod should be treated as absolute, independent of sharp's base_level (judging by other implemented instructions)
* fix descriptor set layouts
* dumb error
* force fallback for testing
* treat Lod as relative to base_level
* optimization when lod index is constant
* stencil fixes hope it fixes driveclub
* revert image copy to the one that had driveclub worked
* reverted texture cache change
* some more fixes and reverts
* added logging for overlap again
* fixed image copy to ignore stencil aspect
* Added logging for "Encountered unresolvable image overlap with equal memory address."
* fixed overlap issues with different pitch , added more detailed logging for rest of overlap issues
* improved log error
* maybe mipmaps ?
* array layers or different mip map range
* rewrote case new image has fewer mip levels than cached image
* array with 2 layers?
* last case
* improved
* no it didn't work