ReinUsesLisp
d66cae7bd5
shader_decompiler: Remove FragCoord.w hack and change IPA implementation
...
Credits go to gdkchan and Ryujinx. The pull request used for this can
be found here: https://github.com/Ryujinx/Ryujinx/pull/1082
yuzu was already using the header for interpolation, but it was missing
the FragCoord.w multiplication described in the linked pull request.
This commit finally removes the FragCoord.w == 1.0f hack from the shader
decompiler.
While we are at it, this commit renames some enumerations to match
Nvidia's documentation (linked below) and fixes component declaration
order in the shader program header (z and w were swapped).
https://github.com/NVIDIA/open-gpu-doc/blob/master/Shader-Program-Header/Shader-Program-Header.html
2020-04-01 21:48:55 -03:00
Fernando Sahmkow
207bfbf720
Merge pull request #3561 from ReinUsesLisp/f2f-conversion
...
shader/conversion: Fix F2F rounding operations with different sizes
2020-03-31 14:45:02 -04:00
Fernando Sahmkow
8a4af4f128
Merge pull request #3577 from ReinUsesLisp/lea
...
shader/lea: Fix LEA implementation
2020-03-31 14:36:07 -04:00
Nguyen Dac Nam
e0add44428
clang-format
2020-03-31 08:08:06 +07:00
Nguyen Dac Nam
455a771f6c
shader_decode: fix by suggestion
2020-03-31 08:02:44 +07:00
namkazy
5961fe334c
clang-format
2020-03-30 20:46:21 +07:00
namkazy
fd7fb7c1b7
shader_decode: ATOM/ATOMS: add function to avoid code repetition
2020-03-30 18:47:50 +07:00
Nguyen Dac Nam
3809c15721
shader_decode: implement ATOM operation for S32 and U32
2020-03-30 17:44:48 +07:00
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
Nguyen Dac Nam
cf457eafff
shader: node - update correct comment
2020-03-30 17:44:44 +07:00
Nguyen Dac Nam
407064c658
shader_decode: add Atomic op for common usage
2020-03-30 17:44:44 +07:00
ReinUsesLisp
74b1f71109
shader/lea: Simplify generated LEA code
2020-03-28 03:55:04 -03:00
ReinUsesLisp
fda10c4b0b
shader/lea: Fix op_a and op_b usages
...
They were swapped.
2020-03-27 18:37:20 -03:00
ReinUsesLisp
ca9309bc07
shader/lea: Remove const and use move when possible
2020-03-27 18:36:38 -03:00
ReinUsesLisp
82d53d445a
shader/conversion: Fix F2F rounding operations with different sizes
...
Rounding operations only matter when the conversion size of source and
destination is the same, i.e. .F16.F16, .F32.F32 and .F64.F64.
When there is a mismatch (.F16.F32), these bits are used for IEEE
rounding, we don't emulate this because GLSL and SPIR-V don't support
configuring it per operation.
2020-03-26 01:58:49 -03:00
bunnei
2647e03b76
Merge pull request #3544 from makigumo/myfork/patch-2
...
xmad: fix clang build error
2020-03-25 19:29:16 -04:00
bunnei
b769578c49
Merge pull request #3520 from ReinUsesLisp/legacy-varyings
...
gl_shader_decompiler: Implement legacy varyings
2020-03-25 19:27:51 -04: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
ReinUsesLisp
bba58f7272
shader/shader_ir: Track usage in input attribute and of legacy varyings
2020-03-15 21:01:52 -03:00
ReinUsesLisp
fd3d4d53e1
shader/shader_ir: Fix clip distance usage stores
2020-03-15 20:53:14 -03:00
ReinUsesLisp
4ff3d8e72f
shader/shader_ir: Change declare output attribute to a switch
2020-03-15 20:49:35 -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
ReinUsesLisp
8838f3322c
shader/transform_feedback: Expose buffer stride
2020-03-13 18:33:05 -03:00
ReinUsesLisp
cb05500d6c
shader/transform_feedback: Add host API friendly TFB builder
2020-03-13 18:33:04 -03: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
339b95dfa1
node_helper: add IBitfieldExtract case
2020-03-13 12:50:32 +07:00
Nguyen Dac Nam
86eb7ea0c7
shader_decode: Reimplement BFE instructions
2020-03-13 12:48:01 +07:00
ReinUsesLisp
207b9ba28c
engines/maxwell_3d: Add TFB registers and store them in shader registry
2020-03-09 18:40:53 -03:00
ReinUsesLisp
4dcb56ddbd
shader/registry: Address feedback
2020-03-09 18:40:53 -03:00
ReinUsesLisp
776aa5bdf9
shader/registry: Cache tessellation state
2020-03-09 18:40:07 -03:00
ReinUsesLisp
22052e73de
shader/registry: Store graphics and compute metadata
...
Store information GLSL forces us to provide but it's dynamic state in
hardware (workgroup sizes, primitive topology, shared memory size).
2020-03-09 18:40:07 -03:00
ReinUsesLisp
99be31c902
video_core: Rename "const buffer locker" to "registry"
2020-03-09 18:40:06 -03:00
ReinUsesLisp
8021ee48a3
gl_shader_cache: Rework shader cache and remove post-specializations
...
Instead of pre-specializing shaders and then post-specializing them,
drop the later and only "specialize" the shader while decoding it.
2020-03-09 18:40:06 -03:00
bunnei
cb84f86f3d
Merge pull request #3451 from ReinUsesLisp/indexed-textures
...
vk_shader_decompiler: Implement indexed textures
2020-03-05 11:42:46 -05:00
Nguyen Dac Nam
5658f77467
nit: move comment to right place.
2020-02-29 13:50:10 +07:00
Nguyen Dac Nam
a775209d1b
shader_decode: Fix LD, LDG when track constant buffer
2020-02-28 13:11:19 +07: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
043d94e858
shader: Simplify indexed sampler usages
2020-02-24 01:26:07 -03: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