Commit graph

161 commits

Author SHA1 Message Date
ameerj
efd428c747 shader_recompiler: Adjust emit_context includes 2021-12-05 18:11:19 -05:00
ameerj
c0705ede4d shader_recompiler: Rename backend emit_context files 2021-12-05 16:33:44 -05:00
ReinUsesLisp
d04e2dac6c shader: Properly scale image reads and add GL SPIR-V support
Thanks for everything!
2021-11-16 22:11:29 +01:00
ReinUsesLisp
0d12e498ab glsl/glasm: Pass and use scaling parameters in shaders 2021-11-16 22:11:29 +01:00
ameerj
b83c3e7182 gl_graphics_pipeline: Add downscale factor to shader uniforms 2021-11-16 22:11:28 +01:00
ReinUsesLisp
7f88938d72 shader: Add IsTextureScaled opcode 2021-11-16 22:11:28 +01:00
ReinUsesLisp
8cfa8cda16 shader: Add integer division opcodes 2021-11-16 22:11:28 +01:00
ReinUsesLisp
47d1d881cf shader: Add resolution down factor opcode 2021-11-16 22:11:27 +01:00
Fernando Sahmkow
a354c3ae82 Shader Cahe: Fix Phi Nodes on GLASM. 2021-11-02 00:59:25 +01:00
Lioncash
00bd622334 emit_glasm: Fix LINESS_ADJACENCY typo in InputPrimitive()
This should be LINES_ADJACENCY
2021-07-26 04:44:56 -04:00
ReinUsesLisp
2321666580 shader: Avoid usage of C++20 ranges to build in clang 2021-07-22 21:51:40 -04:00
lat9nq
b557314001 shader_recompiler, video_core: Resolve clang errors
Silences the following warnings-turned-errors:
-Wsign-conversion
-Wunused-private-field
-Wbraced-scalar-init
-Wunused-variable

And some other errors
2021-07-22 21:51:40 -04:00
lat9nq
c969f6e678 shader: GCC fmt 8.0.0 fixes 2021-07-22 21:51:40 -04:00
ameerj
33d21ac2db opengl: Implement LOP.CC
Used by MH:Rise
2021-07-22 21:51:39 -04:00
ReinUsesLisp
362888dcb0 glasm: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp
b1df436cef shader: Rework varyings and implement passthrough geometry shaders
Put all varyings into a single std::bitset with helpers to access it.

Implement passthrough geometry shaders using host's.
2021-07-22 21:51:39 -04:00
ReinUsesLisp
f158fe9359 shader: Remove IAbs64 2021-07-22 21:51:39 -04:00
ReinUsesLisp
04c1dca457 shader: Move loop safety tests to code emission 2021-07-22 21:51:39 -04:00
ameerj
1d99187d4c glasm: Implement SetAttribute ViewportMask 2021-07-22 21:51:39 -04:00
ReinUsesLisp
9389e71b12 shader: Split profile and runtime info headers 2021-07-22 21:51:38 -04:00
ReinUsesLisp
f40daa777e shader: Add logging 2021-07-22 21:51:35 -04:00
lat9nq
3a70b6c79b shader: Add shader loop safety check settings
Also add a setting for enable Nsight Aftermath.
2021-07-22 21:51:35 -04:00
ReinUsesLisp
5fa6d7a3b9 glasm: Use ARB_derivative_control conditionally 2021-07-22 21:51:34 -04:00
lat9nq
6e9eab2c32 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:34 -04:00
ReinUsesLisp
34d1a2ffe5 shader,glasm: Implement legacy texcoord loads 2021-07-22 21:51:34 -04:00
ReinUsesLisp
b9a0a742fa glasm: Implement legacy varyings 2021-07-22 21:51:34 -04:00
ReinUsesLisp
4744a21bd4 shader: Add support for "negative" and unaligned offsets
"Negative" offsets don't exist. They are shown as such due to a bug in
nvdisasm.

Unaligned offsets have been proved to read the aligned offset. For
example, when reading an U32, if the offset is 6, the offset read will
be 4.
2021-07-22 21:51:34 -04:00
ReinUsesLisp
9750e0410b opengl: Declare fragment outputs even if they are not used
Fixes Ori and the Blind Forest's menu on GLASM. For some reason
(probably high level optimizations) it is not sanitized on SPIR-V for
OpenGL. Vulkan is unaffected by this change.
2021-07-22 21:51:34 -04:00
ReinUsesLisp
bd96e0a436 glasm: Fix immediate texture coordinate 2021-07-22 21:51:34 -04:00
ReinUsesLisp
1a02dee23a glasm: Reduce reg allocation leaks from an exception to a log 2021-07-22 21:51:34 -04:00
ReinUsesLisp
50e491f101 glasm: Use integer lod for TXQ 2021-07-22 21:51:33 -04:00
ReinUsesLisp
5339775f96 glasm: Fix global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp
0ca75be20a Revert "glasm: Skip phi moves on undefined instructions"
Causes regressions on Bowser's Fury.
2021-07-22 21:51:33 -04:00
ReinUsesLisp
e607d856c2 glasm: Remove unintentional '\n' on Undef32 2021-07-22 21:51:33 -04:00
ReinUsesLisp
df14567fcc glasm: Use storage buffers instead of global memory when possible 2021-07-22 21:51:33 -04:00
ReinUsesLisp
ec19b0d7eb glasm: Implement Y direction 2021-07-22 21:51:33 -04:00
ReinUsesLisp
459e3b17e6 glasm: Skip phi moves on undefined instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp
91a375b557 glasm: Implement undef instructions 2021-07-22 21:51:33 -04:00
ReinUsesLisp
93b8943fae glasm: Fix global memory callbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp
3e5b0c116d glasm: Release phi node registers after they are no longer needed 2021-07-22 21:51:33 -04:00
ReinUsesLisp
8d77a943cc glasm: Fix INeg32 on negative immediates 2021-07-22 21:51:33 -04:00
ReinUsesLisp
42a91d4366 glasm: Remove unnecessary value types 2021-07-22 21:51:33 -04:00
ReinUsesLisp
6bf6015548 glasm: Throw when there are register leaks 2021-07-22 21:51:33 -04:00
ReinUsesLisp
143db4b112 glasm: Catch more register leaks
Add support for null registers. These are used when an instruction has
no usages.

This comes handy when an instruction is only used for its CC value, with
the caveat of having to invalidate all pseudo-instructions before
defining the instruction itself in the register allocator. This commits
changes this.

Workaround a bug on Nvidia's condition codes conditional execution using
branches.
2021-07-22 21:51:33 -04:00
ReinUsesLisp
a5ce5f4a65 glasm: Fix usage counting on phi nodes 2021-07-22 21:51:33 -04:00
ReinUsesLisp
09ad2b5994 glasm: Implement global memory fallbacks 2021-07-22 21:51:33 -04:00
ReinUsesLisp
46edc93371 glasm: Implement int64 add and subtract 2021-07-22 21:51:33 -04:00
lat9nq
90e2710052 emit_glasm_context_get_set: Remove unused variable 2021-07-22 21:51:33 -04:00
ReinUsesLisp
e9a5390a92 glasm: Implement indirect attribute loads 2021-07-22 21:51:33 -04:00
ReinUsesLisp
2e2d1986b1 glasm: Implement image atomics 2021-07-22 21:51:33 -04:00