Commit graph

56 commits

Author SHA1 Message Date
kd-11
94656ac1e3 rsx/vp: Warnings cleanup 2019-09-01 18:59:50 +03:00
kd-11
fe6ff8622a rsx: Decompiler fixups for conditional execution
- Cond actually obeys vector mask
2019-08-26 20:03:31 +03:00
kd-11
c9501b60ab rsx: Use explicit fma for MAD emulation 2019-06-25 20:50:54 +03:00
scribam
13671d9684 rsx: Apply Clang-Tidy fix "modernize-loop-convert" + const when relevant 2019-06-12 15:11:52 +03:00
scribam
801fa0113f rsx: Apply Clang-Tidy fix "readability-inconsistent-declaration-parameter-name" 2019-06-12 15:11:52 +03:00
scribam
81a3b49c2f rsx: Apply Clang-Tidy fix "readability-container-size-empty" 2019-06-12 15:11:52 +03:00
kd-11
243df38360 rsx: Fix VP writes to CC with a MOV instruction
- When moving to CC, the operation has VEC flag disabled and also temp
regs disabled. Looks to be the catch-all ELSE in the selection logic.
2019-04-25 16:23:05 +03:00
kd-11
06a85f00d1 rsx: Shader decompiler cleanup and improvements
- Improve support for float16_t by minimizing mixed inputs to functions
(ambiguous overloads)
- Minimize amount of downcasts in code by using opcode flags
- Re-enable float16_t support for vulkan
2019-04-25 16:23:05 +03:00
kd-11
7555be232f rsx/vp: Fix double dst commands
- Test the vec_result mask before assigning to actual output
  Sometimes, VEC op is used to write to Rx, and SCA op is used to write to o[x]!
2018-12-24 09:05:19 +03:00
kd-11
4b79ef1ad9 rsx: Implement stencil mirror views
- Implements a mirror view of D24S8 data that accesses the stencil components.
  Finishes the implementation of TEX2D_DEPTH_RGBA as the stencil component was previously missing from the reconstructed data
- Add a few missing destructors
  Image classes are inherited a lot and I forgot to make the dtors virtual
2018-12-24 09:05:19 +03:00
kd-11
696b91cb9b rsx: Reimplement conditional execution in shaders
- Per-channel conditional execution introduces RAW hazards all over the place
- Its cheaper to process both branches and select between the two
- Also improves ShaderVariable functionality to allow functionality such as match_size and taking complex variables as inputs
2018-12-24 09:05:19 +03:00
kd-11
16dcbe8c74 rsx/vp: Fix ARL opcode properly
- NOTE: The address swizzle index is only for use as src. The address registers are only used one channel at a time.
- When the destination of ARL, the encoding is the same as the other temp registers
2018-09-15 11:57:06 +03:00
scribam
d7bb59cd99 c++17: use std::size 2018-09-06 13:15:59 +03:00
scribam
65d270e5d8 clang-tidy: performance-faster-string-find
https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html
2018-07-15 12:51:09 +04: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
d78957d1cf rsx/vp: CodeGen improvements
- Fix double destination writes on conditional write masking
- Fix codegen to simplify simple scalar comparisons vs vector functions
2018-07-07 16:20:33 +03:00
kd-11
2c34195954 rsx/vp: Discard broken vertex programs with no writes to POS register 2018-07-07 16:20:33 +03:00
kd-11
2ca935a26b vp: Improve vertex program analyser
- Adds dead code elimination
- Fix absolute branch target addresses to take base address into account
- Patch branch targets relative to base address to improve hash matching
- Bumps shader cache version
- Enables shader logging option to write out vertex program binary,
  helpful when debugging problems.
2018-07-07 16:20:33 +03:00
kd-11
bd915bfebd rsx: vp decompiler fixes
- Fix program abort logic to never abort before resolving later label addresses
  Fixes jumping over broken code and jumping over END markers
- TEXTURE_CONTROL2 has indexing range of [0..15] without stride skipping!
  This register does not have interleaving with other texture registers
