Commit graph

876 commits

Author SHA1 Message Date
ameerj
1df4541247 glsl: Implement more Integer ops 2021-07-22 21:51:36 -04:00
ameerj
fc36d45a97 glsl: Implement BF* 2021-07-22 21:51:36 -04:00
ameerj
eea0726cd5 glsl: Implement a few Integer instructions 2021-07-22 21:51:36 -04:00
ameerj
0c315dae67 glsl: Use std::string_view for Emit function args. 2021-07-22 21:51:35 -04:00
ameerj
b2cd8e4588 glsl: Pass IR::Inst& to Emit functions 2021-07-22 21:51:35 -04:00
ameerj
c01220d25a glsl: INeg and IAdd negate tests 2021-07-22 21:51:35 -04:00
ameerj
6ee142d3e4 glsl: Reusable typed variables. IADD32 2021-07-22 21:51:35 -04:00
ameerj
690e6a79c7 glsl: Fix program linking and cbuf 2021-07-22 21:51:35 -04:00
ameerj
3355c467e0 glsl: Fix "reg" allocing
based on glasm with some tweaks
2021-07-22 21:51:35 -04:00
ameerj
fda83fe3c5 glsl: Initial backend 2021-07-22 21:51:35 -04:00
ReinUsesLisp
04fed81921 spirv: Reduce log severity of mismatching denorm rules 2021-07-22 21:51:35 -04:00
ReinUsesLisp
574a99b9b3 shader: Fix loop safety to SSA pass 2021-07-22 21:51:35 -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
a56f9f4322 shader: Comment why the array component is not read in TMML 2021-07-22 21:51:35 -04:00
ameerj
4c1067ef1c tmml: Remove index component from coords vec
The lod query functions exposed by the rendering API's do not make use of the texturearray layer indexing.
2021-07-22 21:51:35 -04:00
ameerj
60b33bdc9f spirv/convert: Catch more signed operations oversights
The sign bit on integers of size < 32 was not properly preserved in casts
2021-07-22 21:51:35 -04:00
ReinUsesLisp
4fedf2c20a spirv/convert: Catch more broken signed operations on Nvidia OpenGL
BitCast U32 to S32 before converting to float on drivers with broken
signed operations.
2021-07-22 21:51:35 -04:00
ameerj
1bbecac1d2 shader_environment: Add shader_local_memory_crs_size to local memory size
Fixes DOOM 2016 missing local memory
2021-07-22 21:51:35 -04:00
FernandoS27
be4d1c9b95 shader: Fix VertexA Shaders. 2021-07-22 21:51:34 -04:00
ReinUsesLisp
64dfb4220f shader: Add 2D and 3D variants to SUATOM and SURED
Used by Claybook.
2021-07-22 21:51:34 -04:00
ReinUsesLisp
1dd4302fac shader: Avoid CPU side undefined behavior on I2F 2021-07-22 21:51:34 -04:00
ReinUsesLisp
5fa6d7a3b9 glasm: Use ARB_derivative_control conditionally 2021-07-22 21:51:34 -04:00
ReinUsesLisp
535fb4e6b5 buffer_cache: Reduce uniform buffer size from shader usage
Increases performance significantly on certain titles.
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
bebebf3fa8 shader: Track 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
e3aedea124 shader: Implement ISCADD32I 2021-07-22 21:51:34 -04:00
ReinUsesLisp
d27dbec3e6 spirv: Fix output generics with components 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
142d4f3f6e shader: Always initialize up reference in structure control flow
Fixes ubsan issue.
2021-07-22 21:51:34 -04:00
ReinUsesLisp
6e475617d5 shader: Fix ImageWrite indexing 2021-07-22 21:51:34 -04:00
ReinUsesLisp
f7508aa014 spirv: Fix image and image buffer descriptor index usage 2021-07-22 21:51:34 -04:00
ReinUsesLisp
bd96e0a436 glasm: Fix immediate texture coordinate 2021-07-22 21:51:34 -04:00
ReinUsesLisp
74df00415a shader: Clang-format secondary textures 2021-07-22 21:51:34 -04:00
ReinUsesLisp
f19403bafa shader: Fix secondary textures 2021-07-22 21:51:34 -04:00
ReinUsesLisp
8ea552e64e shader: Fix TMML queries 2021-07-22 21:51:34 -04:00
ReinUsesLisp
ca3e927e35 shader: Fix FSwizzleAdd folding when going through phi nodes 2021-07-22 21:51:34 -04:00
ReinUsesLisp
7ad72d78dd shader/exception: Fix compilation errors on gcc 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
672930b6c8 shader: Handle host exceptions 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