mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 14:08:38 +00:00
From the reviews and test runs on #291: - A pipeline without vertex bindings (a full-screen pass from SV_VertexID) no longer declares the vertex-stride dynamic state, which nothing would set (VUID-vkCmdDraw-pStrides-04913; aslan2142, AlxcBTW, ezwinxdlmao). - Logic ops are applied from RenderTarget[0] instead of being logged and ignored (Vonsek's XOR case), and DepthClipEnable = FALSE is depth clamping (AlxcBTW). Both need their feature (logicOp, depthClamp), or the PSO is refused. - The standalone device also enables shaderInt64, shaderFloat64, shaderInt16, shaderClipDistance and shaderCullDistance where the GPU has them (AlxcBTW, whattheflop: VUID-...-pCode-08740), plus logicOp and depthClamp. - Among index entries for one program, a PSO takes the first that fits and declares no set-0 bindings, as pipelines do not bind set 0 yet. This covers the compute group in poke900310's corpus count, where an entry with 10 bindings shadowed a binding-free one. - The command list holds a reference to every root signature and pipeline state it is given until Reset or its release, so releasing them right after Set* (as D3D12 allows) no longer leaves dangling layouts or drops the submission (AlxcBTW). After the rebase onto main: main's SetPredication reads the predicate through the resource's VkBuffer, so a default-heap buffer (a range of the GPU address arena) adds its offset in the arena, and the arena gets the conditional-rendering usage when the extension is on (lahlousaad4's integration note). Tests: d3d12_draw_test has a second pass with a full-screen triangle first in its submission and an XOR quad, and a depth-clamp refusal. d3d12_compute_test releases its root signature and PSO right after setting them, sets the signature again after the arguments, and has a bound entry ahead of the binding-free one in its index. Each new fix, undone on its own, fails a test: pStrides-04913, wrong XOR pixels, a heap-corruption crash without the hold, a refused PSO without the binding-free choice. Documented as known gaps, not fixed here: wave64 subgroup size (AlxcBTW's follow-up in #313), cross-queue waits on one VkQueue and CPU fence signals below a pending GPU signal (woreksami), and the linear buffer_at.
20 lines
793 B
GLSL
20 lines
793 B
GLSL
#version 460
|
|
// A vertex shader with no vertex inputs, written to the translator's runtime contract (docs/design.md, "User data"),
|
|
// standing in for a translated full-screen pass in d3d12_draw_test: its pipeline has no vertex bindings. Vertices 0,
|
|
// 1 and 2 make one triangle that covers the whole viewport, and the colour is yellow.
|
|
|
|
layout(location = 0) out vec4 out_color;
|
|
|
|
layout(push_constant) uniform UserData {
|
|
uint s[32];
|
|
uvec2 heap_base;
|
|
uvec2 code_base;
|
|
} pc;
|
|
|
|
void main() {
|
|
// (-1,-1), (-1,3), (3,-1): clockwise in D3D screen space, so front-facing with the default winding.
|
|
const vec2 corner = vec2(float(gl_VertexIndex & 2), float((gl_VertexIndex << 1) & 2));
|
|
gl_Position = vec4(corner * 2.0 - 1.0, 0.0, 1.0);
|
|
out_color = vec4(1.0, 1.0, 0.0, 1.0);
|
|
}
|