Commit graph

60 commits

Author SHA1 Message Date
Margen67 5bb89328d0 Remove whitespace 2023-02-15 08:58:02 +01:00
kd-11 a272f3e3b9 rsx: Improve performance by using an integral type to indicate error 2023-01-11 16:48:53 +03:00
kd-11 7423abb136 rsx: Remove incorrect hack 2023-01-02 23:03:39 +03:00
kd-11 9fc6382909 gl: Finalize BGRA storage format internals
- Performance is terrible but it works properly now
2022-07-13 02:09:58 +03:00
kd-11 b5dcfb3431 rsx: Rework gamma override mask from RGBA to ARGB to match other per-channel mask registers 2021-08-30 11:41:19 +03:00
Eladash 7fc26b1fab rsx: Implement Texture LOD Bias addend setting 2020-12-30 15:37:21 +03:00
Eladash 7db13fdeff rsx: Move Anisotropic Filter Override to RSX state 2020-12-30 15:37:21 +03:00
Nekotekina b382d3b3e9 Remove ASSUME macro
It's dangerous and sometimes bluntly misused feature.
Its optimization potential is near-zero.
2020-12-10 14:08:02 +03:00
Nekotekina e055d16b2c Replace verify() with ensure() with auto src location.
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
kd-11 ce587f43a0 rsx: Implement signed normalized texture formats
- Already partially supported via EXP option in the shader opcode, but format decoding was disabled.
- Noticed in some UE3 games which use _SNORM variants on PC but _UNORM on rpcs3
2020-06-12 20:19:20 +03:00
kd-11 224a0e4b1a rsx: Fix data format remapping
- Includes missing 0xEE and 0x44 variants of the 2-component data format remapper
2020-05-24 13:51:19 +03:00
kd-11 118bfbbe98 rsx: Rewrite data texture remap expansion
- 16-bit channel formats have special 0x4|0xE encoding for only 2 channels, not 4
- float textures do not take any remapping and crash if you try it.
  Depth float textures work fine though.
