1
0
Fork 0
forked from eden-emu/eden
Commit graph

311 commits

Author SHA1 Message Date
namkazy
93a5b51a1f clang-format 2020-03-30 17:44:48 +07:00
Nguyen Dac Nam
e57c348d6e shader_decode: implement ATOMS instr partial. 2020-03-30 17:44:46 +07:00
makigumo
4a1a5ea61e xmad: fix clang build error 2020-03-23 00:09:31 +01:00
bunnei
4785b963c3 Merge pull request #3505 from namkazt/patch-8
shader_decode: implement XMAD mode CSfu
2020-03-19 17:41:01 -04:00
Rodrigo Locatti
944d38efc8 Merge pull request #3502 from namkazt/patch-3
shader_decode: Reimplement BFE instructions
2020-03-15 21:23:04 -03:00
Nguyen Dac Nam
2cd41ab020 clang-format 2020-03-14 10:07:40 +07:00
Nguyen Dac Nam
d13e860a08 nit 2020-03-14 09:57:24 +07:00
Nguyen Dac Nam
12b08c1725 nit & remove some optional param 2020-03-13 20:47:38 +07:00
Nguyen Dac Nam
0a64ee04e3 shader_decode: implement XMAD mode CSfu 2020-03-13 19:01:49 +07:00
Nguyen Dac Nam
a9e6b48dc0 clang-format 2020-03-13 15:38:57 +07:00
Nguyen Dac Nam
be63f9a0a2 Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
2020-03-13 15:35:15 +07:00
Nguyen Dac Nam
edabb9957a shader_decode: BFE add ref of reverse parallel method. 2020-03-13 14:20:18 +07:00
Nguyen Dac Nam
8b2bc366f8 shader_decode: implement BREV on BFE
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
2020-03-13 14:13:31 +07:00
Nguyen Dac Nam
86eb7ea0c7 shader_decode: Reimplement BFE instructions 2020-03-13 12:48:01 +07:00
ReinUsesLisp
99be31c902 video_core: Rename "const buffer locker" to "registry" 2020-03-09 18:40:06 -03:00
Nguyen Dac Nam
bb39862dfe shader: FMUL switch to using LUT (#3441)
* shader: add FmulPostFactor LUT table

* shader: FMUL apply LUT

* Update src/video_core/engines/shader_bytecode.h

Co-Authored-By: Mat M. <mathew1800@gmail.com>

* nit: mistype

* clang-format & add missing import

* shader: remove post factor LUT.

* shader: move post factor LUT to function and fix incorrect order.

* clang-format

* shader: FMUL: add static to post factor LUT

* nit: typo

Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-02-27 11:14:25 -05:00
bunnei
3cb09e3570 Merge pull request #3440 from namkazt/patch-6
shader: implement LOP3 fast replace for old function
2020-02-26 10:24:35 -05:00
ReinUsesLisp
8ab2e5f561 shader/texture: Fix illegal 3D texture assert
Fix typo in the illegal 3D texture assert logic. We care about catching
arrayed 3D textures or 3D shadow textures, not regular 3D textures.
2020-02-21 15:57:27 -03:00
Nguyen Dac Nam
96e43427e5 nit: add const to where it need. 2020-02-21 21:16:45 +07:00
Nguyen Dac Nam
0c3acedaf9 shader: implement LOP3 fast replace for old function
ref: https://devtalk.nvidia.com/default/topic/1070081/cuda-programming-and-performance/reverse-lut-for-lop3-lut/
2020-02-21 19:08:07 +07:00
bunnei
fbd58d36d1 Merge pull request #3415 from ReinUsesLisp/texture-code
shader/texture: Allow 2D shadow arrays and simplify code
2020-02-19 20:06:14 -05:00
Nguyen Dac Nam
a57853e085 shader_conversion: I2F : add Assert for case src_size is Short 2020-02-19 11:40:35 +07:00
Nguyen Dac Nam
92153118ab fix warning 2020-02-19 11:10:26 +07:00
Nguyen Dac Nam
84fc48b0eb clang-format fix 2020-02-19 11:02:59 +07:00
Nguyen Dac Nam
0d9361d21f shader_conversion: add conversion I2F for Short 2020-02-19 10:54:37 +07:00
ReinUsesLisp
f37f4e76d6 shader/texture: Allow 2D shadow arrays and simplify code
Shadow sampler 2D arrays are supported on OpenGL, so there's no reason
to forbid these. Enable textureLod usage on these.

Minor style changes.
2020-02-15 02:36:28 -03:00
bunnei
082ba6fc64 Merge pull request #3379 from ReinUsesLisp/cbuf-offset
shader/decode: Fix constant buffer offsets
2020-02-14 13:22:53 -05:00
bunnei
5160900bec Merge pull request #3369 from ReinUsesLisp/shf
shader/shift: Implement SHF
2020-02-07 22:06:57 -05:00
ReinUsesLisp
389cb51a33 shader/decode: Fix constant buffer offsets
Some instances were using cbuf34.offset instead of cbuf34.GetOffset().
This returned the an invalid offset. Address those instances and rename
offset to "shifted_offset" to avoid future bugs.
2020-02-05 12:19:09 -03:00
bunnei
a683c3c57c Merge pull request #3357 from ReinUsesLisp/bfi-rc
shader/bfi: Implement register-constant buffer variant
2020-02-04 15:14:13 -05:00
bunnei
223e535f65 Merge pull request #3356 from ReinUsesLisp/fcmp
shader/arithmetic: Implement FCMP
2020-02-04 11:36:59 -05:00
bunnei
d02c1c1f75 Merge pull request #3337 from ReinUsesLisp/vulkan-staged
yuzu: Implement Vulkan frontend
2020-02-03 16:56:25 -05:00
ReinUsesLisp
4f5791e529 shader: Remove curly braces initializers on shared pointers 2020-02-01 22:52:10 -03:00
bunnei
1de7f0beeb Merge pull request #3282 from FernandoS27/indexed-samplers
Partially implement Indexed samplers in general and specific code in GLSL
2020-02-01 20:41:40 -05:00
ReinUsesLisp
62ab366971 shader/shift: Implement SHIFT_RIGHT_{IMM,R}
Shifts a pair of registers to the right and returns the low register.
2020-02-01 21:20:02 -03:00
ReinUsesLisp
0ff3ea3188 shader/shift: Implement SHF_LEFT_{IMM,R}
Shifts a pair of registers to the left and returns the high register.
2020-02-01 21:19:44 -03:00
bunnei
74aeae1ae7 Merge pull request #3347 from ReinUsesLisp/local-mem
shader/memory: Implement LDL.S16, LDS.S16, STL.S16 and STS.S16
2020-01-30 10:59:52 -05:00
ReinUsesLisp
1d17aca3f5 shader/other: Fix skips for SYNC and BRK 2020-01-29 17:53:11 -03:00
ReinUsesLisp
1c642262eb shader/other: Stub S2R LaneId 2020-01-29 17:53:11 -03:00
ReinUsesLisp
ca61e82f85 shader/bfi: Implement register-constant buffer variant
It's the same as the variant that was implemented, but it takes the
operands from another source.
2020-01-27 01:20:38 -03:00
ReinUsesLisp
098218ff4c shader/arithmetic: Implement FCMP
Compares the third operand with zero, then selects between the first and
second.
2020-01-27 01:15:44 -03:00
ReinUsesLisp
0d8f0ad3b3 shader/memory: Implement ATOM.ADD
ATOM operates atomically on global memory. For now only add ATOM.ADD
since that's what was found in commercial games.

This asserts for ATOM.ADD.S32 (handling the others as unimplemented),
although ATOM.ADD.U32 shouldn't be any different.

This change forces us to change the default type on SPIR-V storage
buffers from float to uint. We could also alias the buffers, but it's
simpler for now to just use uint. While we are at it, abstract the code
to avoid repetition.
2020-01-26 01:54:24 -03:00
Fernando Sahmkow
2e6a1b965d Shader_IR: Address feedback. 2020-01-25 09:04:59 -04:00
ReinUsesLisp
0340f04b84 shader/memory: Implement STL.S16 and STS.S16 2020-01-25 03:16:10 -03:00
ReinUsesLisp
edd5e604be shader/memory: Implement unaligned LDL.S16 and LDS.S16 2020-01-25 03:16:10 -03:00
ReinUsesLisp
851d3adc24 shader/memory: Move unaligned load/store to functions 2020-01-25 03:16:10 -03:00
ReinUsesLisp
cff97272d2 shader/memory: Implement LDL.S16 and LDS.S16 2020-01-25 03:15:55 -03:00
Fernando Sahmkow
26b5aa702d Shader_IR: Change name of TrackSampler function so it does not confuse with the type. 2020-01-24 16:44:48 -04:00
Fernando Sahmkow
b6d3153e7e Shader_IR: Propagate bindless index into the GL compiler. 2020-01-24 16:44:47 -04:00
Fernando Sahmkow
123c7cf307 Shader_IR: deduce size of indexed samplers 2020-01-24 16:43:31 -04:00