ReinUsesLisp
e8efd5a901
video_core: Rename "const buffer locker" to "registry"
6 years ago
ReinUsesLisp
bd8b9bbcee
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.
6 years ago
Nguyen Dac Nam
85a4222a8c
nit: move comment to right place.
6 years ago
Nguyen Dac Nam
6c0c2dfabc
shader_decode: Fix LD, LDG when track constant buffer
6 years ago
Nguyen Dac Nam
1c385362f5
shader_decode: keep it search on all code
It fixed opcode LD, LDG on Pokemon Sword that can't find the constant buffer. Not sure if it helps any on visual.
6 years ago
Nguyen Dac Nam
db2f547434
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>
6 years ago
ReinUsesLisp
1dda77d392
shader: Simplify indexed sampler usages
6 years ago
ReinUsesLisp
7dc488a375
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.
6 years ago
Nguyen Dac Nam
10d8afb302
nit: add const to where it need.
6 years ago
Nguyen Dac Nam
1956a34ee5
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/
6 years ago
Nguyen Dac Nam
1b6308727c
shader_conversion: I2F : add Assert for case src_size is Short
6 years ago
Nguyen Dac Nam
a2c2c5768f
fix warning
6 years ago
Nguyen Dac Nam
a8508f2bc0
clang-format fix
6 years ago
Nguyen Dac Nam
556f3a6e9a
shader_conversion: add conversion I2F for Short
6 years ago
ReinUsesLisp
6910ade146
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.
6 years ago
ReinUsesLisp
bf9a822b87
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.
6 years ago
ReinUsesLisp
223a89a19f
shader: Remove curly braces initializers on shared pointers
6 years ago
ReinUsesLisp
729ca120e3
shader/shift: Implement SHIFT_RIGHT_{IMM,R}
Shifts a pair of registers to the right and returns the low register.
6 years ago
ReinUsesLisp
017474c3f8
shader/shift: Implement SHF_LEFT_{IMM,R}
Shifts a pair of registers to the left and returns the high register.
6 years ago
ReinUsesLisp
9f0162e4b5
shader/other: Fix skips for SYNC and BRK
6 years ago
ReinUsesLisp
270177f38a
shader/other: Stub S2R LaneId
6 years ago
ReinUsesLisp
137a8aa55c
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.
6 years ago
ReinUsesLisp
e3fc3459c8
shader/arithmetic: Implement FCMP
Compares the third operand with zero, then selects between the first and
second.
6 years ago
ReinUsesLisp
d95d4ac843
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.
6 years ago
Fernando Sahmkow
bb8eb15d39
Shader_IR: Address feedback.
6 years ago
ReinUsesLisp
d26e74f0a3
shader/memory: Implement STL.S16 and STS.S16
6 years ago
ReinUsesLisp
9a2cdf8520
shader/memory: Implement unaligned LDL.S16 and LDS.S16
6 years ago
ReinUsesLisp
531f25a037
shader/memory: Move unaligned load/store to functions
6 years ago
ReinUsesLisp
96638f57c9
shader/memory: Implement LDL.S16 and LDS.S16
6 years ago
Fernando Sahmkow
806f569143
Shader_IR: Change name of TrackSampler function so it does not confuse with the type.
6 years ago
Fernando Sahmkow
3919b7b8a9
Shader_IR: Corrections, styling and extras.
6 years ago
Fernando Sahmkow
7c530e0666
Shader_IR: Propagate bindless index into the GL compiler.
6 years ago
Fernando Sahmkow
3c34678627
Shader_IR: Implement Injectable Custom Variables to the IR.
6 years ago
Fernando Sahmkow
037ea431ce
Shader_IR: deduce size of indexed samplers
6 years ago
Fernando Sahmkow
f4603d23c5
Shader_IR: Setup Indexed Samplers on the IR
6 years ago
Fernando Sahmkow
603c861532
Shader_IR: Implement initial code for tracking indexed samplers.
6 years ago
Fernando Sahmkow
64496f2456
Shader_IR: Address Feedback
6 years ago
Fernando Sahmkow
b97608ca64
Shader_IR: Allow constant access of guest driver.
6 years ago
Fernando Sahmkow
dc5cfa8d28
Shader_IR: Address Feedback
6 years ago
Fernando Sahmkow
1e4b6bef6f
Shader_IR: Store Bound buffer on Shader Usage
6 years ago
Fernando Sahmkow
c921e496eb
GPU: Implement guest driver profile and deduce texture handler sizes.
6 years ago
ReinUsesLisp
63ba41a26d
shader/memory: Implement ATOMS.ADD.U32
6 years ago
Lioncash
a1eee1749e
control_flow: Silence -Wreorder warning for CFGRebuildState
Organizes the initializer list in the same order that the variables
would actually be initialized in.
6 years ago
ReinUsesLisp
13021b534c
shader_ir/texture: Simplify AOFFI code
6 years ago
ReinUsesLisp
e2a2a556b9
shader_ir/memory: Implement u16 and u8 for STG and LDG
Using the same technique we used for u8 on LDG, implement u16.
In the case of STG, load memory and insert the value we want to set
into it with bitfieldInsert. Then set that value.
6 years ago
Fernando Sahmkow
3dd6b55851
Shader_IR: Address Feedback
6 years ago
Fernando Sahmkow
a1667a7b46
Shader_IR: Implement TXD Array.
This commit extends the compilation of TXD to support array samplers on
TXD.
6 years ago
Fernando Sahmkow
b3371ed09e
Shader_IR: add the ability to amend code in the shader ir.
This commit introduces a mechanism by which shader IR code can be
amended and extended. This useful for track algorithms where certain
information can derived from before the track such as indexes to array
samplers.
6 years ago
ReinUsesLisp
38d3a48873
shader/p2r: Implement P2R Pr
P2R dumps predicate or condition codes state to a register. This is
useful for unit testing.
6 years ago
ReinUsesLisp
cf27b59493
shader/r2p: Refactor P2R to support P2R
6 years ago