Commit Graph

70 Commits

Author SHA1 Message Date
4ccd9cbfbc Merge pull request #832 from trigger337/fix/dds-png-stage-cleanup
dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)
2026-11-29 19:36:37 +01:00
25cf1aa4ec Merge pull request #2250 from kirigayakazima/codex/studio-dds-cube-face
studio: select cube faces for DDS previews and texels
2026-11-29 03:16:26 +01:00
21ba178e97 Merge pull request #2248 from kirigayakazima/codex/dds-png-bc6h-preview
dds_png: preview signed and unsigned BC6H textures
2026-11-29 00:48:31 +01:00
d73adc4b16 Merge pull request #2249 from kirigayakazima/codex/dds-png-bounded-scanlines
dds_png: compress scanlines without staging the entire image
2026-11-28 20:31:39 +01:00
920f2bd640 Merge pull request #2443 from kirigayakazima/codex/sandbox-scene-srgb-albedo
sandbox_scene: downsample sRGB albedo in linear light
2026-11-28 16:12:37 +01:00
bd839d1fd9 Merge pull request #2084 from syfyra/fix/dds-png-bc4-snorm-mode
dds_png: pick the BC4/BC5 SNORM ramp from the stored endpoints (DDS-PNG-SNORM-MODE)
2026-11-28 11:47:12 +01:00
00131bb85e main keeps its own runtime, tools and tests; the branch's variants stay on port/d3d12-nvidia
After the merge the tree held this branch's older states of files main maintains. Run against main's code,
tests/test_acphal_abi.py and 11 of the 15 translator tests that differed failed, and the C++ runtime would have
been built from two generations of its sources. So that the merge cannot break what main builds and tests:

- runtime/ is main's, file for file (68 files only this branch had are not carried over);
- every file under tools/, tests/ and docs/ that both sides have is main's (80 files);
- ten translator tests only this branch has, which test rules main's translator does not have, and their
  fixtures are left out.

What main gains: d3d12/ (the Rust D3D12 runtime), its launchers and helpers (Launcher.bat, scripts/play*.ps1,
play-linux.sh, port_ctl.py, smooth-motion.ps1, fetch_vkd3d_proton.py, sync_victory.py), mods/example_lua, eleven
notes under docs/, seven tools and the tests that pass with main's code, the README's sections and credits, and
the "Runtime traps" section of AGENTS.md. Everything left out here is on the branch port/d3d12-nvidia.

