mirror of
https://github.com/par274/sharpemu.git
synced 2026-08-02 07:59:44 +08:00
[AGC/Vulkan] Extend PS5 runtime and rendering compatibility (#216)
* [Core] Add POSIX native execution and PS5 SELF support Extend the native backend, guest TLS, fixed-address memory, and loader paths needed by PS5 titles on Windows, Linux, and macOS. Keep workstation GC so high-core-count hosts do not reserve over fixed guest image bases. * [HLE] Expand PS5 service and media compatibility Add the kernel, threading, save-data, networking, audio, video-codec, font, dialog, and service exports required by newer PS5 software. Preserve every SysAbi NID currently registered by main while adding the compatibility surface used by ASTRO BOT. * [AGC/Vulkan] Extend Gen5 shader and presentation support Expand PM4 handling, Gen5 shader translation, MRT and packed export support, guest image tracking, depth initialization, texture aliasing, and Vulkan presentation. Add the performance overlay and address-filtered diagnostics used to validate ASTRO BOT with original shaders. * [Core] Align static TLS reservation across hosts * [Pad] Align primary user ID with UserService * [Gpu] Preserve runtime scalar buffers across renderer seam * [AGC] Restore omitted command helper exports * [Vulkan] Reuse primary views for promoted MRT targets * [Vulkan] Preserve scratch storage bindings in compute dispatches
This commit is contained in:
@@ -33,7 +33,9 @@ internal interface IGuestGpuBackend
|
||||
int globalBufferBase = 0,
|
||||
int totalGlobalBufferCount = -1,
|
||||
int imageBindingBase = 0,
|
||||
int scalarRegisterBufferIndex = -1);
|
||||
int scalarRegisterBufferIndex = -1,
|
||||
int requiredVertexOutputCount = 0,
|
||||
ulong storageBufferOffsetAlignment = 1);
|
||||
|
||||
bool TryCompilePixelShader(
|
||||
Gen5ShaderState state,
|
||||
@@ -44,7 +46,10 @@ internal interface IGuestGpuBackend
|
||||
int globalBufferBase = 0,
|
||||
int totalGlobalBufferCount = -1,
|
||||
int imageBindingBase = 0,
|
||||
int scalarRegisterBufferIndex = -1);
|
||||
int scalarRegisterBufferIndex = -1,
|
||||
uint pixelInputEnable = 0,
|
||||
uint pixelInputAddress = 0,
|
||||
ulong storageBufferOffsetAlignment = 1);
|
||||
|
||||
bool TryCompileComputeShader(
|
||||
Gen5ShaderState state,
|
||||
@@ -53,7 +58,14 @@ internal interface IGuestGpuBackend
|
||||
uint localSizeY,
|
||||
uint localSizeZ,
|
||||
out IGuestCompiledShader? shader,
|
||||
out string error);
|
||||
out string error,
|
||||
int totalGlobalBufferCount = -1,
|
||||
int initialScalarBufferIndex = -1,
|
||||
uint waveLaneCount = 32,
|
||||
ulong storageBufferOffsetAlignment = 1);
|
||||
|
||||
/// <summary>Returns the backend's no-color-output fragment shader.</summary>
|
||||
IGuestCompiledShader GetDepthOnlyFragmentShader();
|
||||
|
||||
void HideSplashScreen();
|
||||
|
||||
@@ -78,6 +90,21 @@ internal interface IGuestGpuBackend
|
||||
IReadOnlyList<GuestVertexBuffer>? vertexBuffers = null,
|
||||
GuestRenderState? renderState = null);
|
||||
|
||||
void SubmitDepthOnlyTranslatedDraw(
|
||||
IGuestCompiledShader pixelShader,
|
||||
IReadOnlyList<GuestDrawTexture> textures,
|
||||
IReadOnlyList<GuestMemoryBuffer> globalMemoryBuffers,
|
||||
uint attributeCount,
|
||||
GuestDepthTarget depthTarget,
|
||||
IGuestCompiledShader? vertexShader = null,
|
||||
uint vertexCount = 3,
|
||||
uint instanceCount = 1,
|
||||
uint primitiveType = 4,
|
||||
GuestIndexBuffer? indexBuffer = null,
|
||||
IReadOnlyList<GuestVertexBuffer>? vertexBuffers = null,
|
||||
GuestRenderState? renderState = null,
|
||||
ulong shaderAddress = 0);
|
||||
|
||||
void SubmitOffscreenTranslatedDraw(
|
||||
IGuestCompiledShader pixelShader,
|
||||
IReadOnlyList<GuestDrawTexture> textures,
|
||||
@@ -90,7 +117,9 @@ internal interface IGuestGpuBackend
|
||||
uint primitiveType = 4,
|
||||
GuestIndexBuffer? indexBuffer = null,
|
||||
IReadOnlyList<GuestVertexBuffer>? vertexBuffers = null,
|
||||
GuestRenderState? renderState = null);
|
||||
GuestRenderState? renderState = null,
|
||||
GuestDepthTarget? depthTarget = null,
|
||||
ulong shaderAddress = 0);
|
||||
|
||||
void SubmitStorageTranslatedDraw(
|
||||
IGuestCompiledShader pixelShader,
|
||||
@@ -98,16 +127,28 @@ internal interface IGuestGpuBackend
|
||||
IReadOnlyList<GuestMemoryBuffer> globalMemoryBuffers,
|
||||
uint attributeCount,
|
||||
uint width,
|
||||
uint height);
|
||||
uint height,
|
||||
ulong shaderAddress = 0);
|
||||
|
||||
void SubmitComputeDispatch(
|
||||
long SubmitComputeDispatch(
|
||||
ulong shaderAddress,
|
||||
IGuestCompiledShader computeShader,
|
||||
IReadOnlyList<GuestDrawTexture> textures,
|
||||
IReadOnlyList<GuestMemoryBuffer> globalMemoryBuffers,
|
||||
uint groupCountX,
|
||||
uint groupCountY,
|
||||
uint groupCountZ);
|
||||
uint groupCountZ,
|
||||
uint baseGroupX,
|
||||
uint baseGroupY,
|
||||
uint baseGroupZ,
|
||||
uint localSizeX,
|
||||
uint localSizeY,
|
||||
uint localSizeZ,
|
||||
bool isIndirect,
|
||||
bool writesGlobalMemory,
|
||||
uint threadCountX = uint.MaxValue,
|
||||
uint threadCountY = uint.MaxValue,
|
||||
uint threadCountZ = uint.MaxValue);
|
||||
|
||||
bool TrySubmitGuestImage(
|
||||
ulong address,
|
||||
@@ -115,6 +156,14 @@ internal interface IGuestGpuBackend
|
||||
uint height,
|
||||
uint pitchInPixel);
|
||||
|
||||
bool TrySubmitOrderedGuestImageFlip(
|
||||
int videoOutHandle,
|
||||
int displayBufferIndex,
|
||||
ulong address,
|
||||
uint width,
|
||||
uint height,
|
||||
uint pitchInPixel);
|
||||
|
||||
/// <summary>Registers a display buffer with its guest texture format tag.</summary>
|
||||
void RegisterKnownDisplayBuffer(ulong address, uint guestFormat);
|
||||
|
||||
@@ -126,10 +175,12 @@ internal interface IGuestGpuBackend
|
||||
uint sourceWidth,
|
||||
uint sourceHeight,
|
||||
uint sourceFormat,
|
||||
uint sourceNumberType,
|
||||
ulong destinationAddress,
|
||||
uint destinationWidth,
|
||||
uint destinationHeight,
|
||||
uint destinationFormat);
|
||||
uint destinationFormat,
|
||||
uint destinationNumberType);
|
||||
|
||||
/// <summary>
|
||||
/// Whether the backend supports the guest render-target format, and how its pixel
|
||||
|
||||
Reference in New Issue
Block a user