Commit graph

136 commits

Author SHA1 Message Date
Herman Semenoff
96ea686eb6
Fixed return strict const iterator, replace to range-based loop C++17 and code refactor (#548)
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru>
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
2024-10-18 11:06:11 +03:00
squidbus
dcc4057dd8
shader_recompiler: Set correct operand field for VOP3b sdst. (#1335) 2024-10-10 23:04:51 +03:00
squidbus
09cbccb40b
shader_recompiler: Implement V_SUBB_U32 and V_SUBBREV_U32. (#1331) 2024-10-10 19:40:19 +03:00
squidbus
d91ad6174e
shader_recompiler: Move sampling parameter resolution to tracking pass and support more derivative types. (#1290)
* shader_recompiler: Move sampling parameter resolution to tracking pass and support more derivative types.

* shader_recompiler: Only track sampler sharp on sample instructions.

* shader_recompiler: Fix Inst args size.
2024-10-10 19:27:34 +03:00
TheTurtle
100036aecf
spirv: Flush denormals if possible (#1302) 2024-10-10 17:47:39 +03:00
Stephen Miller
aba803bd04
IMAGE_GATHER4_C_LZ_O (#1274)
Used by Crash Team Racing Nitro Fueled.
2024-10-08 10:35:07 +03:00
TheTurtle
310814ac71
shader_recompiler: Support for more offset layouts (#1270) 2024-10-06 18:43:59 +02:00
squidbus
2a7d56dbf2
shader_recompiler: Remove outdated image array warning. (#1256) 2024-10-06 01:42:58 +03:00
psucien
927bb0c175
Initial support of Geometry shaders (#1244)
* video_core: initial GS support

* fix for components mapping; missing prim type
2024-10-06 01:26:50 +03:00
Mahmoud Adel
76644a0169
add Opcodes to switch case (#1233)
* add Opcodes to switch case

Added Opcodes to switch case, they were done here but weren't added to switch 9f79764b01 (diff-9a6c2e2027c03231e88aaaab30908baecae202661839f35c31a777fec2500c7aR659)

* clang
2024-10-04 11:24:45 +03:00
korenkonder
9f79764b01
Add various V_CVT opcodes (#1223) 2024-10-04 08:48:05 +02:00
korenkonder
da519f9091
Moved opcode to it's proper location (#1221) 2024-10-03 22:47:26 +02:00
ElBread3
ff13aff862
video_core: IMAGEGATHER4_C_O (#1210) 2024-10-03 18:48:54 +02:00
dbz400
54dafce541
Add V_CVT_F64_I32 (#1219) 2024-10-03 18:48:28 +02:00
squidbus
e68774d449
shader_recompiler: Define fragment output type based on number format. (#1097)
* shader_recompiler: Define fragment output type based on number format.

* shader_recompiler: Fix GetAttribute SPIR-V output type.

* shader_recompiler: Don't bitcast on SetAttribute unless integer target.
2024-10-01 23:42:37 +03:00
dbz400
c7ff0419ad
Fix V_CMP_CLASS_F32 (#1153) 2024-09-30 11:36:26 +03:00
jnack
beb809b612
add V_CMPX_LE_I32 (#1056) 2024-09-24 18:22:31 +03:00
baggins183
7f9bc0abbd
fix lane inst decoding (#1051) 2024-09-24 12:29:57 +03:00
TheTurtle
ee38eec7fe
shader_recompiler: Additional scope handling and user data as push constants (#1013)
* shader_recompiler: Use push constants for user data regs

* shader: Add some GR2 instructions

* shader: Add some instructions

* shader: Add instructions for knack

* touchups

* spirv: Better names

* buffer_cache: Ignore non gpu modified images

* clang format

* Add log

* more fixes
2024-09-23 08:55:43 +02:00
squidbus
a18419dd73
shader_recompiler: Exclude non-float results from output modifiers. (#1016) 2024-09-22 15:03:17 +03:00
korenkonder
8811cc5cc6
Add V_CVT_PK_U8_F32 opcode (#1022) 2024-09-22 15:02:34 +03:00
TheTurtle
edde0a3e7e
hotfix: Revert ADDC change 2024-09-22 01:53:10 +03:00
squidbus
dd184fd95d
shader_recompiler: Use SetDst in more instructions. (#1015) 2024-09-22 01:41:19 +03:00
psucien
5f4ddc14fc
Image subresources barriers (#904)
* video_core: texture: image subresources state tracking

* shader_recompiler: use one binding if the same image is read and written

* video_core: added rebinding of changed textures after overlap resolve

* don't use pointers; slight `FindTexture` refactoring

* video_core: buffer_cache: don't copy over the image size

* redundant barriers removed; fixes

* regression fixes

* texture_cache: 3d texture layers count fixup

* shader_recompiler: support for partially bound cubemaps

* added support for cubemap arrays

* don't bind unused color buffers

* fixed depth promotion to do not use stencil

* doors

* bonfire lit

* cubemap array index calculation

* final touches
2024-09-21 21:45:56 +02:00
korenkonder
07de1ee977
Sort opcodes by their indices. Group them too when applicable (#945) 2024-09-19 20:29:56 +02:00
Raven
84e2c4d3bb
Add other 64-bit floating point shader instructions (#944) 2024-09-17 18:01:33 +02:00
Daniel R.
dcf245b814
shader_recompiler: Implement basic 64-bit floating point support (#915)
* shader_recompiler: Implement basic 64-bit floating point support

* Fix formatting
2024-09-15 22:53:08 +02:00
Raven
b14f447060
Add DS_READ2ST64_B32 (#916)
* Add DS_READ2ST64_B32

* Fix CLANG

* Fix CI again

* Parameter update for DS_READ
2024-09-14 21:16:12 +03:00
Raven
5c5c02cb04
Add S_XOR_B32 opcode (#911)
* Add S_XOR_B32

* Stub S_OR_B32
2024-09-14 18:52:30 +03:00
Raven
12a0a02e38
Map BUFFER_AUTOMIC SMIN/SAMX/AND/OR/XOR/INC/DEC (#910) 2024-09-14 18:52:20 +03:00
Emulator-Team-2
c924457e28
Implement IMAGE_SAMPLE_L_O opcode (#899) 2024-09-13 19:20:35 +02:00
Luke Warner
c181102a02
Implement S_ABSDIFF_I32 shader instruction (#902) 2024-09-13 19:02:17 +02:00
TheTurtle
1b6cc447b4
hotfix: Restore unreachable 2024-09-12 23:46:29 +03:00
illusion0001
b911c70d35
Silence unhandled case warns (#823) 2024-09-12 23:01:13 +03:00
TheTurtle
b0bbb16aae
video_core: Add fallback path for pipelines with more than 32 bindings (#837)
* video_core: Small fixes

* renderer_vulkan: Add fallback path for pipelines with more than 32 bindings

* vk_resource_pool: Rewrite desc heap

* work
2024-09-10 20:54:39 +03:00
Andrew Middendorp
4502a5ddcc
Added S_ANDN2_B32 and S_NAND_B32 opcodes (#833)
* Added S_ANDN2_B32 and S_NAND_B32 opcodes

* Update src/shader_recompiler/frontend/translate/scalar_alu.cpp

Co-authored-by: baggins183 <baggins31084@proton.me>

* Fix result and src1

Co-authored-by: baggins183 <baggins31084@proton.me>

* update result

Co-authored-by: baggins183 <baggins31084@proton.me>

* Update src1

Co-authored-by: baggins183 <baggins31084@proton.me>

---------

Co-authored-by: baggins183 <baggins31084@proton.me>
2024-09-09 22:46:57 +03:00
TheTurtle
13743b27fc
shader_recompiler: Implement data share append and consume operations (#814)
* shader_recompiler: Add more format swap modes

* texture_cache: Handle stencil texture reads

* emulator: Support loading font library

* readme: Add thanks section

* shader_recompiler: Constant buffers as integers

* shader_recompiler: Typed buffers as integers

* shader_recompiler: Separate thread bit scalars

* We can assume guest shader never mixes them with normal sgprs. This helps avoid errors where ssa could view an sgpr write dominating a thread bit read, due to how control flow is structurized, even though its not possible in actual control flow

* shader_recompiler: Implement data append/consume operations

* clang format

* buffer_cache: Simplify invalidation scheme

* video_core: Remove some invalidation remnants

* adjust
2024-09-07 00:14:51 +03:00
Stephen Miller
09ce12a868
shader_recompiler: Add more opcodes (#802)
* Implement some missing shader opcodes

Implements TBUFFER_STORE_FORMAT_XYZW, IMAGE_SAMPLE_CD, and IMAGE_GATHER4_C_LZ.

These are seen in https://github.com/shadps4-emu/shadPS4/issues/496.

* Implement IMAGE_STORE_MIP

Not sure if this is the right way to do this, let me know if this needs changing.

* Revert "Implement IMAGE_STORE_MIP"

This reverts commit cff78b5924.
2024-09-06 23:51:20 +03:00
baggins183
bb29224daf
Implement V_MOVREL variants (#745)
* shader_recompiler: Implement V_MOVRELS_B32, V_MOVRELD_B32,
V_MOVRELSD_B32

Generates a ton of OpSelects to hardcode reading or writing from each
possible vgpr depending on the value of m0

Future work is to do range analysis to put an upper bound on m0 and
check fewer registers.

* fix runtime info after rebase
2024-09-06 23:47:47 +03:00
georgemoralis
0dd6e257c5
Merge pull request #573 from polybiusproxy/shader_recompiler/format
shader_recompiler/frontend: Miscellaneous fixes
2024-09-04 23:21:23 +03:00
Sebastian Kassai
0a5c36482e
shader_recompiler: change ir.SetScalarReg() -> SetDst() (#777)
Fixes an out-of-bounds crash on Amplitude and Rock Band 4 startup.
2024-09-04 17:30:43 +03:00
squidbus
d48836d5ae
shader_recompiler: Limit src0 to 4-bit in V_CVT_OFF_F32_I4 (#759) 2024-09-03 21:37:52 +03:00
TheTurtle
f087f43736
shader_recompiler: Implement render target swizzles when no format is available (#739)
* shader_recompiler: Use null image when shader is compiled with unbound sharp

* video_core: Refactor and render target swizzles

* liverpool_to_vk: Add missing swap format from RDR

* video_core: Refactor shader recompiler interface

* Makes it much easier to pass runtime information to the recompiler and have it treated as part of the shader key. Also pulls out most runtime state from Info struct

* shader_recompiler: Avoid some asserts
2024-09-03 14:04:30 +03:00
baggins183
101aeb920d
Implement V_BFM_B32 and V_FFBH_U32 (#663)
* Implement V_BFM_B32

* Render.Recompiler: Implement V_FFBH_U32

* fix clang-format
2024-09-01 22:20:42 +03:00
Grégoire Hage
1bd9317509
Implement V_READFIRSTLANE_B32 (#681)
* Implement V_READFIRSTLANE_B32

* refactor
2024-09-01 21:49:42 +03:00
Daniel R.
84f1690dfb
Merge branch 'shadps4-emu:main' into shader_recompiler/format 2024-08-30 15:40:17 +02:00
Grégoire Hage
1651db24fe
Implement S_XNOR_B64 (#654) 2024-08-30 02:43:12 +03:00
IndecisiveTurtle
6fbbe3d79b translator: Add missed flow instruction 2024-08-30 00:26:01 +03:00
TheTurtle
66e96dd944
video_core: Account of runtime state changes when compiling shaders (#575)
* video_core: Compile shader permutations

* spirv: Only specific storage image format for atomics

* ir: Avoid cube coord patching for storage image

* spirv: Fix default attributes

* data_share: Add more instructions

* video_core: Query storage flag with runtime state

* kernel: Use std::list for semaphore

* video_core: Use texture buffers for untyped format load/store

* buffer_cache: Limit view usage

* vk_pipeline_cache: Fix invalid iterator

* image_view: Reduce log spam when alpha=1 in storage swizzle

* video_core: More features and proper spirv feature detection

* video_core: Attempt no2 for specialization

* spirv: Remove conflict

* vk_shader_cache: Small cleanup
2024-08-29 19:29:54 +03:00
georgemoralis
18e95ae4c0
Merge branch 'main' into shader_recompiler/format 2024-08-29 10:18:12 +03:00