Nguyen Dac Nam
3809c15721
shader_decode: implement ATOM operation for S32 and U32
6 years ago
namkazy
93a5b51a1f
clang-format
6 years ago
Nguyen Dac Nam
e57c348d6e
shader_decode: implement ATOMS instr partial.
6 years ago
Nguyen Dac Nam
cf457eafff
shader: node - update correct comment
6 years ago
Nguyen Dac Nam
407064c658
shader_decode: add Atomic op for common usage
6 years ago
makigumo
4a1a5ea61e
xmad: fix clang build error
6 years ago
ReinUsesLisp
bba58f7272
shader/shader_ir: Track usage in input attribute and of legacy varyings
6 years ago
ReinUsesLisp
fd3d4d53e1
shader/shader_ir: Fix clip distance usage stores
6 years ago
ReinUsesLisp
4ff3d8e72f
shader/shader_ir: Change declare output attribute to a switch
6 years ago
Nguyen Dac Nam
2cd41ab020
clang-format
6 years ago
Nguyen Dac Nam
d13e860a08
nit
6 years ago
ReinUsesLisp
8838f3322c
shader/transform_feedback: Expose buffer stride
6 years ago
ReinUsesLisp
cb05500d6c
shader/transform_feedback: Add host API friendly TFB builder
6 years ago
Nguyen Dac Nam
12b08c1725
nit & remove some optional param
6 years ago
Nguyen Dac Nam
0a64ee04e3
shader_decode: implement XMAD mode CSfu
6 years ago
Nguyen Dac Nam
a9e6b48dc0
clang-format
6 years ago
Nguyen Dac Nam
be63f9a0a2
Apply suggestions from code review
Co-Authored-By: Mat M. <mathew1800@gmail.com>
6 years ago
Nguyen Dac Nam
edabb9957a
shader_decode: BFE add ref of reverse parallel method.
6 years ago
Nguyen Dac Nam
8b2bc366f8
shader_decode: implement BREV on BFE
Implement reverse parallel follow: https://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
6 years ago
Nguyen Dac Nam
339b95dfa1
node_helper: add IBitfieldExtract case
6 years ago
Nguyen Dac Nam
86eb7ea0c7
shader_decode: Reimplement BFE instructions
6 years ago
ReinUsesLisp
207b9ba28c
engines/maxwell_3d: Add TFB registers and store them in shader registry
6 years ago
ReinUsesLisp
4dcb56ddbd
shader/registry: Address feedback
6 years ago
ReinUsesLisp
776aa5bdf9
shader/registry: Cache tessellation state
6 years ago
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).
6 years ago
ReinUsesLisp
99be31c902
video_core: Rename "const buffer locker" to "registry"
6 years ago
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.
6 years ago
Nguyen Dac Nam
5658f77467
nit: move comment to right place.
6 years ago
Nguyen Dac Nam
a775209d1b
shader_decode: Fix LD, LDG when track constant buffer
6 years ago
Nguyen Dac Nam
9b2b16f0b1
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
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>
6 years ago
ReinUsesLisp
043d94e858
shader: Simplify indexed sampler usages
6 years ago
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.
6 years ago
Nguyen Dac Nam
96e43427e5
nit: add const to where it need.
6 years ago
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/
6 years ago
Nguyen Dac Nam
a57853e085
shader_conversion: I2F : add Assert for case src_size is Short
6 years ago
Nguyen Dac Nam
92153118ab
fix warning
6 years ago
Nguyen Dac Nam
84fc48b0eb
clang-format fix
6 years ago
Nguyen Dac Nam
0d9361d21f
shader_conversion: add conversion I2F for Short
6 years ago
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.
6 years ago
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.
6 years ago
ReinUsesLisp
4f5791e529
shader: Remove curly braces initializers on shared pointers
6 years ago
ReinUsesLisp
62ab366971
shader/shift: Implement SHIFT_RIGHT_{IMM,R}
Shifts a pair of registers to the right and returns the low register.
6 years ago
ReinUsesLisp
0ff3ea3188
shader/shift: Implement SHF_LEFT_{IMM,R}
Shifts a pair of registers to the left and returns the high register.
6 years ago
ReinUsesLisp
1d17aca3f5
shader/other: Fix skips for SYNC and BRK
6 years ago
ReinUsesLisp
1c642262eb
shader/other: Stub S2R LaneId
6 years ago
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.
6 years ago
ReinUsesLisp
098218ff4c
shader/arithmetic: Implement FCMP
Compares the third operand with zero, then selects between the first and
second.
6 years ago
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.
6 years ago
Fernando Sahmkow
2e6a1b965d
Shader_IR: Address feedback.
6 years ago