Repository navigation
Run-time compiled fx_2_0 effects, luminance render targets, and credit to thebcd69 - #575
Merged
Merged
Conversation
…signments
A program that builds its effects from .fx text at start (D3DXCreateEffect)
showed "Error building shader" ("E5017: Aborting due to not yet implemented
feature: Writing fx_2_0 sampler objects initializers is not implemented",
"Write pass assignments") and ran without them: the text goes d3dx9 ->
d3dcompiler_47 -> vkd3d-shader, whose fx_2_0 writer (release 1.19) refused
sampler state blocks and every pass with assignments.
- wine (8be7412f882): the writer now emits sampler initializers, pass
assignments (numeric states, compiled shaders, <parameter> references)
and the resource records d3dx9 reads bytecode and names from, TRUE/FALSE
by name for every state, and zeros for parameters without an
initializer. Layout checked against Microsoft's compiler output.
- app/Madeira/arm64ec-windows/wined3d.dll rebuilt: vkd3d-shader is linked
into wined3d, which the d3dcompiler_* modules import; the i386 farm's copy
comes from the submodule build.
- tests/host/check-fx2-effects.py: the writer's pieces, and with
VKD3D_COMPILER set a compile + read-back of a sample effect the way
dlls/d3dx9_36/effect.c reads it.
- docs/BUILDING.md: what to rebuild and how to test.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…CE_RT)
A program that builds one-channel targets (ambient occlusion, blur passes,
masks) through its engine's format table asked for D3DFMT_L8 render
targets at the end of its loading screen; DXMT refused them
("CreateTexture: format 50 not render-target-capable"), the engine got no
target and the program's main and render threads stayed parked for good.
Native drivers and DXVK allow them.
- dxmt (e82c864): isColorRTFormat() returns true for L8, A8L8 and L16;
their storage (R8Unorm, RG8Unorm, R16Unorm) is colour-renderable on every
Metal GPU, the shader's .r lands in the luminance channel and the sampler
view's {R,R,R,1} swizzle reads it back. env.MADEIRA_D3D9_LUMINANCE_RT = 0
restores the refusal.
- app/Madeira/arm64ec-windows/d3d9.dll rebuilt; the i386 copy comes from
the submodule build.
- build/tools/gen-config-catalog.py: the new switch; the generated catalog
regenerated (it also picks up keys added upstream since it was last run).
- tests/host/check-d3d9-luminance-rt.py.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Pull request willfaust#516 (merged 2026-11-01) carried about 5,300 lines of thebcd69's work without his name: - His pull requests willfaust#337 to willfaust#346, which he opened on 2026-10-15 and closed on 2026-10-18 before they were merged. This credits him for them. Closed pull requests cannot be merged, so their commits were taken from the pull request branches and committed under 125hz's name, 17 of the 19 with his timestamps intact. About 1,200 of those lines are still in the tree. - His public fork (https://github.com/thebcd69/bcd-games), as of 2026-10-26: about 4,100 lines copied into existing engine files and into the new memory-host extension files, 1,700 lines of host tests, and 30 of his tested game lists. The instruction to Claude was to research the fork only and create our own implementation; Claude copied it instead, labelled the tests "ported from a community host check" and left his name off. This commit is the correction. - Every file that carries his code gets a copyright line naming him, the source (fork, pull requests, or both) and the modification date, as GPL-3.0 section 5 asks; the memory-host files, which are his throughout, carry his copyright as the file's own. - THIRD-PARTY-NOTICES.md gains "Code from BCD" with the account, the per-file line counts by source, and the licence position (GPL-3.0-or- later; none of these files is "BCD Material" under his section 7 terms). - README credits list him next to bahacan16, his earlier account. - The game-list comments say whose tested lists they are. No code changes: 47 source files get header lines, two documents change. Host suite in WSL: the same results as the unmodified tree (the five extra failures are the CRLF working copy, not these edits). Co-authored-by: thebcd69 <190844990+thebcd69@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…rmats out of StretchRect conversions Review fixes for willfaust/wine#71 and willfaust/dxmt#55: - wine ddf92babc5b: a numeric pass state written from a vector constant now carries every component in the native layout (MATRIX_ROWS, one row per component); TRUE and FALSE resolve for states that have a name table of their own; a shader that fails to compile fails the effect; only a whole uniform parameter may be referenced by name. wined3d.dll rebuilt for arm64ec (the i386 copy in the build workspace too). - dxmt 3d62913: CheckDeviceFormatConversion keeps L8 / A8L8 / L16 out of StretchRect conversions. d3d9.dll rebuilt for arm64ec. - tests/host/check-fx2-effects.py: the sample effect sets a float4 pass state and ZEnable = true; the check reads the 4x1 record and its four components. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
125hz
added a commit
that referenced
this pull request
Nov 5, 2026
…t to thebcd69 (#575) Four commits of #575: the fx_2_0 effect writer (wine ddf92babc5b, willfaust/wine#71) with wined3d.dll rebuilt for arm64ec and tests/host/check-fx2-effects.py; luminance render targets in DXMT's Direct3D 9 (dxmt 3d62913, willfaust/dxmt#55, MADEIRA_D3D9_LUMINANCE_RT) with d3d9.dll rebuilt; the review fixes of both; and the credit to thebcd69 (BCD) for the code taken from his fork and his pull requests #337 to #346 into #516: copyright lines in the 47 files that carry it, the Code from BCD section of THIRD-PARTY-NOTICES.md, a README credits entry. Co-authored-by: thebcd69 <190844990+thebcd69@users.noreply.github.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three commits.
1. Effects compiled at run time: fx_2_0 sampler initializers and pass assignments (wine pin → willfaust/wine#71,
8be7412f882)An effect compiled at run time through d3dcompiler with
fx_2_0lost its sampler state blocks and pass assignments, and d3dx9 refused the result ("Error building shader!"). The vkd3d fx writer now emits them with their object records and resources; the effect loads and the shaders bind. vkd3d-shader lives inwined3d.dllon this port, so that DLL is rebuilt for the arm64ec farm here (the i386 one comes from CI).tests/host/check-fx2-effects.pychecks the writer's structure and, withVKD3D_COMPILERset, compiles a sample effect and parses it the way d3dx9 does.docs/BUILDING.mdnotes the rebuild.2. Direct3D 9: luminance formats as render targets (dxmt pin → willfaust/dxmt#55,
e82c864)DXMT refused
D3DFMT_L8/A8L8/L16render targets, so an engine that draws its one-channel passes into them sat on its loading screen. Allowed behindMADEIRA_D3D9_LUMINANCE_RT(default on). Rebuiltd3d9.dll(arm64ec) andd3d9-emulated.dll(i386), catalog entry,tests/host/check-d3d9-luminance-rt.py.Both device-confirmed: a popular mod's run-time compiled shader pack went from "Error building shader" to a running game.
3. Credit thebcd69 (BCD) for the code taken from his fork and pull requests
Pull request #516 carried about 5,300 lines of thebcd69's work without his name: the commits of his pull requests #337 to #346 (closed before merge, so committed under 125hz's name) and about 4,100 lines copied from his public fork. The instruction to Claude had been to research the fork only and create our own implementation; Claude copied it instead. This commit credits him: a copyright line with source and modification date in each of the 47 files that carry his code, a "Code from BCD" section in
THIRD-PARTY-NOTICES.mdwith per-file counts, a README credits entry, and hisCo-authored-bytrailer so the commit shows under his account. No code changes. Please keep that commit's trailer if the PR is squashed (GitHub's squash button keeps it on its own).Host suite in WSL: same results as
main(the environment failures are swiftc/xcrun/sanitizer and the CRLF working copy).🤖 Generated with Claude Code