Merge pull request #1061: let a validation run with DLSS finish, a valid OpSelect in the motion fragment shader and set 1 bound first for the motion draws (itaskaev2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-11-10 17:43:41 +03:00
commit 719196f183
3 files changed
+45 -29

No files matched your search

+9
View File
@@ -2865,6 +2865,15 @@ static void mo_emit(VkCommandBuffer cb) {
if (!p || memcmp(q->bias, p->bias, sizeof q->bias)) vkCmdSetDepthBias(cb, q->bias[0], q->bias[1], q->bias[2]);
uint32_t n_sets = info->n_sets ? info->n_sets : 1;
const VkDescSlot *d = MQ.desc + q->desc;
// Under the validation layer, a new layout binds set 1 before set 0 is pushed, as the replay's draws do
// (bind_descriptors, the comment at set1_first): the layer (SDK 1.4.363) keeps the push set it made for an
// earlier INDEPENDENT_SETS layout and drops writes to bindings that layout lacks, then reports the motion draw's
// last-frame banks as missing (VUID-vkCmdDrawIndexed-None-08114, "vp_c20") and faults inside the layer. The bind
// at set 1 disturbs set 0, so the push below gets a new push set.
if (n_sets == 2 && lay[0] != info->layout && info->push && !info->push1 && q->set[1] && vk_ctx()->validation) {
vkCmdBindDescriptorSets(cb, VK_PIPELINE_BIND_POINT_GRAPHICS, info->layout, 1, 1, &q->set[1], 0, NULL);
bound[1] = q->set[1], lay[1] = info->layout, pinfo[1] = info, pdesc[1] = -1, MO.e_sets++;
}
for (uint32_t s = 0, i0 = 0, k0 = 0; s < n_sets && s < 2; s++) {
uint32_t i1 = i0, k1 = k0;
while (i1 < info->n_bindings && (n_sets == 1 || info->bindings[i1].set == s))
+30 -28
View File
@@ -1,7 +1,7 @@
// Generated by tools/make_mvobj_fs.py: the per-object motion fragment shader (vk_mvobj.c). Do not edit.
#define MVOBJ_FS_LOCATION_WORD 24 // the input Location literal, patched to the variant's
static const uint32_t mvobj_fs_spv[] = {
0x07230203, 0x00010000, 0x00000000, 0x00000034, 0x00000000, 0x00020011, 0x00000001, 0x0003000e,
0x07230203, 0x00010000, 0x00000000, 0x00000036, 0x00000000, 0x00020011, 0x00000001, 0x0003000e,
0x00000000, 0x00000001, 0x0008000f, 0x00000004, 0x00000001, 0x6e69616d, 0x00000000, 0x0000000e,
0x0000000f, 0x00000010, 0x00030010, 0x00000001, 0x00000007, 0x00040047, 0x0000000e, 0x0000001e,
0x00000000, 0x00040047, 0x0000000f, 0x0000000b, 0x0000000f, 0x00040047, 0x00000010, 0x0000001e,
@@ -9,31 +9,33 @@ static const uint32_t mvobj_fs_spv[] = {
0x00000000, 0x00040047, 0x00000011, 0x00000022, 0x00000000, 0x00040047, 0x00000011, 0x00000021,
0x00000001, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00030016, 0x00000004,
0x00000020, 0x00040017, 0x00000005, 0x00000004, 0x00000002, 0x00040017, 0x00000006, 0x00000004,
0x00000004, 0x00040015, 0x00000007, 0x00000020, 0x00000000, 0x00020014, 0x00000008, 0x00040020,
0x00000009, 0x00000001, 0x00000006, 0x00040020, 0x0000000a, 0x00000003, 0x00000006, 0x0003001e,
0x0000000b, 0x00000006, 0x00040020, 0x0000000c, 0x00000002, 0x0000000b, 0x00040020, 0x00000017,
0x00000002, 0x00000006, 0x0004002b, 0x00000004, 0x00000012, 0x3f000000, 0x0004002b, 0x00000004,
0x00000013, 0x00000000, 0x0004002b, 0x00000004, 0x00000014, 0x358637bd, 0x0004002b, 0x00000007,
0x00000015, 0x00000000, 0x0007002c, 0x00000006, 0x00000016, 0x00000013, 0x00000013, 0x00000013,
0x00000013, 0x0004003b, 0x00000009, 0x0000000e, 0x00000001, 0x0004003b, 0x00000009, 0x0000000f,
0x00000001, 0x0004003b, 0x0000000a, 0x00000010, 0x00000003, 0x0004003b, 0x0000000c, 0x00000011,
0x00000002, 0x00050036, 0x00000002, 0x00000001, 0x00000000, 0x00000003, 0x000200f8, 0x00000018,
0x00050041, 0x00000017, 0x00000019, 0x00000011, 0x00000015, 0x0004003d, 0x00000006, 0x0000001a,
0x00000019, 0x0004003d, 0x00000006, 0x0000001b, 0x0000000e, 0x0004003d, 0x00000006, 0x0000001c,
0x0000000f, 0x0007004f, 0x00000005, 0x0000001d, 0x0000001c, 0x0000001c, 0x00000000, 0x00000001,
0x0007004f, 0x00000005, 0x0000001e, 0x0000001a, 0x0000001a, 0x00000002, 0x00000003, 0x00050083,
0x00000005, 0x0000001f, 0x0000001d, 0x0000001e, 0x00050051, 0x00000004, 0x00000020, 0x0000001b,
0x00000000, 0x00050051, 0x00000004, 0x00000021, 0x0000001b, 0x00000001, 0x00050051, 0x00000004,
0x00000022, 0x0000001b, 0x00000003, 0x00050088, 0x00000004, 0x00000023, 0x00000020, 0x00000022,
0x00050088, 0x00000004, 0x00000024, 0x00000021, 0x00000022, 0x00050051, 0x00000004, 0x00000025,
0x0000001a, 0x00000000, 0x00050051, 0x00000004, 0x00000026, 0x0000001a, 0x00000001, 0x00050085,
0x00000004, 0x00000027, 0x00000023, 0x00000012, 0x00050081, 0x00000004, 0x00000028, 0x00000027,
0x00000012, 0x00050085, 0x00000004, 0x00000029, 0x00000028, 0x00000025, 0x00050085, 0x00000004,
0x0000002a, 0x00000024, 0x00000012, 0x00050083, 0x00000004, 0x0000002b, 0x00000012, 0x0000002a,
0x00050085, 0x00000004, 0x0000002c, 0x0000002b, 0x00000026, 0x00050051, 0x00000004, 0x0000002d,
0x0000001f, 0x00000000, 0x00050051, 0x00000004, 0x0000002e, 0x0000001f, 0x00000001, 0x00050083,
0x00000004, 0x0000002f, 0x00000029, 0x0000002d, 0x00050083, 0x00000004, 0x00000030, 0x0000002c,
0x0000002e, 0x00070050, 0x00000006, 0x00000031, 0x0000002f, 0x00000030, 0x00000013, 0x00000013,
0x000500ba, 0x00000008, 0x00000032, 0x00000022, 0x00000014, 0x000600a9, 0x00000006, 0x00000033,
0x00000032, 0x00000031, 0x00000016, 0x0003003e, 0x00000010, 0x00000033, 0x000100fd, 0x00010038
0x00000004, 0x00040015, 0x00000007, 0x00000020, 0x00000000, 0x00020014, 0x00000008, 0x00040017,
0x00000018, 0x00000008, 0x00000004, 0x00040020, 0x00000009, 0x00000001, 0x00000006, 0x00040020,
0x0000000a, 0x00000003, 0x00000006, 0x0003001e, 0x0000000b, 0x00000006, 0x00040020, 0x0000000c,
0x00000002, 0x0000000b, 0x00040020, 0x00000017, 0x00000002, 0x00000006, 0x0004002b, 0x00000004,
0x00000012, 0x3f000000, 0x0004002b, 0x00000004, 0x00000013, 0x00000000, 0x0004002b, 0x00000004,
0x00000014, 0x358637bd, 0x0004002b, 0x00000007, 0x00000015, 0x00000000, 0x0007002c, 0x00000006,
0x00000016, 0x00000013, 0x00000013, 0x00000013, 0x00000013, 0x0004003b, 0x00000009, 0x0000000e,
0x00000001, 0x0004003b, 0x00000009, 0x0000000f, 0x00000001, 0x0004003b, 0x0000000a, 0x00000010,
0x00000003, 0x0004003b, 0x0000000c, 0x00000011, 0x00000002, 0x00050036, 0x00000002, 0x00000001,
0x00000000, 0x00000003, 0x000200f8, 0x00000019, 0x00050041, 0x00000017, 0x0000001a, 0x00000011,
0x00000015, 0x0004003d, 0x00000006, 0x0000001b, 0x0000001a, 0x0004003d, 0x00000006, 0x0000001c,
0x0000000e, 0x0004003d, 0x00000006, 0x0000001d, 0x0000000f, 0x0007004f, 0x00000005, 0x0000001e,
0x0000001d, 0x0000001d, 0x00000000, 0x00000001, 0x0007004f, 0x00000005, 0x0000001f, 0x0000001b,
0x0000001b, 0x00000002, 0x00000003, 0x00050083, 0x00000005, 0x00000020, 0x0000001e, 0x0000001f,
0x00050051, 0x00000004, 0x00000021, 0x0000001c, 0x00000000, 0x00050051, 0x00000004, 0x00000022,
0x0000001c, 0x00000001, 0x00050051, 0x00000004, 0x00000023, 0x0000001c, 0x00000003, 0x00050088,
0x00000004, 0x00000024, 0x00000021, 0x00000023, 0x00050088, 0x00000004, 0x00000025, 0x00000022,
0x00000023, 0x00050051, 0x00000004, 0x00000026, 0x0000001b, 0x00000000, 0x00050051, 0x00000004,
0x00000027, 0x0000001b, 0x00000001, 0x00050085, 0x00000004, 0x00000028, 0x00000024, 0x00000012,
0x00050081, 0x00000004, 0x00000029, 0x00000028, 0x00000012, 0x00050085, 0x00000004, 0x0000002a,
0x00000029, 0x00000026, 0x00050085, 0x00000004, 0x0000002b, 0x00000025, 0x00000012, 0x00050083,
0x00000004, 0x0000002c, 0x00000012, 0x0000002b, 0x00050085, 0x00000004, 0x0000002d, 0x0000002c,
0x00000027, 0x00050051, 0x00000004, 0x0000002e, 0x00000020, 0x00000000, 0x00050051, 0x00000004,
0x0000002f, 0x00000020, 0x00000001, 0x00050083, 0x00000004, 0x00000030, 0x0000002a, 0x0000002e,
0x00050083, 0x00000004, 0x00000031, 0x0000002d, 0x0000002f, 0x00070050, 0x00000006, 0x00000032,
0x00000030, 0x00000031, 0x00000013, 0x00000013, 0x000500ba, 0x00000008, 0x00000033, 0x00000023,
0x00000014, 0x00070050, 0x00000018, 0x00000034, 0x00000033, 0x00000033, 0x00000033, 0x00000033,
0x000600a9, 0x00000006, 0x00000035, 0x00000034, 0x00000032, 0x00000016, 0x0003003e, 0x00000010,
0x00000035, 0x000100fd, 0x00010038
};
+6 -1
View File
@@ -80,6 +80,7 @@ t_pin, t_pout, t_struct, t_pu, t_pf_u = a.id(), a.id(), a.id(), a.id(), a.id()
v_prev, v_frag, v_out, v_p = a.id(), a.id(), a.id(), a.id()
c_half, c_zero, c_eps, c_u0, c_vzero = a.id(), a.id(), a.id(), a.id(), a.id()
t_pv4u = a.id()
t_bv4 = a.id()
a.op('entry', OpEntryPoint, 4, main, *string('main'), v_prev, v_frag, v_out) # Fragment
a.op('exec', OpExecutionMode, main, 7) # OriginUpperLeft
a.loc_ins = a.op('dec', OpDecorate, v_prev, Location, 0)
@@ -96,6 +97,7 @@ a.op('types', OpTypeVector, t_v2, t_f, 2)
a.op('types', OpTypeVector, t_v4, t_f, 4)
a.op('types', OpTypeInt, t_u, 32, 0)
a.op('types', OpTypeBool, t_bool)
a.op('types', OpTypeVector, t_bv4, t_bool, 4)
a.op('types', OpTypePointer, t_pin, Input, t_v4)
a.op('types', OpTypePointer, t_pout, Output, t_v4)
a.op('types', OpTypeStruct, t_struct, t_v4)
@@ -149,7 +151,10 @@ a.op(F, OpFSub, t_f, mx, x3, wx)
a.op(F, OpFSub, t_f, my, y3, wy)
mv = a.id(); a.op(F, OpCompositeConstruct, t_v4, mv, mx, my, c_zero, c_zero)
ok = a.id(); a.op(F, OpFOrdGreaterThan, t_bool, ok, pw, c_eps)
res = a.id(); a.op(F, OpSelect, t_v4, res, ok, mv, c_vzero)
# SPIR-V 1.0 (the module's version): OpSelect of a vector takes a condition vector of the same size; a scalar
# condition is allowed only from 1.4 on, and spirv-val (the validation layer) rejects the module otherwise.
okv = a.id(); a.op(F, OpCompositeConstruct, t_bv4, okv, ok, ok, ok, ok)
res = a.id(); a.op(F, OpSelect, t_v4, res, okv, mv, c_vzero)
a.op(F, OpStore, v_out, res)
a.op(F, OpReturn)
a.op(F, OpFunctionEnd)