| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
049c9633ed made TextureHeaderIndex take index / 32 for any texture index past the
pool that is a multiple of 32, in VisitImageView and in the shader environment.
That was written for Switch 2 handles that hold a header byte offset, but it ran
for Switch 1 games too, where such an out-of-range index used to give a null view
(and fail the shader environment's range check) and now binds an unrelated
header. Pass whether the memory manager uses native tiling, which is how Switch 2
titles are set up, and keep the previous behaviour otherwise.
Follow-up to 049c9633ed.
Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Switch Sports' scenery shaders take their 64-bit texture handles from a uniform
register, and the texture part of those handles is the header's byte offset in the
pool (index * 32), not its index: 0x96e46000 names header 8960 (a 640x152 2D
texture), while the plain reading, 286720, runs far past the 33067-entry pool. Eden
skipped them at draw time (null view) and built the shaders for a garbage header, so
the island's ground, cliffs and buildings drew black.
When a handle's index falls past the pool but index / 32 lands inside it, take that
header, both when building the shader and when binding the view. Handles that
already resolve keep their meaning.
|
| |
|
|
|
|
|
|
|
|
| |
ColorBorderSwizzle adjustments (#4301)
This PR removes the artificial limit added for QCOM drivers based on a sampler budget limit (based on #3280 work), removes the ban on CustomBorderColor/BorderColorSwizzle for also QCOM driver, reduce the amount of combination required to created a sampler with custom border color/ color border swizzle; adds cases on R16 formats not able to swizzle on BGR565 formats; degrades samplers and color combinations when there's no color border swizzle available; fixes the srgb (LUT) values from legacy and now all the color variations are cached in the same key, instead of having 7 different handlers for them. In resume, rather than performance (due to the reduced amount of process on duplicated/ synced code on pipeline/texture cache), it's a graphica accuracy work that will improve image quality at the cost of almost 0 performance hit, rather than certain hitch if the color combination wasn't cached before. This applies to all platform.
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4301
Reviewed-by: Samuel <lizzie@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
|
| | |
|
| |
|
|
|
| |
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
|
| |
|
| |
`via_header_index` is already checked above, so it would never be true in this branch
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current texture cache has several points that hurt maintainability
and performance. It's easy to break unrelated parts of the cache
when doing minor changes. The cache can easily forget valuable
information about the cached textures by CPU writes or simply by its
normal usage.The current texture cache has several points that hurt
maintainability and performance. It's easy to break unrelated parts
of the cache when doing minor changes. The cache can easily forget
valuable information about the cached textures by CPU writes or simply
by its normal usage.
This commit aims to address those issues.
|
| |
|
|
|
| |
Cleans out the rest of the occurrences of variable shadowing and makes
any further occurrences of shadowing compiler errors.
|
| |
|
|
|
|
| |
Normalizes pixel format names to match Vulkan names. Previous to this
commit pixel formats had no convention, leading to confusion and
potential bugs.
|
| |
|
|
|
| |
This adds the registers used for multisampling. It doesn't implement
anything for now.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a reversed look up table extracted from
https://gist.github.com/rygorous/2203834#file-gistfile1-cpp-L41-L62
that is used in
https://github.com/devkitPro/deko3d/blob/04d4e9e587fa3dc5447b43d273bc45f440226e41/source/maxwell/tsc_generate.cpp#L38
Games usually bind 0xFD expecting a float texture border of 1.0f.
The conversion previous to this commit was multiplying the uint8 sRGB
texture border color by 255. This is close to 1.0f but when that
difference matters, some graphical glitches appear.
This look up table is manually changed in the edges, clamping towards
0.0f and 1.0f.
While we are at it, move this logic to its own translation unit.
|
| |
|
|
| |
Previous code could generate an anisotropy value way higher than x16.
|
| |
|
|
| |
anisotropic filtering levels.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
Bindless textures were using u64 to pack the buffer and offset from
where they come from. Drop this in favor of separated entries in the
struct.
Remove the usage of std::set in favor of std::list (it's not std::vector
to avoid reference invalidations) for samplers and images.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing all block width, height and depths in their shifted
form:
block_width = 1U << block_shift;
Store them like they are provided by the emulated hardware (their
block_shift form). This way we can avoid doing the costly
Common::AlignUp operation to align texture sizes and drop CPU integer
divisions with bitwise logic (defined in Common::AlignBits).
|
| | |
|
| |
|
|
|
|
| |
Nothing in this header relies on common_funcs or the memory manager.
This gets rid of reliance on indirect inclusions in the OpenGL caches.
|
| |\
| |
| | |
vk_sampler_cache: Implement a sampler cache
|
| | | |
|
| | | |
|
| |/ |
|
| | |
|
| |\
| |
| | |
maxwell_3d: Allow texture handles with TIC id zero
|
| | |
| |
| |
| |
| | |
Also remove "enabled" field from Tegra::Texture::FullTextureInfo because
it would become unused.
|
| |/ |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
QT sRGB support
|
| | |
|
| |
|
|
| |
block width and block depth
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Compresses a few namespace specifiers to be more compact.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|