Repository navigation
Pipelines: blending into an integer render target is switched off for the host (the title's pipeline was refused every run) - #922
MamaLeVrai wants to merge 2 commits into
Conversation
… the host D3D12 refuses a graphics (or mesh) pipeline whose blend state enables blending on a UINT or SINT render target. The title makes such a pipeline (a masked overlay, per ZSlayerHQ/victory-world issue 13) and it was refused every run. GraphicsState::host_blend clears BlendEnable for the integer targets in use and keeps it for the others; without independent blending, target 0's state is copied to all and made independent first. It is used where the blend state goes into the pipeline description or stream. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
One case where this makes a pipeline fail that the host accepts today: a logic op on an integer target. Measured at g.blend.RenderTarget[0].BlendEnable = false.into();
g.blend.RenderTarget[0].LogicOpEnable = true.into();
g.blend.RenderTarget[0].LogicOp = D3D12_LOGIC_OP_XOR;
// make(g.blend): Ok
// make(g.host_blend()): Err 0x80070057 (E_INVALIDARG)Treating a target as affected only if it also blends fixes it; both calls then return let independent = blend.IndependentBlendEnable.as_bool();
let integer = |i: usize| {
let state = &self.blend.RenderTarget[if independent { i } else { 0 }];
integer_format(self.targets.RTFormats[i]) && state.BlendEnable.as_bool()
};I have not looked at whether the title has such a pipeline. AI-assisted (Claude Code); run on my machine, synthetic shaders only, no game data. |
…on one stays valid Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Thank you, you are right. I added your case and took your fix (a target counts only if it is an integer format and its blend is on, with target 0's state standing for all when blending is not independent): Checks on my RX 6950 XT (RDNA2), AI-assisted (Claude Code); no game data. |
…ads raised - A page-mapping copy maps a run of consecutive pages as one view (after pull request fxceless#823 by Felix2180; VICTORY_MAP_RUNS=0: page by page). - Refused 64-lane compute programs and the last structure-builder programs translate per program for 32-lane hosts (the shader half of fxceless#823). - DirectStorage writes into physical pages go through the section's view that is there for good (VICTORY_KEPT_VIEWS=0: a view per request). - The submit, relay, landing and wide threads run at the priorities of the title threads that wait for them (VICTORY_THREAD_PRIORITY=0: not). - A free run of descriptor slots across the cursor is found: the search stopped where its extension past the cursor begins. - The blend fix of fxceless#922 is left out (this tree has one of its own). Co-authored-by: Felix2180 <Felix2180@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
D3D12 refuses a graphics (or mesh) pipeline whose blend state enables blending on a render target of an integer format (
UINTorSINT). The title makes such a pipeline, and it is refused every run: it is the "integer render targets" job (#13) of theZSlayerHQ/victory-worldboard, which describes it as a small masked overlay, not room geometry (I do not know the pipeline myself: I do not look at the game).The change.
GraphicsState::host_blendreturns the blend state the host can make for the targets in use:BlendEnableis cleared for each integer target and kept for the others. Without independent blending, target 0's state stands for every target, so in that case it is copied to all eight and made independent first. With no integer target among those in use (NumRenderTargets), the state is returned as it is, so nothing changes for the pipelines that were made before. It replacesg.blendat the three places where the state goes into a pipeline description or stream (the graphics description and the two mesh streams); the library name still describes the title's own state. Dropping the blend means the overlay is written instead of blended into the target, a visible difference that I cannot judge without running the title.Tests.
blending_into_integer_targets_is_switched_off_and_kept_elsewhere(the state logic: three targets, independent or not, an integer format past the count).a_pipeline_blending_into_an_integer_target_is_made_without_the_blendingcreates a real pipeline on the host device with anR32_UINTtarget: the first assertion is that the host refuses it with the title's blend state (it does, on an RX 6950 XT), the second that it makes it withhost_blend(). It needs the PCdxc.exeand skips without it.Checks. The two tests pass here (Windows 11, RX 6950 XT, Rust 1.98.1). Clippy shows no new lint in
pipeline/host.rs; the base's own lints are still there (PR #841 fixes them). I did not run the whole suite again and I did not run the title.AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code