mirror of
https://github.com/par274/sharpemu.git
synced 2026-07-30 14:39:42 +08:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c1507777c | |||
| 8ebc43e758 |
@@ -88,7 +88,7 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
label: Last Milestone / First Error
|
label: Last Milestone / First Error
|
||||||
description: Paste the **last useful milestone line** or the **first `WARNING`, `ERROR`, or `CRITICAL` line connected to the stop** from the log. `DEBUG`/`TRACE` lines do not count unless a real error follows them.
|
description: Paste the **last useful milestone line** or the **first `WARNING`, `ERROR`, or `CRITICAL` line connected to the stop** from the log. `DEBUG`/`TRACE` lines do not count unless a real error follows them.
|
||||||
placeholder: e.g. CpuEngine: native-only OR [ERROR] Native backend FAILED: ...
|
placeholder: "e.g. CpuEngine: native-only OR [ERROR] Native backend FAILED: ..."
|
||||||
validations:
|
validations:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
|||||||
@@ -3296,10 +3296,60 @@ public static class AgcExports
|
|||||||
globalMemoryBindings,
|
globalMemoryBindings,
|
||||||
vertexInputs,
|
vertexInputs,
|
||||||
renderTargets,
|
renderTargets,
|
||||||
CreateRenderState(state.CxRegisters, renderTargets.FirstOrDefault()));
|
ApplyTransparentPremultipliedFillClear(
|
||||||
|
CreateRenderState(state.CxRegisters, renderTargets.FirstOrDefault()),
|
||||||
|
textures,
|
||||||
|
vertexInputs,
|
||||||
|
pixelEvaluation.InitialScalarRegisters));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static readonly bool _transparentFillClearEnabled = !string.Equals(
|
||||||
|
Environment.GetEnvironmentVariable("SHARPEMU_DISABLE_TRANSPARENT_FILL_CLEAR"),
|
||||||
|
"1",
|
||||||
|
StringComparison.Ordinal);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Chowdren resets its effect layers with an untextured transparent-black
|
||||||
|
/// fill using premultiplied blending. With One/OneMinusSrcAlpha that draw
|
||||||
|
/// is otherwise a no-op, causing fog and vignette layers to accumulate.
|
||||||
|
/// Treat precisely that draw shape as an overwrite.
|
||||||
|
/// </summary>
|
||||||
|
private static VulkanGuestRenderState ApplyTransparentPremultipliedFillClear(
|
||||||
|
VulkanGuestRenderState renderState,
|
||||||
|
IReadOnlyList<TranslatedImageBinding> textures,
|
||||||
|
IReadOnlyList<Gen5VertexInputBinding> vertexInputs,
|
||||||
|
IReadOnlyList<uint> pixelUserData)
|
||||||
|
{
|
||||||
|
if (!_transparentFillClearEnabled ||
|
||||||
|
textures.Count != 0 ||
|
||||||
|
vertexInputs.Count != 0 ||
|
||||||
|
pixelUserData.Count < 4 ||
|
||||||
|
renderState.Blend is not
|
||||||
|
{
|
||||||
|
Enable: true,
|
||||||
|
ColorSrcFactor: 1,
|
||||||
|
ColorDstFactor: 5,
|
||||||
|
ColorFunc: 0,
|
||||||
|
})
|
||||||
|
{
|
||||||
|
return renderState;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (var index = 0; index < 4; index++)
|
||||||
|
{
|
||||||
|
if ((pixelUserData[index] & 0x7FFF_FFFFu) != 0)
|
||||||
|
{
|
||||||
|
return renderState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return renderState with
|
||||||
|
{
|
||||||
|
Blend = renderState.Blend with { Enable = false },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
private static VulkanGuestIndexBuffer? CreateVulkanIndexBuffer(
|
private static VulkanGuestIndexBuffer? CreateVulkanIndexBuffer(
|
||||||
CpuContext ctx,
|
CpuContext ctx,
|
||||||
SubmittedDcbState state,
|
SubmittedDcbState state,
|
||||||
|
|||||||
Reference in New Issue
Block a user