Checked: compileall; make_game.py --help; check_no_game_data.py over every file this adds to main; the
line-ending, docs-encoding, CI-registration and docs tests; each test file that differs from main, on its own.
Not run: the whole translator suite, the C++ build, cargo over d3d12/ after the merge (d3d12/ is byte for byte the
branch's), CI.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:58:38 -05:00
b87abdef57 Merge mandy's main into port/d3d12-nvidia
Brings the D3D12 runtime branch (d3d12/, its launcher scripts and notes, and the pull requests reviewed and applied
on it) together with mandy's main.

Conflicts (67 files, none under d3d12/): docs/, make_game.py, runtime/, scripts/build_runtime.ps1, tests/ and
tools/. Every one takes main's side: main is where that code is maintained, and this branch's copies were older
states of the same files or the same pull requests in another form. tests/test_fspx_unpack.py is main's too, as it
tests main's tools/fspx_unpack.py. Nothing under d3d12/ is changed by the merge.

Checked before pushing: python -m compileall over make_game.py, tools and tests; make_game.py --help;
scripts/check_no_game_data.py over the files this adds to main; tests/test_text_write_line_endings.py. The
translator suite, the C++ runtime build and CI have not run on the result.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 17:50:37 -05:00
0602359fd7 PR #832: dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)
From https://github.com/ProjectLeonida/mandy/pull/832 (head b5dd9acbb6), applied as a reviewed patch.

Co-authored-by: trigger337 <trigger337@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-27 15:42:17 -05:00
7811fd88cb dds_png: preview signed and unsigned BC6H textures 2026-11-27 19:57:35 +08:00
cb82451594 sandbox_scene: downsample sRGB albedo in linear light 2026-11-27 18:11:47 +08:00
a28d967966 DDS previews batch: tests for the new formats, R9G9B9E5 through tex_export --png
- tests/test_dds_png_dx10.py: hand-built 2x2 texels with padded row pitch and a one-byte-short payload for
  R9G9B9E5_SHAREDEXP (67), B5G6R5 (85), B5G5R5A1 (86), R8G8 SNORM/UINT/SINT (51/50/52),
  R8 SNORM/UINT/SINT (63/62/64) and R10G10B10A2 TYPELESS/UINT (23/25, checked against UNORM 24);
  these merged without tests.
- tools/tex_headers.py: list DXGI 67 in DXGI and FMT_INFO (4-byte element), so the indexer keeps such
  textures and tex_export --png reaches dds_png's decoder instead of "unsupported format" (ecox982745's
  finding on #2218). New tests in test_tex_export.py (index -> DDS -> PNG) and test_tex_headers.py.
- tests/test_tex_export.py: the "undecodable format" cases used DXGI 25, which #2320 now decodes; they use
  R8G8B8A8_UINT (30) instead. FMT has 57 entries with 67.
- tools/dds_png.py, tools/tex_export.py: one docstring list of the decoded formats instead of the per-PR lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 13:22:35 -05:00
e8e4b23d58 Merge #2324 from ZroIsHere: DDS R8_UINT and R8_SINT previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:17:51 -05:00
901d989e8c Merge #2323 from ZroIsHere: DDS R8_SNORM previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:17:44 -05:00
3d910cfff8 Merge #2321 from ZroIsHere: DDS R10G10B10A2_TYPELESS previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:17:33 -05:00
df81f60232 Merge #2320 from ZroIsHere: DDS R10G10B10A2_UINT previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/tex_export.py
2026-11-26 13:17:26 -05:00
18b0134082 Merge #2319 from ZroIsHere: DDS R8G8_UINT and R8G8_SINT previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:17:21 -05:00
5b94bbc966 Merge #2317 from ZroIsHere: DDS R8G8_SNORM previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:17:13 -05:00
7a5bb0e6ea Merge #2314 from ZroIsHere: DDS B5G6R5 and B5G5R5A1 previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:16:30 -05:00
bdbf0cab2d Merge #2218 from ZroIsHere: DDS R9G9B9E5_SHAREDEXP previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
#	tools/tex_export.py
2026-11-26 13:16:06 -05:00
745aada99a Merge #2158 from ZroIsHere: DDS R16G16B16A16_SNORM previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tests/test_dds_png_dx10.py
#	tools/dds_png.py
2026-11-26 13:15:02 -05:00
8185e7b4d4 Merge #2157 from ZroIsHere: DDS R16G16B16A16_UNORM previews
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	tools/dds_png.py
2026-11-26 13:13:40 -05:00
42cc70344c studio: select cube faces for DDS previews and texels 2026-11-26 18:18:00 +08:00
a9ec081f12 dds_png: compress scanlines without staging the entire image 2026-11-26 18:14:40 +08:00
f833599c85 dds_png: preview R8 and R8G8 UNORM texture exports 2026-11-26 18:13:23 +08:00
1c78f0fee4 Add R8 SNORM PNG preview support 2026-11-26 08:00:34 +01:00
4ba0afc2db Add R8 integer PNG preview support 2026-11-26 08:00:31 +01:00
943bba2dd6 Add R10G10B10A2_UINT PNG preview support 2026-11-26 07:55:25 +01:00
c5efad48c3 dds_png: preview R10G10B10A2 typeless 2026-11-26 07:52:55 +01:00
81df9f5ed9 dds_png: decode R8G8 integer previews 2026-11-26 07:50:30 +01:00
893f1a0f44 dds_png: decode R8G8_SNORM previews 2026-11-26 07:47:50 +01:00
3e8c273d6b dds_png: decode packed B5 color previews 2026-11-26 07:45:47 +01:00
d36c961c3e dds_png: decode R9G9B9E5 shared exponent previews 2026-11-26 07:44:07 +01:00
c4439f5837 dds_png: decode DXGI RGBA16 SNORM previews 2026-11-26 02:05:44 +01:00
26fd8ff036 dds_png: decode DXGI RGBA16 UNORM previews 2026-11-26 02:05:32 +01:00
9797ec66a1 dds_png: pick the BC4/BC5 SNORM ramp from the stored endpoints (DDS-PNG-SNORM-MODE)
_bc_interp_lut_snorm clamped a -128 endpoint to -127 before the red_0 > red_1
test. D3D's BC4_SNORM rule compares the stored int8 endpoints and reads -128
as -127 only as a value (DirectXTex and Pillow decode it that way), so the
pair 0x81, 0x80 (-127 > -128) is an eight-value block with every entry -1.0.
The clamp made the endpoints equal, took the six-value ramp, and index 7
decoded to +1.0 (255) instead of 0. It is the only one of the 65,536 pairs
whose ramp changes.

Tested: new test_snorm_ramp_is_chosen_by_the_raw_endpoints (BC4S and BC5S,
fails before the fix); all 65,536 BC5_SNORM endpoint pairs x 8 indices match
Pillow 12.3 within 1 (one 255-off mismatch before).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 20:44:21 +01:00
b5dd9acbb6 dds_png: restore write mode before unlink on replace failure in main (DDS-PNG-STAGE-CLEANUP)
When previewing/saving PNG in CLI main(), if os.replace fails after
shutil.copymode set the destination's permissions, resetting os.chmod to
0o600 ensures TemporaryDirectory cleanup does not fail with PermissionError
on Windows if the output was read-only.

agent: yes
AI-assisted: yes
2026-11-24 17:21:01 +03:00
3ad6618e8b dds_png: preview DX10 R32_FLOAT as linear red (#6758)
Squash-merged after diff review of PR #6758 - dds_png: preview DX10 R32_FLOAT as linear red
2026-11-23 10:03:15 -06:00
c495e11841 Publish DDS preview PNGs only after a complete write (#6909)
Squash-merged after diff review of PR #6909 - dds_png: preserve existing previews when an output write fails
2026-11-23 09:47:21 -06:00
aa4ed4c2d5 Studio: inspect original half-float DDS texel values (#6896)
Squash-merged after diff review of PR #6896 - Studio: inspect original half-float DDS texel values
2026-11-23 09:46:54 -06:00
956544023a Preview individual DDS mip levels, cube faces, array layers and volume slices (#6352)
Squash-merged after review of PR #6352 - Preview individual DDS mip levels, cube faces, array layers and volume slices
2026-11-23 08:16:00 -06:00
89e2745462 Merge pull request #4495 from kapitche
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:15:15 -05:00
ff181e07c8 Merge pull request #3863 from inerthel-agi
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:01 -05:00
3369ac3190 dds_png: preview R16_UNORM and A8_UNORM DX10 textures 2026-11-22 20:49:09 -05:00
5fdcf31720 fix(textures): filter sRGB DDS previews in linear light
Carry the DXGI transfer function through alpha-weighted preview resizing. Keep RGBA8 quantization stable on dark ties and cover the PNG bytes for tagged and untagged textures (BUILD-1087).
2026-11-22 23:06:02 +01:00
8c47721b77 Merge pull request #3183 from jaybeebabageyus 2026-11-22 17:00:50 -05:00
0a0e206a3c dds_png: decode legacy 24-bit BGR/RGB DDS layouts
tools/dds_png.py rejected every DDPF_RGB header with rgb_bit_count != 32,
so legacy D3DFMT_R8G8B8 (24-bit BGR) textures failed PNG preview and
batch_glb material-input conversion with 'Unsupported uncompressed RGB
bit count: 24'. Accept 24- and 32-bit RGB headers; 24-bit payloads decode
byte-aligned 8-bit lanes per the header masks with row-pitch padding
removed and opaque alpha. Non-canonical 24-bit bitmask layouts are still
rejected. Tests: Rgb24Tests in tests/test_dds_png.py (header/decode,
RGB8 byte order, padded rows, zero-alpha-mask flag, pitch/truncation
errors, unsupported layouts, PNG round trip); the non-32-bit rejection
test now checks 8/16-bit counts.
2026-11-22 21:50:30 +01:00
3b29aea72e Merge pull request #2687 from Vonsek 2026-11-22 15:11:23 -05:00
5115e0b1cc Merge pull request #2476 from Vonsek 2026-11-22 13:15:35 -05:00
0aaa35f596 Merge pull request #2446 from FreddyxS 2026-11-22 13:15:22 -05:00