diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 5fbdd778c2..e444ecfa89 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -230,6 +230,7 @@ jobs: tests/startup_buffer_address_check.py \ tests/startup_smem_address_check.py \ tests/startup_stream_fetch_check.py \ + tests/startup_stream_interface_check.py \ tests/compute_alu_cmp_ne_check.py \ tests/compute_entry_layout_check.py \ tests/compute_alu_bcnt64_check.py \ diff --git a/AGENTS.md b/AGENTS.md index 365b0df6a6..0d73cce006 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -170,6 +170,7 @@ python3 -m venv out/pe-env ./out/pe-env/bin/python -B tests/startup_buffer_address_check.py ./out/pe-env/bin/python -B tests/startup_smem_address_check.py ./out/pe-env/bin/python -B tests/startup_stream_fetch_check.py +./out/pe-env/bin/python -B tests/startup_stream_interface_check.py ./out/pe-env/bin/python -B tests/compute_alu_cmp_ne_check.py ./out/pe-env/bin/python -B tests/compute_entry_layout_check.py ./out/pe-env/bin/python -B tests/compute_alu_bcnt64_check.py diff --git a/CMakeLists.txt b/CMakeLists.txt index 47eefe9acd..4129fac3ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2504,6 +2504,10 @@ if(EXISTS "${INTAKE_PYTHON}") "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_fetch_check.py" "$" "${backend}") set_tests_properties(startup_stream_fetch_${backend} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) + add_test(NAME startup_stream_interface_${backend} COMMAND "${CMAKE_COMMAND}" -E env "X2W_FXC=${STARTUP_FXC}" + "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_interface_check.py" + "$" "${backend}") + set_tests_properties(startup_stream_interface_${backend} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77) add_test(NAME startup_stream_depth_${backend} COMMAND "${CMAKE_COMMAND}" -E env "X2W_FXC=${STARTUP_FXC}" "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_depth_check.py" "$" "${backend}") @@ -2581,6 +2585,9 @@ if(EXISTS "${INTAKE_PYTHON}") # Stream vertex fetch from the input layout: the translator-only cases (draws: startup_stream_fetch_). add_test(NAME startup_stream_fetch_translate COMMAND "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_fetch_check.py") + # Stream stage interface by semantic: the translator-only cases (draws: startup_stream_interface_). + add_test(NAME startup_stream_interface_translate COMMAND "${INTAKE_PYTHON}" -B + "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_stream_interface_check.py") # Startup shader translator: descriptor offsets inside wide scalar loads (no game data). add_test(NAME startup_translator COMMAND "${INTAKE_PYTHON}" -B "${CMAKE_CURRENT_SOURCE_DIR}/tests/startup_translator_check.py") diff --git a/docs/startup-runtime.md b/docs/startup-runtime.md index f20261bc16..6f7eac40fb 100644 --- a/docs/startup-runtime.md +++ b/docs/startup-runtime.md @@ -115,8 +115,48 @@ these refusals: - a record of kind 7, or one that reaches past v255; - a header record count that disagrees with the table. -The pixel stage still reads attribute N from vertex output N. It does not yet pair the two by semantic, so a -pixel shader that reads only some of the vertex outputs can receive the wrong one. That is a separate problem. +## Stream stage interface by semantic + +In a slot-86 stream pipeline, the pixel shader's attribute N is not vertex parameter N. Each container states its +side of the interface in its native header: +- **Vertex shader:** from +0x1dc, one 6-byte record per exported parameter: kind 6, output-signature register, + parameter index, then three zero bytes. The count is at +0x29c. +- **Pixel shader** (a header of 0xef8 bytes): from +0x138, one 8-byte record per attribute: kind 6, input-signature + register, component mask, attribute index, two zero bytes, the register again, and interpolation 1 or 2. The + count is at +0x238. + +`gfx2hlsl.py` links each attribute to the vertex parameter whose output register carries the same semantics with the +same components as the attribute's input register. Raw programs without signatures still pair by number. A pixel shader that declares no inputs reads no tables, and any attribute read it makes is refused. + +The translation is refused when: +- a record has any other values (these forms pack two signature registers into one parameter or attribute), or the + pixel table lists one register twice; +- a pixel record's component mask differs from the input signature's mask for its register; +- a semantic of the attribute's register has no vertex output with the same semantic index and the same components. + So a four-component vertex output that feeds a two-component pixel input is refused; +- the attribute's semantics come from more than one vertex register; +- either header has another size; +- the code reads an attribute the table does not list. + +The shader cache revision is `x2w-startup-shader-8`, so translations paired by number are not reused. + +The record layouts were checked offline against the signatures of one title's shader archive (local files only, not +in the repository). The counts below apply the translator's own record checks. +- **Vertex shaders:** the population is the 2,041 programs whose native image inflates. 1,536 have only simple + records. Of the 1,983 whose code also decodes, 1,496 have simple records that match the output signature register + for register, with parameters in register order. 505 use packed records and are refused when a pixel stage with + inputs needs them. +- **Pixel shaders:** the population is the 10,862 programs whose image inflates and whose input signature declares + a non-system input. 5,975 have only simple records, and each record's mask equals the signature mask. 4,887 use + packed or other records and are refused. The 1,239 without inputs need no table. + +The translator-only cases need no device: `python -B tests/startup_stream_interface_check.py`, or +`ctest --preset release --no-tests=error -R "^startup_stream_interface_translate$"`. They check that attribute 0 +reads the TEXCOORD parameter, and they check each refusal. The draw is +`ctest --preset release --no-tests=error -R "^startup_stream_interface_(warp|hardware)$" -V`, after building +`startup_stream_consumer`. The vertex shader exports a constant COLOR as parameter 0 and a varying TEXCOORD as +parameter 1. The pixel shader reads only TEXCOORD, as attribute 0. On an 8×4 target, red follows TEXCOORD column by +column. The same pipeline translated with pairing by number reads COLOR and fails the check. ## Output window and fallback diagnostics diff --git a/src/startup_stubs/d3d12_draw.inl b/src/startup_stubs/d3d12_draw.inl index f12dd8038b..74db9e03e9 100644 --- a/src/startup_stubs/d3d12_draw.inl +++ b/src/startup_stubs/d3d12_draw.inl @@ -204,7 +204,7 @@ Translation* cached_translation(const void* a, std::size_t a_bytes, const void* { // Keep pre-fix desktop bytecode and manifests out of this ABI's cache. // tools/startup/gfx2hlsl.py hashes the same bytes, without a trailing NUL. - constexpr char revision[] = "x2w-startup-shader-7"; + constexpr char revision[] = "x2w-startup-shader-8"; const u64 seed = fnv_bytes(revision, sizeof(revision) - 1); u64 key = fnv_bytes(root_blob.data(), root_blob.size(), fnv_bytes(b, b_bytes, fnv_bytes(a, a_bytes, seed))); // A stream's input layout (stream_input_layout) feeds the vertex fetch, so it is part of the key. diff --git a/tests/startup_stream_interface_check.py b/tests/startup_stream_interface_check.py new file mode 100644 index 0000000000..740334e8d0 --- /dev/null +++ b/tests/startup_stream_interface_check.py @@ -0,0 +1,245 @@ +"""A slot-86 pixel shader reads the vertex output its interface names, matched by semantic, not by number. + +Source-built gfx1013 code only. The vertex shader computes a full-screen triangle from the vertex id and exports +param0 = COLOR, the constant 0.5, and param1 = TEXCOORD, u = (x + 1) / 2. Its container's interface table lists +COLOR (output register 1) as parameter 0 and TEXCOORD (register 2) as parameter 1. The pixel shader declares COLOR +and TEXCOORD but reads only TEXCOORD; its interface table lists TEXCOORD as attribute 0, which it interpolates and +writes to red. + +Without arguments only the translator cases run (no consumer, device or compiler): + linked: attribute 0 reads vertex parameter 1; an interface whose order matches keeps parameter 0. + refused: a packed pixel record, a vertex record with packing bytes, components that differ between the stages, + a semantic the vertex stage does not output, a pixel header of another size, and an attribute read that + the pixel table does not list. +With a consumer and a backend they run first, then the draw on an 8x4 target (left half drawn): + draw: red follows u = (x + 0.5) / 8 per column (16, 48, 80, 112, each within 1). + numbered: the same pipeline translated with pairing by number (a mutation) reads COLOR, a uniform 128, and fails. +""" +import os +from pathlib import Path +import struct +import subprocess +import sys +import tempfile +import zlib + +from startup_stream_check import gfx2hlsl +from startup_stream_draw_check import vop1, vop2 + +WIDTH, HEIGHT = 8, 4 +VS_BASE, PS_BASE = 0x2f8, 0xef8 +POSITION = ("SV_POSITION", 0, 0, 1, 0xf) # (semantic, index, register, system value, mask) +COLOR = ("COLOR", 0, 1, 0, 0xf) +TEXCOORD = ("TEXCOORD", 0, 2, 0, 0x3) +VS_RECORDS = [(6, 1, 0, 0, 0, 0), (6, 2, 1, 0, 0, 0)] # COLOR -> param0, TEXCOORD -> param1 +PS_RECORDS = [(6, 2, 3, 0, 0, 0, 2, 2)] # TEXCOORD -> attr0, mask 3, linear + + +def vertex_words(): + # x = 2 * ((2*i) & 2) - 1, y = 2 * (i & 2) - 1 (startup_stream_draw_check.vertex), v3 = 0, v4 = 1.0. + words = [vop2(0x1a, 1, 129, 0), vop2(0x1b, 1, 130, 1), vop2(0x1b, 2, 130, 0)] + for v in (1, 2): + words.extend([vop1(6, v, 256 + v), vop2(8, v, 244, v), vop2(3, v, 243, v)]) + words.extend([vop1(1, 3, 128), vop1(1, 4, 242), + vop2(3, 5, 242, 1), vop2(8, 5, 240, 5), # v5 = (x + 1.0) * 0.5 + vop1(1, 6, 240), # v6 = 0.5 + 0xf80000cf, 0x04030201, # exp pos0 v1, v2, v3, v4 + 0xf800020f, 0x06060606, # exp param0 v6, v6, v6, v6 (COLOR) + 0xf8000a1f, 0x06060505, # exp param1 v5, v5, v6, v6 done (TEXCOORD) + 0xbf810000]) + return words + + +def pixel_words(attr=0): + # v2 = interpolated attr.x; exp mrt0 v2, 0, 0, 1.0 done vm. + return [0xc8080000 | attr << 10, 0xc8090001 | attr << 10, vop1(1, 3, 128), vop1(1, 4, 242), + 0xf800180f, 0x04030302, 0xbf810000] + + +def signature(tag, entries): + names, body = b"", b"" + first = 8 + 32 * len(entries) + for name, index, register, system, mask in entries: + body += struct.pack("<6IBBHI", 0, first + len(names), index, system, 3, register, mask, mask, 0, 0) + names += name.encode("ascii") + b"\0" + data = struct.pack(" 1 or (g, b, a) != want[1:]: + return "pixel (%d, %d) is %s, expected %s" % (x, y, (r, g, b, a), want) + return None + + +def draw(directory, consumer, backend, numbered): + cache = directory / "cache" + cache.mkdir(parents=True) + vs, ps, root, output = (directory / name for name in ("vs", "ps", "root", "pixels")) + vs.write_bytes(vertex()) + ps.write_bytes(pixel()) + args = [consumer, vs, ps, root] + env = dict(os.environ, X2W_D3D12_PERMISSIVE="1", X2W_D3D12_LIST_NOOP="1", X2W_D3D12_RENDER="1", + X2W_SHADER_CACHE=str(cache)) + env.setdefault("X2W_D3D12_DEBUG", "0") + subprocess.run(args, env=env, check=True) + key = int(sorted(cache.glob("req_*.a"))[0].name[4:20], 16) + original = gfx2hlsl.stream_interface + if numbered: + gfx2hlsl.stream_interface = lambda vs, ps: None + try: + status = gfx2hlsl.translate_request(str(cache), key) + finally: + gfx2hlsl.stream_interface = original + assert status == "ok", status + result = subprocess.run(args + [backend, output], env=env, capture_output=True, text=True) + print(result.stdout, end="") + if backend == "hardware" and result.returncode == 77: + return None + if result.returncode or "-> drawn;" not in result.stderr: + raise RuntimeError(f"draw failed on {backend}: {result.returncode}\n{result.stderr}") + return output.read_bytes() + + +def check(directory, consumer, backend): + pixels = draw(directory / "linked", consumer, backend, False) + if pixels is None: + print("No D3D12 feature-level 12 hardware adapter") + return 77 + difference = check_pixels(pixels) + if difference: + raise AssertionError("linked: " + difference) + print(f"{backend} draw: red follows TEXCOORD, {[expected_red(x) for x in range(WIDTH // 2)]} within 1") + pixels = draw(directory / "numbered", consumer, backend, True) + if not check_pixels(pixels): + raise AssertionError("pairing by number passed the gradient check") + print(f"{backend} pairing by number: the gradient check fails (red {pixels[0]} in column 0)") + return 0 + + +if __name__ == "__main__": + with tempfile.TemporaryDirectory() as temp: + result = translate_checks(Path(temp) / "translate") + if len(sys.argv) > 1: + result = check(Path(temp), *sys.argv[1:]) + sys.exit(result) diff --git a/tests/startup_translator_check.py b/tests/startup_translator_check.py index 2789cc3568..d2fc0642a9 100644 --- a/tests/startup_translator_check.py +++ b/tests/startup_translator_check.py @@ -210,7 +210,7 @@ def compile_shader(command, **kwargs): return subprocess.CompletedProcess(command, 0, '', '') def pending(configured): - request = ({'vs': b'', 'ps': b''}, b'', (), '', None, {}) + request = ({'vs': b'', 'ps': b''}, b'', (), '', None, {}, None) with fxc_environment(work, configured, os.path.join(work, 'none')), \ mock.patch.object(sys, 'argv', ['gfx2hlsl.py', '--pending', work]), \ mock.patch.object(gfx2hlsl, 'load_request', return_value=request), \ diff --git a/tools/startup/gfx2hlsl.py b/tools/startup/gfx2hlsl.py index 61504378b1..2db1684060 100644 --- a/tools/startup/gfx2hlsl.py +++ b/tools/startup/gfx2hlsl.py @@ -204,6 +204,86 @@ def stream_fetch(vs_container, layout_text): return fetch +# The interface between the two stages of a stream pipeline, as both containers state it in their native headers. +# Vertex: from +0x1dc one 6-byte record per exported parameter (kind 6, output-signature register, parameter index, +# 0, 0, 0), count at +0x29c. Pixel (header 0xef8 bytes): from +0x138 one 8-byte record per attribute (kind 6, +# input-signature register, component mask, attribute index, 0, 0, the register again, interpolation 1 or 2), count +# at +0x238. Records with other values pack two signature registers into one parameter or attribute; that form is +# refused here. +IFACE_VS_RECORDS, IFACE_VS_COUNT, IFACE_PS_HEADER_BASE, IFACE_PS_RECORDS, IFACE_PS_COUNT = 0x1dc, 0x29c, 0xef8, 0x138, 0x238 + + +def signature_entries(part): + """ISG1/OSG1 part -> [(register, semantic name, semantic index, system value, mask)].""" + count, first = struct.unpack_from(' (IFACE_PS_COUNT - IFACE_PS_RECORDS) // 8: + raise Unsupported('pixel input table exceeds its header range') + for i in range(count): + kind, register, mask, attr, b4, b5, again, interp = ps_image[IFACE_PS_RECORDS + 8 * i:IFACE_PS_RECORDS + 8 * i + 8] + if (kind != 6 or attr != i or b4 or b5 or again != register or interp not in (1, 2) or not mask + or mask & ~0xf or register in attributes): + raise Unsupported('unverified pixel input record %s' % ps_image[IFACE_PS_RECORDS + 8 * i:IFACE_PS_RECORDS + 8 * i + 8].hex()) + declared = 0 + for entry in inputs: + if entry[0] == register: + declared |= entry[4] + if mask != declared: + raise Unsupported('pixel input record mask 0x%x differs from the signature mask 0x%x of register %d' + % (mask, declared, register)) + attributes[register] = mask + if not attributes: + return {} + params = {} + count = struct.unpack_from(' (IFACE_VS_COUNT - IFACE_VS_RECORDS) // 6: + raise Unsupported('vertex output table exceeds its header range') + for i in range(count): + kind, register, param, *rest = vs_image[IFACE_VS_RECORDS + 6 * i:IFACE_VS_RECORDS + 6 * i + 6] + if kind != 6 or param != i or any(rest) or register in params: + raise Unsupported('unverified vertex output record %s' % vs_image[IFACE_VS_RECORDS + 6 * i:IFACE_VS_RECORDS + 6 * i + 6].hex()) + params[register] = param + outputs = {} + for register, name, index, system, mask in signature_entries(vs[b'OSG1']): + if system: + continue + if (name, index) in outputs: + raise Unsupported('duplicate vertex output semantic %s%d' % (name, index)) + outputs[name, index] = register, mask + mapping = {} + for attr, (register, mask) in enumerate(attributes.items()): + sources = set() + for _, name, index, _, semantic_mask in (e for e in inputs if e[0] == register): + output = outputs.get((name, index)) + if not output or output[1] != semantic_mask: + raise Unsupported('pixel input %s%d has no vertex output with the same components' % (name, index)) + sources.add(output[0]) + if len(sources) != 1 or next(iter(sources)) not in params: + raise Unsupported('pixel attribute %d does not come from exactly one exported vertex register' % attr) + mapping[attr] = (params[next(iter(sources))], mask) + return mapping + + # Binary32 words for inline source encodings 240 through 248, in encoding order. CNDMASK_INLINE_FLOAT_BITS = (0x3f000000, 0xbf000000, 0x3f800000, 0xbf800000, 0x40000000, 0xc0000000, 0x40800000, 0xc0800000, @@ -1548,9 +1628,17 @@ def op_v_interp_mov_f32(self, ops, mods): def note_attr(self, tok, how): m = re.fullmatch(r'attr(\d+)\.([xyzw])', tok) - attr = int(m.group(1)) + attr, component = int(m.group(1)), m.group(2) + links = getattr(getattr(self, 'pipe', None), 'ps_attr_map', None) # unit probes may have no pipe + if links is not None: # stream pipelines: the vertex parameter the attribute is linked to + if attr not in links: + raise Unsupported('pixel stage reads attribute %d, which its interface table does not list' % attr) + parameter, mask = links[attr] + if not mask & (1 << 'xyzw'.index(component)): + raise Unsupported('pixel stage reads undeclared component %s of attribute %d' % (component, attr)) + attr = parameter self.attrs.setdefault(attr, set()).add(how) - return attr, m.group(2) + return attr, component def mix(self, ops, mods, high): """v_fma_mix{lo,hi}_f16: fma of operands that are f32 or f16 halves; the f16 result goes to one half.""" @@ -2084,8 +2172,9 @@ def parse_root(blob): class Pipeline: def __init__(self, vs_code, ps_code, root_blob, sampler_heap=None, rtv_formats=(), ps_hw_inputs=None, vs_fetch=None, - refusals=None, decoded=None): + refusals=None, decoded=None, ps_attr_map=None): self.root = parse_root(root_blob) + self.ps_attr_map = ps_attr_map # stream_interface(): pixel attribute -> (vertex parameter, component mask); None pairs by number self.vs_fetch = vs_fetch # stream_fetch(): the loads the vertex stage's entry call stands for self.packed_position_vgpr = None if ps_hw_inputs is not None: @@ -2311,7 +2400,7 @@ def fnv(data, h=1469598103934665603): def pipeline_key(vs_code, ps_code, root_blob, layout=b''): """Hash the startup translation revision and the three blobs in runtime order, then a stream's input layout.""" - key = fnv(root_blob, fnv(ps_code, fnv(vs_code, fnv(b'x2w-startup-shader-7')))) + key = fnv(root_blob, fnv(ps_code, fnv(vs_code, fnv(b'x2w-startup-shader-8')))) return fnv(layout, key) if layout else key @@ -2352,14 +2441,15 @@ def has_bytecode(path): return False -def translate_to(out_dir, key, vs_code, ps_code, root_blob, check=True, rtv_formats=(), rtv_request='', vs_fetch=None): +def translate_to(out_dir, key, vs_code, ps_code, root_blob, check=True, rtv_formats=(), rtv_request='', vs_fetch=None, + ps_attr_map=None): """Writes .vs.hlsl, .ps.hlsl and .txt (last), or .fail with the reason. With check, the pair is compiled to .vs.cso and .ps.cso first and a missing fxc is a failure. check=False, or X2W_FXC set to the empty string, publishes the manifest without bytecode.""" name = os.path.join(out_dir, '%016x' % key) try: - pipe = Pipeline(vs_code, ps_code, root_blob, rtv_formats=rtv_formats, vs_fetch=vs_fetch) + pipe = Pipeline(vs_code, ps_code, root_blob, rtv_formats=rtv_formats, vs_fetch=vs_fetch, ps_attr_map=ps_attr_map) vs, ps, manifest = pipe.hlsl_vs(), pipe.hlsl_ps(), pipe.manifest() if rtv_request: manifest += rtv_request + '\n' @@ -2453,7 +2543,7 @@ def classify_stage(blob): layout = open(name + '.ia', 'rb').read() if os.path.isfile(name + '.ia') else b'' if request and pipeline_key(a, b, root, layout) != base: raise Unsupported('RTV variant source key mismatch') - fetch = None + fetch = attr_map = None if a.startswith(b'DXBC') or b.startswith(b'DXBC'): # Slot 86 records complete containers in canonical (VS, PS) order. # Keep the container bytes in the cache key; translate only the bounded native code. @@ -2461,9 +2551,10 @@ def classify_stage(blob): from pixel_aot import container_code from resource_inventory import parts try: - container = a + container, ps_container = a, b a, b = (container_code(parts(blob)[b'DXIL'], stage=stage) for blob, stage in ((a, 1), (b, 0))) + attr_map = stream_interface(container, ps_container) if starts_with_fetch_call(a): fetch = stream_fetch(container, layout.decode('ascii') if layout else None) except (KeyError, ValueError, IndexError, struct.error, zlib.error) as error: @@ -2473,20 +2564,21 @@ def classify_stage(blob): kinds = {'vs': a, 'ps': b} else: kinds = {classify_stage(a): a, classify_stage(b): b} - return kinds, root, formats, request, fetch, decoded + return kinds, root, formats, request, fetch, decoded, attr_map def translate_request(out_dir, key): """Translate a base shader request or an RTV variant referencing its source blobs.""" try: - kinds, root, formats, request, fetch, _ = load_request(out_dir, key) + kinds, root, formats, request, fetch, _, attr_map = load_request(out_dir, key) except (Unsupported, OSError, UnicodeError) as reason: open(os.path.join(out_dir, '%016x.fail' % key), 'w').write(str(reason) + '\n') return 'unsupported: %s' % reason if set(kinds) != {'vs', 'ps'}: open(os.path.join(out_dir, '%016x.fail' % key), 'w').write('stages %s\n' % sorted(kinds)) return 'stages %s' % sorted(kinds) - return translate_to(out_dir, key, kinds['vs'], kinds['ps'], root, rtv_formats=formats, rtv_request=request, vs_fetch=fetch) + return translate_to(out_dir, key, kinds['vs'], kinds['ps'], root, rtv_formats=formats, rtv_request=request, vs_fetch=fetch, + ps_attr_map=attr_map) REFUSALS_CAVEAT = ('Counts after the first refusal are approximate. Skipped instructions leave later state ' @@ -2531,7 +2623,7 @@ def request_refusals(out_dir, key, pair_info=None): """Collect reached refusal sites for one request without publishing a translation.""" refusals = [] try: - kinds, root, formats, _, fetch, decoded = load_request(out_dir, key, refusals, pair_info) + kinds, root, formats, _, fetch, decoded, attr_map = load_request(out_dir, key, refusals, pair_info) except Unsupported as reason: refusals.append((str(reason), 'pipeline')) return refusals @@ -2551,7 +2643,7 @@ def request_refusals(out_dir, key, pair_info=None): if set(kinds) != {'vs', 'ps'}: raise Unsupported('stages %s' % sorted(kinds)) pipe = Pipeline(kinds['vs'], kinds['ps'], root, rtv_formats=formats, vs_fetch=fetch, - refusals=refusals, decoded=decoded) + refusals=refusals, decoded=decoded, ps_attr_map=attr_map) op = 'hlsl_vs' pipe.hlsl_vs() op = 'hlsl_ps'