<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/shader_recompiler/ir_opt/texture_pass.cpp, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-11-02T19:53:47+00:00</updated>
<entry>
<title>shader: drop the slots of a failed handle subtree with its code</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=0ed4a3a9e795896a4751d0330c78958a309d1aa0'/>
<id>urn:sha1:0ed4a3a9e795896a4751d0330c78958a309d1aa0</id>
<content type='text'>
When BuildHandleProgram failed on a subtree it truncated the code back to where
the subtree started, which removed the Tee ops of the values the subtree had
kept, but their entries stayed in g_handle_slots. A Phi tries its other inputs
after the first one fails; if one of them reused a value from the dropped
subtree, it emitted a Load of a slot that nothing wrote, so the handle read 0.

Number slots with a counter instead of counting map entries, and on failure
erase the entries numbered from the subtree's first slot on and rewind the
counter, so such a value is built again.

Follow-up to 561f87abec.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>shader: restore the handle build depth when a build throws</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:29:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=8b0666b74868da8221d9e3ef3995f3a862ee24b6'/>
<id>urn:sha1:8b0666b74868da8221d9e3ef3995f3a862ee24b6</id>
<content type='text'>
BuildHandleProgram incremented g_handle_depth and decremented it at the end, so
a NotImplementedException from BuildHandleNode left the thread-local depth above
zero. That thread never cleared g_handle_slots again, and stale IR::Inst* keys
from an earlier program could match instructions of a later one (a freed
instruction's address can be reused). Do the decrement and the outermost clear in
SCOPE_EXIT.

Follow-up to e23b0f2fab.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>shader: evaluate handle programs for image and texture buffer descriptors</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=bda49e810b5955bff8474e7b8f2b09eab51e9be2'/>
<id>urn:sha1:bda49e810b5955bff8474e7b8f2b09eab51e9be2</id>
<content type='text'>
561f87abec only gave TextureDescriptor a handle_program. Image load/store/atomics
and texture/image buffers whose handle comes from a storage buffer still got the
placeholder constant buffer address (index 0, offset 0), so the pipelines read
cbuf 0 word 0 as the handle (and asserted if cbuf 0 was unbound). Add
handle_program to TextureBufferDescriptor, ImageBufferDescriptor and
ImageDescriptor, compare it when merging, and let all four pipelines evaluate it
for every descriptor kind instead of only TextureDescriptor.

ImageQueryDimensions on such a handle was always declared Color2D, so array,
cube and 3D views got a 2D declaration. The instruction carries no type, so take
it from another instruction using the same handle program, falling back to
Color2D when there is none.

Follow-up to 561f87abec. The OpenGL pipeline edits are the same change as the
Vulkan ones but were not compiled here.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>shader: tell handle-program textures apart when adding descriptors</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:19:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=c83eb1d1f5c14d0842a165de431ac6367dff2909'/>
<id>urn:sha1:c83eb1d1f5c14d0842a165de431ac6367dff2909</id>
<content type='text'>
Every texture whose handle is computed per draw gets the same placeholder
constant buffer address (index 0, offset 0), and Descriptors::Add did not
compare handle_program. Two such textures of the same type and depth in one
shader therefore shared a descriptor, so the second sampled the first, and one
could also merge with a real texture bound at constant buffer 0 offset 0.
Compare handle_program too.

The pixel-format-integer lookup cached its last answer by (index, offset), which
has the same problem for handle programs; skip that cache for them.

Follow-up to 561f87abec.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>shader: keep the handle slot map thread-local instead of a pointer to it</title>
<updated>2026-11-01T20:19:47+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-01T20:19:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=e23b0f2fab9014225486beebd82fab8dbc0fe14c'/>
<id>urn:sha1:e23b0f2fab9014225486beebd82fab8dbc0fe14c</id>
<content type='text'>
BuildHandleProgram stored the address of its outermost call's local map
in a thread_local pointer for the nested calls, which GCC 15 rejects
with -Werror=dangling-pointer. The map itself is thread_local now, and
a depth counter tells the outermost call to clear it.
</content>
</entry>
<entry>
<title>shader: compute texture handles read from storage buffers for each draw</title>
<updated>2026-10-31T20:03:16+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-31T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=561f87abec2f76b3ca40c59277752ed4d3b6bf16'/>
<id>urn:sha1:561f87abec2f76b3ca40c59277752ed4d3b6bf16</id>
<content type='text'>
Switch 2 shaders can read a texture handle from a storage buffer (Switch
Sports' scenery: a per-object entry of a table whose pointer is in the driver
constant buffer). The bindless handle search looked through the load into its
address and returned the table pointer's constant buffer word as the handle,
which named an arbitrary descriptor; the game repoints that one at transient
render targets every few seconds, so the island and menu lighting flipped
between correct, dark and red.

The search no longer looks into memory loads. A handle it cannot trace is now
built into a small program over constant buffer words, storage buffer words and
integer operations (Shader::Info::handle_programs), which the pipelines evaluate
when they bind the texture. Handles a single evaluation cannot give (one that
changes in a loop) keep the previous search.
</content>
</entry>
<entry>
<title>[ir] resolve conditional Phi inputs when tracking bindless texture handles (#4551)</title>
<updated>2026-10-26T16:24:00+00:00</updated>
<author>
<name>xbzk</name>
<email>xbzk@eden-emu.dev</email>
</author>
<published>2026-10-26T16:24:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=0689f73147ebeddb9ac5fb8b0edf2625425f8d71'/>
<id>urn:sha1:0689f73147ebeddb9ac5fb8b0edf2625425f8d71</id>
<content type='text'>
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------
Aimed to fix Ender Magnolia missing shader textures. Main example is Yolvan character bullets.

By using windows version of the game, dxvk lib to make it vulkan, and renderdoc, it was possible to capture bullets, and by tracking backward composition and comparing with a similar scene from eden with missing bullets, it was possible to unveil the missing functionality: conditional Phi inputs resolve for bindless handles.
By ignoring the boolean predicate register in the shader, handles for these shaders were resolving to some old value instead of proper live conditional ones.

TESTS:
-Compare Yolvan bullets
-Usual roam on main titles for regression check.

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4551
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
Reviewed-by: Shinmegumi &lt;shinmegumi@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[common] Switch to boost::unordered_flat containers (#4326)</title>
<updated>2026-08-31T00:58:09+00:00</updated>
<author>
<name>crueter</name>
<email>crueter@eden-emu.dev</email>
</author>
<published>2026-08-31T00:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=7fda6dde73ab9fa1eab40d43c90720a1d9ba054f'/>
<id>urn:sha1:7fda6dde73ab9fa1eab40d43c90720a1d9ba054f</id>
<content type='text'>
Replaces all instances of ankerl's unordered map/set with boost's
`unordered_flat_*` classes. This uses std::hash since boost::hash is
actually a lot slower.

Also adds an abstraction layer in `Common` so future changes are quicker
and easier.

Other implementation details:
- ankerl provided hash specializations for tuple and pair, so those were
  ported here
- std::erase_if doesn't work on boost, so just used the ADL'd erase_if

This should be about equal or superior performance as unordered_dense for everything except iteration.

Signed-off-by: crueter &lt;crueter@eden-emu.dev&gt;

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4326
Reviewed-by: Lizzie and Samuel &lt;lizzie@eden-emu.dev&gt;
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[vulkan] 3rd Vulkan Global Maintenance (#4189)</title>
<updated>2026-07-09T02:22:43+00:00</updated>
<author>
<name>CamilleLaVey</name>
<email>camillelavey99@gmail.com</email>
</author>
<published>2026-07-09T02:22:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=8225151a4469a13ac602215dbeb2ce9a3702f38b'/>
<id>urn:sha1:8225151a4469a13ac602215dbeb2ce9a3702f38b</id>
<content type='text'>
Following the philosophy on the previous Vulkan maintenance PR's, this one is reviewing the video_core to resolve VUID's related to the missing handling/ safechecks (UBO's case on missing StorageBufferAccess 8/16 bits on QCOM drivers, resulting on bad compute pipeline compiled), wiring topology representative to EDS2 configuration (following #4117), refactored the sampled image access via new memeber function for type "typeless" which adds a handling on the integer mistmatch (uint to sint, float to uint) + fixing bugs on current texture sampling (int) including the depth/stencil path resolve, maintenance to previous changes on query cache (resolving bugs from #3853), reduced the amount of binding BindVertexBufferEXT2 when a new tick/ frame is presented (with this being a reason for performance reduction on games where vertex polutes the stage, like BOTW/TOTK where grass is draw with vertex); implemented color border swizzle and color write enable for future improvements on EDS3, added initial implementation on Synchronization2 starting a path to ensure an access to VK 1.3 features safely and other smaller fixes along the road.

Special Thanks:

-&gt; Mr. Smolio Gidolard (@gidoly)

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4189
</content>
</entry>
<entry>
<title>[shader_recompiler/ir] fix potential CBuf collision when count mismatches (#4097)</title>
<updated>2026-07-07T18:16:21+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-07-07T18:16:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=ae75ba4883de07feb9808e5d76aecaad45c6b913'/>
<id>urn:sha1:ae75ba4883de07feb9808e5d76aecaad45c6b913</id>
<content type='text'>
this should make disjoint counts be handled as different cbufs for the cbuf cache

this fixes TIC asserts on PKZA

Signed-off-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4097
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
</content>
</entry>
</feed>
