9737615948
general: fix compile for Apple Clang
2022-11-22 22:22:28 -05:00
c7e079a5d4
general: Resolve -Wunused-lambda-capture and C5233
2022-10-22 15:02:04 -04:00
35d3e7db2a
common: remove "yuzu:" prefix from thread names
2022-10-03 18:43:56 -04:00
d9e375acc3
Merge pull request #8910 from vonchenplus/astc_decode_error
...
video_core: Modify astc texture decode error fill value
2022-09-30 15:34:11 -07:00
809126c94a
astc: Enable parallel CPU astc decoding
...
Given the issues with GPU accelerated ASTC decoding with NVIDIA's latest drivers, parallelize astc decoding on the CPU.
Uses half the available threads in the system for astc decoding.
2022-09-16 10:16:42 -04:00
88007077e2
video_core: Modify astc texture decode error fill value
2022-09-15 17:04:44 +08:00
01cf05bc75
chore: add missing SPDX tags
...
Follow-up to 99ceb03a1c
2022-04-28 18:24:11 +02:00
866b7c20a8
general: Fix clang/gcc build errors
2022-03-20 02:25:09 -04:00
5665d05547
astc_decoder: Optimize the use EncodingData
...
This buffer was a list of EncodingData structures sorted by their bit length, with some duplication from the cpu decoder implementation.
We can take advantage of its sorted property to optimize its usage in the shader.
Thanks to wwylele for the optimization idea.
2021-07-31 21:36:26 -04:00
15c0c213b1
astc.h: Move data to cpp implementation
...
Moves leftover values that are no longer used by the gpu decoder back to the cpp implementation.
2021-07-31 21:26:42 -04:00
d3d6613d33
video_core: Silence signed/unsigned mismatch warnings
2021-06-28 09:21:42 -04:00
ace20ba4a4
astc_decoder.comp: Remove unnecessary LUT SSBOs
...
We can move them to instead be compile time constants within the shader.
2021-06-19 10:56:13 -04:00
31b125ef57
astc: Various robustness enhancements for the gpu decoder
...
These changes should help in reducing crashes/drivers panics that may
occur due to synchronization issues between the shader completion and
later access of the decoded texture.
2021-06-19 09:00:33 -04:00
5fc8393125
astc_decoder: Fix LDR CEM1 endpoint calculation
...
Per the spec, L1 is clamped to the value 0xff if it is greater than 0xff. An oversight caused us to take the maximum of L1 and 0xff, rather than the minimum.
Huge thanks to wwylele for finding this.
Co-Authored-By: Weiyi Wang <wwylele@gmail.com >
2021-06-15 20:19:01 -04:00
c4ff7ecf51
textures: Reintroduce CPU ASTC decoder
...
Users may want to fall back to the CPU ASTC texture decoder due to hangs
and crashes that may be caused by keeping the GPU under compute heavy
loads for extended periods of time. This is especially the case in games
such as Astral Chain which make extensive use of ASTC textures.
2021-06-15 20:19:00 -04:00
2f83d9a61b
astc_decoder: Refactor for style and more efficient memory use
2021-03-25 16:53:51 -04:00
22be115eb2
astc: Increase integer encoded vector size
...
Invalid ASTC textures seem to write more bytes here, increase
the size to something that can't make us push out of bounds.
2021-01-15 02:24:36 -03:00
0ec71b78fb
astc: Return zero on out of bound bits
...
Avoid out of bound reads on invalid ASTC textures.
Games can bind invalid textures that make us read or write out of bounds.
2021-01-15 02:24:36 -03:00
9764c13d6d
video_core: Rewrite the texture cache
...
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.
2020-12-30 03:38:50 -03:00
6bf5d2b011
astc: Hard code bit depth changes to 8 and use fast replicate
2020-04-09 18:37:12 -03:00
bd2c1ab8a0
astc: Use boost's static_vector to avoid heap allocations
2020-04-09 05:27:57 -03:00
5de130beea
astc: Implement a fast precompiled alternative for Replicate
2020-04-09 03:58:25 -03:00
6b4d4473be
astc: Move Replicate to a constexpr LUT when possible
2020-04-09 03:35:07 -03:00
d22a689250
astc: Make InputBitStream constexpr
2020-04-09 02:54:05 -03:00
0efc230381
astc: OutputBitStream style changes and make it constexpr
2020-04-09 02:37:51 -03:00
664fa4ea06
astc: Fix clang build issues
2020-03-18 04:30:25 -03:00
42cb8f1124
astc: Fix typos from search and replace
2020-03-14 01:05:20 -03:00
9b8fb3c756
astc: Minor changes to InputBitStream
2020-03-14 00:45:54 -03:00
d71d7d917e
astc: Pass val in Replicate by copy
2020-03-14 00:13:58 -03:00
134f3ff9b4
astc: Call std::vector:reserve on decodedClolorValues to avoid reallocating
2020-03-14 00:09:56 -03:00
3377b78ea7
astc: Call std::vector::reserve on texelWeightValues to avoid reallocating
2020-03-13 23:52:51 -03:00
801fd04f75
astc: Create a LUT at compile time for encoding values
2020-03-13 23:40:02 -03:00
e183820956
astc: Make IntegerEncodedValue a trivial structure
2020-03-13 22:49:28 -03:00
70a31eda62
astc: Make IntegerEncodedValue constructor constexpr
2020-03-13 22:36:45 -03:00
5ed377b989
astc: Make IntegerEncodedValue trivially copyable
2020-03-13 22:30:31 -03:00
e7d97605e8
astc: Rename C types to common_types
2020-03-13 22:28:51 -03:00
835a3d09c6
astc: Move Popcnt to an anonymous namespace and make it constexpr
2020-03-13 22:26:48 -03:00
731a9a322e
astc: Use common types instead of stdint.h integer types
2020-03-13 22:22:27 -03:00
d3dc4e399c
astc: Use 'enum class' instead of 'enum' for EIntegerEncoding
2020-03-13 22:20:12 -03:00
096f339a2a
video_core: Silence implicit conversion warnings
2019-11-08 22:48:50 +00:00
a5aa1bb174
astc: Silence implicit conversion warnings
2019-10-27 03:04:50 -03:00
c56d893e77
video_core/textures/astc: Remove unused variables
...
Silences a few compilation warnings.
2019-05-09 18:33:36 -04:00
95261639fb
Fix Layered ASTC Textures
...
By adding the missing layer offset in ASTC compression.
2019-04-30 23:02:31 -04:00
0ad3c031f4
gl_rasterizer_cache: Move format conversion to its own file
2019-02-26 20:08:27 -03:00
60a184455c
Fix ASTC Decompressor to support depth parameter
2018-11-01 19:22:12 -04:00
6a03badcbc
astc: Initialize vector size directly in Decompress
...
There's no need to perform a separate resize.
2018-07-17 23:58:14 -04:00
0f148548f3
astc: Mark functions as internally linked where applicable
2018-07-17 23:58:14 -04:00
c5803e30d3
astc: const-correctness changes where applicable
...
A few member functions didn't actually modify class state, so these can
be amended as necessary.
2018-07-17 23:58:14 -04:00
e3fadb9616
astc: Delete Bits' copy contstructor and assignment operator
...
This also potentially avoids warnings, considering the copy assignment
operator is supposed to have a return value.
2018-07-17 23:58:14 -04:00
4cd52a34b9
astc: In-class initialize member variables where appropriate
2018-07-17 23:58:10 -04:00