Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4228,6 +4228,8 @@ if(EXISTS "${INTAKE_PYTHON}")
"${CMAKE_SOURCE_DIR}/tests/startup_sampler_heap_check.py")
add_test(NAME startup_vertex_fetch_formats_controls COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/startup_vertex_fetch_formats_check.py" controls)
add_test(NAME startup_vertex_fetch_sscaled_controls COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/startup_vertex_fetch_sscaled_check.py" controls)
add_test(NAME startup_buffer_address_controls COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/startup_buffer_address_check.py" controls)
add_test(NAME startup_smem_address_controls COMMAND "${INTAKE_PYTHON}" -B
Expand All @@ -4242,6 +4244,11 @@ if(EXISTS "${INTAKE_PYTHON}")
"${CMAKE_SOURCE_DIR}/tests/startup_vertex_fetch_formats_check.py" "${DXC_EXECUTABLE}"
"$<TARGET_FILE:offscreen_check>" ${adapter})
set_tests_properties(startup_vertex_fetch_formats_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
# FORMAT 47 (10_10_10_2 SSCALED), reachable only through a hardware descriptor.
add_test(NAME startup_vertex_fetch_sscaled_${adapter} COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/startup_vertex_fetch_sscaled_check.py" "${DXC_EXECUTABLE}"
"$<TARGET_FILE:offscreen_check>" ${adapter})
set_tests_properties(startup_vertex_fetch_sscaled_${adapter} PROPERTIES TIMEOUT 120 SKIP_RETURN_CODE 77)
add_test(NAME startup_buffer_address_${adapter} COMMAND "${INTAKE_PYTHON}" -B
"${CMAKE_SOURCE_DIR}/tests/startup_buffer_address_check.py" "${DXC_EXECUTABLE}"
"$<TARGET_FILE:offscreen_check>" ${adapter} $<$<BOOL:${STARTUP_FXC}>:${STARTUP_FXC}>)
Expand Down
8 changes: 7 additions & 1 deletion docs/experiments.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,12 @@ The original ten formats matched on WARP 10.0.26100.9818 and on an AMD Radeon RX
ctest --preset dev --no-tests=error -R '^startup_vertex_fetch_formats_(controls|warp|hardware)$' -V
```

`BUF_FMT_10_10_10_2_SSCALED` (format 47) is the first descriptor-only decoded format: no DXGI typed view has this layout, so only a hardware buffer descriptor reaches it and the DXGI table (`DESC_FORMAT_CODES` against `FETCH_DXGI`) does not list it. It reads one dword as four signed fields (x is the 2-bit field in bits 1:0, y, z and w are 10-bit), each sign-extended and converted to float without division, at an unaligned stride. Accepting it changes what an existing `buffer_load_format_*` translation does for format 47, so the startup shader cache revisions are bumped to `x2w-startup-shader-30` and `x2w-startup-shader-30cs` and a cache written before this change is retranslated. Reproduction (a CPU reference compared bit for bit, with mutants for the removed case, dropped sign extension and wrong field order):

```powershell
ctest --preset dev --no-tests=error -R '^startup_vertex_fetch_sscaled_(controls|warp|hardware)$' -V
```

`BUF_FMT_16_16_SNORM` (format 24, DXGI `R16G16_SNORM` 37) sign-extends each half, divides by 32767 and clamps to -1.0, so -32768 and -32767 both give -1.0 (the Direct3D and Vulkan SNORM rule, as in LLVM 15 and Mesa `ac_formats`). The device run compares `round(v * 32767)` against the same byte decode, with a wrong reference that reads the halves unsigned and a mutated translation that does the same. The pattern the harness writes to t0 holds no 0x8000, so `startup_vertex_fetch_formats_controls` also evaluates the emitted expressions on 0x8000, 0x8001, 0x7fff, 0x0000, 0xffff and 0x4000 in each half, and four wrong forms (unsigned read, no clamp, divisor 32768, one half for both) must fail that check. The D3D12 draw has not been run on Linux.

`BUF_FMT_2_10_10_10_UNORM` (gfx10 format 50, DXGI `R10G10B10A2_UNORM` 24) reads one dword with x, y and z as 10-bit fields in bits 9:0, 19:10 and 29:20 and w as the 2-bit field in bits 31:30, each divided by its maximum (1023, 1023, 1023, 3). This is the 10-bit-x layout that Mesa maps R10G10B10A2 to; `BUF_FMT_10_10_10_2_UNORM` (format 44) has a 2-bit x and is not added here. It is checked on Linux by the Python evaluation `startup_gfx2hlsl_tbuffer_2101010`, which also covers the DXGI table entry; the D3D12 draws `startup_vertex_fetch_formats_warp` and `startup_vertex_fetch_formats_hardware` read it back (stride 6 / offset 2 and through the descriptor path).
Expand Down Expand Up @@ -629,7 +635,7 @@ The draw is refused, not read as zeros, whenever a translated formatted load has

Each refusal logs `srv <n>: formatted buffer refused (<reason> <detail>)` for the first 6 occurrences and counts as `formatted-load draws refused` in the `x2w-render totals` line. Because the shader reads the raw copy at `vindex * stride`, the alignment of the upload ring does not constrain 12-byte formats.

`startup_buffer_format_word3_table` checks that the DXGI table equals `DESC_FORMAT_CODES`, agrees with `FETCH_DXGI` and with `formatted_buffer_supported()`; a header that gives `R32G32B32A32_FLOAT` code 74 must fail it. `startup_buffer_format_word3` checks words and refusal reasons, and its `mapping` control, which ignores the view mapping, must fail. `startup_formatted_view_draw_{warp,hardware}` draws one source-built pixel stage through the stand-in: `buffer_load_format_xyzw` with `idxen` of element 1 into an `R32G32B32A32_FLOAT` target, compared as four 32-bit words with distinct sentinels per channel. One translation serves every view:
`startup_buffer_format_word3_table` checks that the DXGI table agrees with `FETCH_DXGI`, maps to `DESC_FORMAT_CODES` and is accepted by `formatted_buffer_supported()`; descriptor-only format 47 has no DXGI entry; a header that gives `R32G32B32A32_FLOAT` code 74 must fail it. `startup_buffer_format_word3` checks words and refusal reasons, and its `mapping` control, which ignores the view mapping, must fail. `startup_formatted_view_draw_{warp,hardware}` draws one source-built pixel stage through the stand-in: `buffer_load_format_xyzw` with `idxen` of element 1 into an `R32G32B32A32_FLOAT` target, compared as four 32-bit words with distinct sentinels per channel. One translation serves every view:

- `R32G32B32A32_FLOAT` and `R16G16B16A16_FLOAT`;
- `R16G16_FLOAT`, whose z and w must be the defaults 0 and 1.0;
Expand Down
2 changes: 1 addition & 1 deletion docs/experiments/native-compile-dxil-rekey.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ This mode runs without `SDK_DIRECTORY` or DXC:
`.m57`, `.rtv`), counts `.m86` markers, and ignores result/diagnostic files
(`.txt`, `.fail`, `.cso`, `.psdep`).
- Validates and recomputes keys in parallel using the current output revision
strings (`x2w-startup-shader-29`, `x2w-startup-shader-29cs`,
strings (`x2w-startup-shader-30`, `x2w-startup-shader-30cs`,
`x2w-startup-mesh-57-3` via shared helpers in `src/shader_compute_request.cpp`),
while the readers retain `x2w-startup-shader-28` and `x2w-startup-shader-28cs`
input compatibility.
Expand Down
8 changes: 4 additions & 4 deletions docs/experiments/native-startup-request-cache.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Startup request consumption and runtime cache publication in `compile_dxil` (#2933)

[The fixture](../../tests/native_startup_request_cache_check.py) verifies that `compile_dxil --requests` consumes
revision-29 startup graphics (`x2w-startup-shader-29`, including ASCII `req_<key>.psin` pixel-input descriptions)
and compute (`x2w-startup-shader-29cs`, `req_<key>.c67`) requests, publishes runtime-named stage binaries and
revision-30 startup graphics (`x2w-startup-shader-30`, including ASCII `req_<key>.psin` pixel-input descriptions)
and compute (`x2w-startup-shader-30cs`, `req_<key>.c67`) requests, publishes runtime-named stage binaries and
manifests (`<key>.vs.cso` / `<key>.ps.cso` or `<key>.cs.cso`, followed by `<key>.txt`), and loads directly through
the startup runtime cache loaders on WARP and hardware without manual renaming or conversion.

Expand Down Expand Up @@ -54,13 +54,13 @@ ctest --preset release --no-tests=error -R '^native_compute_pack(_parts|_hardwar
## Alignment between `compile_dxil --requests` and the startup cache

1. **Request keys and `.psin` stream descriptions (`src/shader_compute_request.cpp`):**
- Graphics requests validate `x2w-startup-shader-29` or the archived revision 28 over `.a`, `.b`, `.root`, and optional `.ia`. When
- Graphics requests validate `x2w-startup-shader-30` or the archived revision 28 over `.a`, `.b`, `.root`, and optional `.ia`. When
`req_<key>.psin` is present, the reader parses `psin1 <key> ena=0x<mask> addr=0x<mask>`, checks that the
embedded key matches `<key>` and `(ena & ~addr) == 0`, and folds `b"psin1" + struct.pack("<II", ena, addr)`
into the FNV-1a key identically to `tools/startup/gfx2hlsl.py:pipeline_key`. A slot 57 `req_<key>.ps57in`
(`PSI1` and 8 state bytes, 12 in all) is folded as stored, again as `pipeline_key` does. A request with
both records is refused.
- Compute requests validate `x2w-startup-shader-29cs` or the archived revision 28 over length-framed `.c67`, `.data`, `.root`, `.desc`,
- Compute requests validate `x2w-startup-shader-30cs` or the archived revision 28 over length-framed `.c67`, `.data`, `.root`, `.desc`,
`.sa`, and `.sb` identically to `d3d12_draw.inl:publish_compute_request` and `gfx2hlsl.py:compute_key`.
- In raw graphics translation (`src/gfx1013_compute_native.cpp`, `src/gfx1013_direct_graphics.inl`), pixel
entry VGPR offsets follow `SPI_PS_INPUT_ADDR` while only inputs enabled in `SPI_PS_INPUT_ENA` are readable.
Expand Down
4 changes: 2 additions & 2 deletions docs/experiments/patch-manifests.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ why = "<issue or root cause>"
remove_when = "<condition under which the patch can go>"
key = "0123456789abcdef" # the cache key, 16 lowercase hex digits
pipeline = "compute" # graphics, compute or mesh86
revision = "x2w-startup-shader-29cs"
revision = "x2w-startup-shader-30cs"
files = [{ ext = ".txt", file = "s001.txt", sha256 = "<sha256 of the file>" },
{ ext = ".cs.cso", file = "s001.cs.cso", sha256 = "<sha256 of the file>" }]
```
Expand Down Expand Up @@ -100,7 +100,7 @@ The check builds a synthetic PE32+ at run time with `build_pe32_plus` from
| Span check off by one (`>=`) | The 1-byte case at `0xffffffff` is refused. |
| `load_data` compares the target with itself | The flipped image is accepted by `load_data`. |
| Revision form check removed | The other-pipeline, number-less and leading-zero revision cases are accepted. |
| The runtime's graphics revision gets a suffix (`x2w-startup-shader-29b`) | The revision-form pin fails for graphics. |
| The runtime's graphics revision gets a suffix (`x2w-startup-shader-30b`) | The revision-form pin fails for graphics. |
| The runtime's graphics revision is bumped (`-29` to `-30`), loader untouched | Control: the check stays green. |
| Bare-name check on `file` removed | The six non-bare `file` cases are accepted. |
| Check for `<>"\|?*` in `file` removed | The six cases with one of those characters are accepted. |
Expand Down
2 changes: 1 addition & 1 deletion docs/startup-runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ The translation is refused when:
- either header has another size;
- the code reads an attribute the table does not list.

Graphics and compute use cache revisions `x2w-startup-shader-29` and `x2w-startup-shader-29cs`.
Graphics and compute use cache revisions `x2w-startup-shader-30` and `x2w-startup-shader-30cs`.
Revision 29 invalidates compute translations whose skipped-block proof kept a stale clear `vcc_hi` fact
across an unsigned `v_mad_u64_u32` carry-out, which may write `vcc_hi` in wave64 like the compares and
the other carry-outs.
Expand Down
4 changes: 2 additions & 2 deletions src/shader_compute_request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ uint64_t x2w::fnv1a_64(std::string_view bytes) {
uint64_t x2w::graphics_request_key(std::string_view a, std::string_view b, std::string_view root,
std::string_view input_layout, std::string_view pixel_entry,
std::string_view revision_override) {
constexpr char revision[] = "x2w-startup-shader-29";
constexpr char revision[] = "x2w-startup-shader-30";
uint64_t key = fnv1a_64(revision_override.empty() ? std::string_view(revision, sizeof(revision) - 1)
: revision_override);
for (const auto part_view : {a, b, root, input_layout, pixel_entry})
Expand All @@ -188,7 +188,7 @@ uint64_t x2w::graphics_request_key(std::string_view a, std::string_view b, std::
uint64_t x2w::compute_request_key(std::string_view code, std::string_view data, std::string_view root,
std::string_view description, std::string_view sa, std::string_view sb,
std::string_view revision_override) {
constexpr char revision[] = "x2w-startup-shader-29cs";
constexpr char revision[] = "x2w-startup-shader-30cs";
uint64_t key = fnv1a_64(revision_override.empty() ? std::string_view(revision, sizeof(revision) - 1)
: revision_override);
for (const auto part_view : {code, data, root, description, sa, sb}) {
Expand Down
4 changes: 2 additions & 2 deletions src/startup_stubs/d3d12_draw.inl
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,8 @@ bool append_pso_recipe(const wchar_t* path, const x2w_startup::PsoRecipe& recipe
// The revisions every request key starts with. tools/startup/gfx2hlsl.py hashes the same bytes, without a
// trailing NUL (pipeline_key, compute_key, mesh57_key); a change of either side makes every cached request a miss.
namespace shader_cache {
constexpr char revision[] = "x2w-startup-shader-29";
constexpr char compute_revision[] = "x2w-startup-shader-29cs"; // tools/startup/gfx2hlsl.py compute_key
constexpr char revision[] = "x2w-startup-shader-30";
constexpr char compute_revision[] = "x2w-startup-shader-30cs"; // tools/startup/gfx2hlsl.py compute_key
constexpr char mesh57_revision[] = "x2w-startup-mesh-57-3";
} // namespace shader_cache

Expand Down
2 changes: 1 addition & 1 deletion src/startup_stubs/formatted_buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ constexpr bool formatted_buffer_supported(std::uint32_t code)
{
switch (code) {
case 1: case 5: case 14: case 22: case 23: case 24: case 27:
case 29: case 50: case 56: case 60: case 64: case 71: case 74: case 77:
case 29: case 47: case 50: case 56: case 60: case 64: case 71: case 74: case 77:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Invalidate cached translations before accepting FORMAT 47

When reusing a shader cache containing an already-translated buffer_load_format_* pipeline, this gate now accepts FORMAT 47 even though the cached bytecode has no corresponding switch case and returns DESC_FORMAT_UNKNOWN NaNs for identity selectors. The Python and runtime cache revisions remain unchanged: the source-built MUBUF fixture retains key 170fc67bcc26ed98 across this commit, load_translation() loads the existing bytecode, and pending_keys() skips complete results. Consequently, upgrading the runtime and translator can replace the previous explicit refusal with incorrect shader results without ever running the new decoder. Bump the synchronized cache revisions or otherwise invalidate existing translations alongside this acceptance change.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revision 30 (already on this branch) changes the graphics and compute cache keys, so results translated before FORMAT 47 support are not reused. 0a7b7b1 adds a check to tests/startup_shader_cache_rekey_check.py: completed revision 29 results stay pending under the current revision. Linux: startup_shader_cache_rekey_check passes; the revision 29 negative control fails as expected.

return true;
default:
return false;
Expand Down
2 changes: 1 addition & 1 deletion tests/native_compile_dxil_rekey_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def check_revision_strings():
cpp_req = (ROOT / 'src' / 'shader_compute_request.cpp').read_text(encoding='utf-8')
draw_inl = (ROOT / 'src' / 'startup_stubs' / 'd3d12_draw.inl').read_text(encoding='utf-8')
py_text = (STARTUP / 'gfx2hlsl.py').read_text(encoding='utf-8')
for token in ('x2w-startup-shader-29', 'x2w-startup-shader-29cs', 'x2w-startup-mesh-57-3'):
for token in ('x2w-startup-shader-30', 'x2w-startup-shader-30cs', 'x2w-startup-mesh-57-3'):
ok = (token in cpp_req) and (token in draw_inl) and (token in py_text)
check('revision string %s matches across C++ and Python' % token, ok)

Expand Down
2 changes: 1 addition & 1 deletion tests/startup_buffer_format_word3_table_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def main(header=ROOT / 'src' / 'startup_stubs' / 'buffer_format_word3.h'):
assert set(mapped) == set(EXPECTED), sorted(set(mapped) ^ set(EXPECTED))
for dxgi, code in mapped.items():
assert code == codes[EXPECTED[dxgi]], (dxgi, code, EXPECTED[dxgi])
assert set(EXPECTED.values()) == set(codes), 'every decoded format has a DXGI view format'
assert set(EXPECTED.values()) | gfx2hlsl.DESCRIPTOR_ONLY_FORMATS == set(codes), 'every decoded format has a DXGI view format'
return len(mapped)


Expand Down
4 changes: 2 additions & 2 deletions tests/startup_compute_request_offline_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
DESC = struct.pack('<12Q', 0, 0, 24, 0, 20, 0, len(CODE), 0, len(DATA), 0, 0, 11)
STATE_A = struct.pack('<3Q', 1, 0x2c, 0xfff0000000000003)
STATE_B = struct.pack('<5I', 0x1234abcd, 0xffff0000, 0, 0, 0)
KEY = 0x96c99985746a35d1 # framed key at revision 29cs
KEY = 0xf5e4ddd5f9aaabd7 # framed key at revision 30cs


def framed_key():
h = 1469598103934665603
for b in b'x2w-startup-shader-29cs':
for b in b'x2w-startup-shader-30cs':
h = ((h ^ b) * 1099511628211) & 0xffffffffffffffff
for part in (CODE, DATA, ROOT, DESC, STATE_A, STATE_B):
for b in struct.pack('<Q', len(part)) + part:
Expand Down
4 changes: 2 additions & 2 deletions tests/startup_gfx2hlsl_buffer_store_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ def main():
'%s %s' % (result, fail_reason(name)))

# 8. The cache revision moved, so a translation from before the store lowering is never loaded.
check('cache key uses revision 29', G.pipeline_key(b'a', b'b', ROOT) ==
G.fnv(ROOT, G.fnv(b'b', G.fnv(b'a', G.fnv(b'x2w-startup-shader-29')))))
check('cache key uses revision 30', G.pipeline_key(b'a', b'b', ROOT) ==
G.fnv(ROOT, G.fnv(b'b', G.fnv(b'a', G.fnv(b'x2w-startup-shader-30')))))

if failures:
print('FAILED: ' + ', '.join(failures))
Expand Down
4 changes: 2 additions & 2 deletions tests/startup_gfx2hlsl_fract_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ def float_capped(word):
repr((seed and seed.group(1), literal and literal.group(1))))
check('the two literals are identical', seed and literal and seed.group(1) == literal.group(1),
repr((seed and seed.group(1), literal and literal.group(1))))
check('the revision is x2w-startup-shader-29, after the vcc_hi may-write of the mad64 carry-out',
bool(seed and seed.group(1) == 'x2w-startup-shader-29'), repr(seed and seed.group(1)))
check('the revision is x2w-startup-shader-30, after FORMAT 47 (10_10_10_2 SSCALED) joined the buffer format table',
bool(seed and seed.group(1) == 'x2w-startup-shader-30'), repr(seed and seed.group(1)))


def key_from_seed(word):
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_gfx2hlsl_ps57in_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def hlsl_bytes(directory, key, stage):


# The suffixed key is the plain key hashed with the entry bytes, in runtime order, and nothing else.
key_parts = G.fnv(b'x2w-startup-shader-29')
key_parts = G.fnv(b'x2w-startup-shader-30')
for part in (VS, PS, ROOT_BLOB, ENTRY):
key_parts = G.fnv(part, key_parts)
expect('suffixed key hashes the entry after the plain key', KEY, key_parts)
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_indirect_draw_indexed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ ComPtr<IUnknown> translated_pipeline(ID3D12Device* guest, ID3D12RootSignature* r
bool needs_start, TableSample sample = TableSample::texture, bool indexed = false, bool rect = false)
{
// The opaque guest programs identify synthetic cache entries. The actual bound shaders are source-built DXBC.
constexpr char revision[] = "x2w-startup-shader-29";
constexpr char revision[] = "x2w-startup-shader-30";
static std::uint32_t vertex_ids[]{0xe0000101, 0xe0000102, 0xe0000103};
static std::uint32_t pixel_ids[]{0xe0000202, 0xe0000203, 0xe0000205};
static std::uint32_t indexed_pixel_id = 0xe0000204;
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_packed_position_provenance_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def refused(label, cache, key, reason):
cache = Path(tmp)
bare = G.pipeline_key(VS_WORDS, ps_words(4), root_blob())
check('without a description the key is unchanged',
bare == G.fnv(root_blob(), G.fnv(ps_words(4), G.fnv(VS_WORDS, G.fnv(b'x2w-startup-shader-29')))))
bare == G.fnv(root_blob(), G.fnv(ps_words(4), G.fnv(VS_WORDS, G.fnv(b'x2w-startup-shader-30')))))
keys = [put_request(cache, ps_words(4), masks) for masks in (TARGET, SAME_V4, DECOY)]
check('same stages, root and layout with three mask pairs: three request identities',
len(set(keys)) == 3 and bare not in keys
Expand Down
2 changes: 1 addition & 1 deletion tests/startup_resource_retire_title.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ constexpr UINT draw_side = 4; // 4x4 R8G8B8A8_UNORM target
constexpr UINT draw_covered = 3; // scissor leaves the last row and column untouched as the sentinel
constexpr int draw_seed = 77;
constexpr UINT draw_clear_pixel = 0xffff00ffu; // ClearRenderTargetView({1, 0, 1, 1}) in R8G8B8A8_UNORM
constexpr char draw_revision[] = "x2w-startup-shader-29"; // d3d12_draw.inl cached_translation
constexpr char draw_revision[] = "x2w-startup-shader-30"; // d3d12_draw.inl cached_translation

constexpr char draw_vertex_shader[] = R"(
struct Varying { float4 position : SV_Position; };
Expand Down
Loading
Loading