- Track shader address poke as it seems to invalidate programs as well
2018-07-07 16:20:33 +03:00
scribam
04ad49de4d typos 2018-05-14 21:14:39 +04:00
kd-11
a52ea7f870 rsx: Improve fragment and vertex program usage
- Introduces a gpu program analyser step to examine shader contents before attempting compilation or cache search
  - Avoids detecting shader as being different because of unused textures having state changes
  - Adds better program size detection for vertex programs
- Improved vertex program decompiler
  - Properly support CAL type instructions
  - Support jumping over instructions marked with a termination marker with BRA/CAL class opcodes
  - Fix SRC checks and abort
  - Fix CC register initialization
  - NOTE: Even unused SRC registers have to be valid (usually referencing in.POS)
2018-05-13 14:44:14 +03:00
kd-11
33bcdd476c glsl/fp/vp: Avoid shader clutter
- Do not add unused subroutines in shaders unless necessary
-- makes shaders easier to read and disassembled spir-v has less clutter
- glsl: Replace switch block with lookup table
2018-01-30 21:16:43 +03:00
kd-11
648fc92184 rsx/fp/vp: Epsilon value is too large!
- Original epsilon value was 1.E-10 which nvidia linux driver could not read properly
-- Restores the original value represented in decimal notation
2018-01-30 21:16:43 +03:00
kd-11
1ea5e7404a rsx: Workaround for nvidia linux
- For some reason, using 1.E-x notation does not work on nvidia linux. Could be a bug in spir-v generator or the driver itself
2017-12-31 12:43:40 +03:00
kd-11
9a7ce2fd29 rsx/vp: ARL fix 2017-08-26 21:53:54 +03:00
Jake
5d7c454e52 rsx: Vertex Decompiler, fix sca register assignment 2017-08-19 12:27:53 +03:00
mp-t
607d2486ea Code review (#3114)
* Fix always-true conditions in sceNp module

* gl_render_targets: useless check on unsigned variable, possible bug

* fixed UB in crypto utility functions

* copy-paste error in vk::init_default_resources

* pass strings by const ref

* Dont copy vectors. Make sure copies are not needed because functions are used in a multi-threaded context.
2017-08-01 20:22:33 +03:00
Jake
fde6099769 rsx: Fix vertex decompiler to support 2 arg destination 2017-07-22 09:41:00 +03:00
scribam
9747ab61f9 Missing function names (HLE) and small fixes (#3038)
* Add sceNpScoreGetFriendsRanking and sceNpScoreGetFriendsRankingAsync functions

* Add sceNpSnsFbGetLongAccessToken function

* Add new functions for the sceNpTus module

* Add new functions for the cellSailRec module

* Stub cellCrossControllerInitialize

* Add sceNpAuth* functions for the sceNp2 module

* Remove unnecessary call to c_str()

* Add missing module id "CELL_SYSMODULE_ADEC_AT3MULTI"

* Add Turkish keyboard mapping constant

* Add cellOskDialogExtRegisterKeyboardEventHookCallbackEx function

* Update cellSubDisplay

* Update cotire version to 1.7.10

* Replace cellSubdisplay by cellSubDisplay

* Update cellSysutil.cpp with new functions stubbed
2017-07-21 18:41:11 +03:00
kd-11
1de2ceca9b rsx/vp: Fixes (#2533)
* rsx/vp: Fix rsq opcode broken in previous commit

* fix ms compiler error

* fix another possible conflict with ms d3d compiler
2017-03-14 16:05:59 +03:00
kd-11
be4bb48476 rsx/fp: Fix some decompiler bugs 2017-03-13 23:40:34 +03:00
kd-11
9263999ad1 [rsx/vp] Improve BRB opcode implementation
fix merge issues
2017-02-26 10:17:34 +03:00
O1L
07a366b608 VP decompiler: fixed condition update flags using 2017-01-23 23:49:17 +03:00
kd-11
fb5df32990 rsx/vs: decode sca ops after vec ops 2016-12-15 14:36:28 +03:00
kd-11
8454949eea gl/vk/rsx: Add a cross-platform overlay text; Minor perf improvements and rsx bugfixes (#2196)
* gl/rsx: Implement platform-agnostic text overlays

gl: Restore performance metrics using new text out helper

gl/rsx: Refactor text generation class

* vk: Enable text overlay

gl/vk: Polish overlay counters implementation

gl: Better resource shutdown for text writer

* gl: Optimization, do not rebind TIUs every frame. Speedup

* gl: Optimizations and improvements to vertex upload code

* gl/vk: Texture format swizzles

vk: Texture format fix

vk: Fix YX format swizzles

* rsx: Decode vertex texture index
2016-10-11 08:55:42 +08:00
kd-11
867e9210d7 gl/vk: Enable vertex texture fetch (#2127)
* gl: Enable vertex textures

* rsx: use textureLod instead of generic texture sample

* rsx: handle uploading of W32_X32_Y32_Z32

* gl: Re-enable proper shader logging

remove old logging method that overwrites single file

* gl: Declare texture_coord_scale for vertex samplers

* gl: texture remap fixes; enable remap for vertex textures

* gl: offset texture indices to base layer 16

* rsx: Fix W32_Z32_Y32_X32_FLOAT subresource layout

* vk: Enable vertex textures

* rsx: define special calls for vertex texture fetch

* gl: improved vertex texture fetch setup

* vk: Fix texture formats and component mapping

* vk: Implement vertex texture fetch functions properly

* vk/gl: proper fix for primitive restart index

revert inadvertent decompiler update

* gl: Disable filtering for vertex textures
2016-09-20 22:23:56 +08:00
raven02
db27ea923d VP: add few opcodes comment for vec/sca (#1750) 2016-06-10 01:03:43 +03:00
Nekotekina
266db1336d The rest 2016-05-23 16:22:25 +03:00
Nekotekina
b85a68e8a1 Partial commit: RSX 2016-04-15 19:22:36 +03:00
Vincent Lejeune
1f7a1e4078 rsx/common/d3d12/gl: Fix lit and rsq behavior near 0 in vertex shaders. 2016-02-08 17:35:49 +01:00
Nekotekina
38531459df Logging system rewritten
GUI doesn't freeze anymore
Some things simplified
2016-01-13 18:54:57 +03:00
Vincent Lejeune
bab52c132d rsx/common/d3d12/gl: Clean ProgramStateCache
Use a_b_c format.
Use using =
Use tuple as output
Use RAII to delete program safely
Ensure const correctness.
2016-01-11 19:21:57 +01:00
Nekotekina
3ed603074c Changes done by [DH] rewritten
Added rsx_program_decompiler submodule
Added fs::dir iterator
Added fmt::match
2015-12-22 23:11:20 +03:00
Vincent Lejeune
69b3828086 rsx/common: Vertex program condition swizzle should apply to cc0, not float4(0.) 2015-12-16 20:36:50 +01:00
Vincent Lejeune
a21c9f9861 rsx: Avoid mixing float4 and int4 in declaration of AddrReg. 2015-11-30 17:35:51 +01:00
Vincent Lejeune
a79ffdb485 rsx/common: Fix ARL register type and write function in vtx shader 2015-11-15 17:20:41 +01:00
Raul Tambre
fac9d74344 Lots of defect fixes 2015-11-09 07:39:50 +02:00
Vincent Lejeune
b0f8611f49 Common/GL/D3D12: Fix int vector ctor in vertex shader and a compare opcode. 2015-10-15 17:13:42 +02:00
DH
cc0c3fc98d Implemented fragment constants loading (OpenGL renderer)
Fixed nv308a::color
Minor improvements
2015-10-07 17:36:26 +03:00
Raul Tambre
4666f190db Fix BRI instruction, fixes #1165 2015-09-07 20:14:00 +03:00