2020-05-13 14:33:22 +03:00
Eladash d4ba7f37b6 rsx util: Implement decode_fxp<> 2019-10-18 15:41:39 +03:00
kd-11 5af8a9fbbc rsx: Fix decoding of some fixed point texture parameters
- Checked envydocs and found the correct format as fixed-point 4.8 with optional sign bit
2019-10-17 18:18:00 +03:00
kd-11 fc09572648 rsx: Implement texel border decode
- Texel borders are no longer actually supported in modern APIs
- Removes the border texels and uses border color instead which is incorrect but should work fine
2019-07-11 13:22:13 +03:00
JohnHolmesII be521ff0ab Fix warnings related to parentheses 2019-06-25 20:36:32 -07:00
Lassi Hämäläinen c963c51a60 Remove unnecessary header includes
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
kd-11 463b1b220d rsx: Improve accuracy of shadow compare Ops when non-integer depth formats are used
- The fixed-point D24S8 format does special Z clamping during compare which matches PS3 behaviour
- D32S8 is a floating point format and comparison with Dref > 1 always fails causing black edges/borders
2019-04-25 16:23:05 +03:00
eladash 348db050ae rsx: Fix texture height read 2018-10-03 20:57:46 +03:00
eladash fa723f6dc4 rsx: Fix texture depth read 2018-10-03 20:57:46 +03:00
eladash a92ae827c1 rsx: Remove texture mipmap hack 2018-10-03 20:57:46 +03:00
elad 0d4f0f95cc rsx: Clamp texture offsets (#5137)
* rsx: Clamp texture offsets

* rsx: Remove texture location check/hack
2018-09-17 10:55:17 +03:00
eladash 37ee0a2f55 Rsx/cellgcm: complete rsx_state::reset() 2018-08-29 13:37:50 +03:00
eladash f349695a75 Rsx: rewrite address translation 2018-08-13 16:16:34 +03:00
kd-11 fa55a8072c rsx: Improve vertex textures support
- Adds proper support for vertex textures, including dimensions other than 2D textures
- Minor analyser fixup, removes spurious 'analyser failed' errors
- Minor optimizations for program state tracking
2018-07-12 18:02:28 +03:00
kd-11 f559c088a1 rsx: Dubious fix for broken B8 swizzle remap 2018-03-29 13:52:11 +03:00
kd-11 321c360dcb rsx: Overhaul rendertarget sampling/shuffles
- Reimplements render target views used for sampling
- Optimizes access using an encoded control token
- Adds proper encoding for 24-bit textures (DRGB8 -> ORGB/OBGR)
- Adds proper encoding for ABGR textures (ABGR8 -> ARGB8)
- Silence some compiler warnings as well
- TODO: Real texture views for OGL current method is a hack
2018-03-25 13:31:06 +03:00
kd-11 5817f9fe3f rsx: Texture format fixes
- Implement SRGB (gamma corrected) textures (DXT1, DXT3, DXT5, RGBA8 only)
- Fix channel map decode for XY data texture formats
- Fix remap layout for X16 textures (verified with Mass Effect 3)
2018-03-25 13:31:06 +03:00
GeniusMage 4e2a8a3cdb Teepo fix
2D isn't always > 3D
2018-03-21 13:40:34 +03:00
kd-11 fcd702c8a6 rsx: Texture format fixes
- Implement low bit decode override flags for 2-component textures
- Properly implement alot of texture remaps according to the autotest results

rsx: Do not unnecessarily shuffle WZYX->RGBA unless we have proof
- From looking at format swizzles, this is incorrect
2018-01-22 11:43:35 +03:00
kd-11 e37a2a8f7d rsx: Texture cache fixes and improvments
gl/vk/rsx: Refactoring; unify texture cache code
gl: Fixups
- Removes rsx::gl::texture class and leave gl::texture intact
- Simplify texture create and upload mechanisms
- Re-enable texture uploads with the new texture cache mechanism
rsx: texture cache - check if bit region fits into dst texture before attempting to copy
gl/vk: Cleanup
- Set initial texture layout to DST_OPTIMAL since it has no data in it anyway at the start
- Move structs outside of classes to avoid clutter
2017-09-21 16:17:06 +03:00
kd-11 66835cf083 rsx: Fix mipmap count calculation 2017-03-29 23:06:17 +03:00
kd-11 1e71285de8 gl/vk/dx12: Implement forced channel remapping
gcc fix
2017-03-06 14:34:29 +03:00
raven02 77f8ce503d RSX texture refactor (#2144) 2016-09-19 09:25:49 +08:00
Vincent Lejeune 4c46bde315 rsx: Inline rsx_state and texture constructors. 2016-07-31 16:48:09 +02:00
Vincent Lejeune 8b12379eb3 rsx: Use bitfield template to decode values. 2016-07-27 18:38:36 +02:00
Vincent Lejeune 772706ca4c Factorize rsx state 2016-07-07 21:38:57 +02:00
DH 989f954432 Added WIP vertex textures support 2016-06-28 12:58:44 +03:00
DH f30d71da6c OpenGL renderer: improved vertex attributes setup
Minor fixes
2016-06-22 22:46:47 +03:00
Vincent Lejeune 5a3cf5d9ac rsx/common: Remove extra "-2" in get_exact_mipmap_count non compressed format. 2016-03-31 20:40:19 +02:00
Vincent Lejeune 91d0229bc5 rsx/common: Use an help texture_dimension_extended to handle cubemap more cleanly. 2016-03-30 22:19:29 +02:00
Vincent Lejeune b7c539ad7a rsx/common: Make get_exact_mipmap_count take compressed format into account 2016-03-30 22:19:29 +02:00
Vincent Lejeune 73233fd347 rsx/common: Use typed class for texture filters. 2016-03-30 20:03:50 +02:00
Vincent Lejeune d971c4e0f6 rsx/common: Use typed enum for max anisotropy. 2016-03-30 20:03:50 +02:00
Vincent Lejeune 7f25720bd3 rsx/common: Use a typed enum for texture wrap mode. 2016-03-30 20:03:50 +02:00
Vincent Lejeune f2c82d3cf4 rsx/common: Use a typed class for texture dimension. 2016-03-30 20:03:50 +02:00
Vincent Lejeune 9485fe2693 rsx/common/gl/d3d12/vulkan: Use exact mimap counts.
Fix invalid textures in gl backend.
2016-03-25 21:37:53 +01:00
kd-11 7d70be42af Correctly fetch correct pitch and depth for textures from RSX
Include vertex textures too

Set correct stride for vertex texture params

Change references to gl_Position in D3D12FragmentProgramDecompiler

Revert bad commit
2016-02-15 11:15:51 +03:00
DHrpcs3 8912b9880e rsx: initialize vertex textures on reset 2016-01-06 13:30:25 +02:00