Commit graph

445 commits

Author SHA1 Message Date
ameerj 79d2684261 glsl: Update TessellationControl gl_in
Adheres to GL_ARB_separate_shader_objects requirements
2021-07-22 21:51:40 -04:00
ReinUsesLisp bf2956d77a shader: Avoid usage of C++20 ranges to build in clang 2021-07-22 21:51:40 -04:00
ameerj 94af0a00f6 glsl: Clamp shared mem size to GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 2021-07-22 21:51:40 -04:00
lat9nq 49946cf780 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
ameerj 11f04f1022 shader: Ignore global memory ops on devices lacking int64 support 2021-07-22 21:51:40 -04:00
ReinUsesLisp 8722668b3c emit_spirv: Workaround VK_KHR_shader_float_controls on fp16 Nvidia
Fix regression on Fire Emblem: Three Houses when using native fp16.
2021-07-22 21:51:40 -04:00
lat9nq 2e5af95541 shader: GCC fmt 8.0.0 fixes 2021-07-22 21:51:40 -04:00
ReinUsesLisp 5643a909bc shader: Fix disabled and unwritten attributes and varyings 2021-07-22 21:51:39 -04:00
ameerj 65daec8b75 glsl: Fix shared and local memory declarations
account for the fact that program.*memory_size is in units of bytes.
2021-07-22 21:51:39 -04:00
ameerj 8289eb108f opengl: Implement LOP.CC
Used by MH:Rise
2021-07-22 21:51:39 -04:00
ReinUsesLisp 5b2b0634a1 spirv: Fix code emission when descriptor aliasing is unsupported
Fixes OpenGL.
2021-07-22 21:51:39 -04:00
ameerj 00fa09dc45 glsl: Declare local memory in main 2021-07-22 21:51:39 -04:00
ameerj f7352411f0 glsl: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp 8a3427a4c8 glasm: Add passthrough geometry shader support 2021-07-22 21:51:39 -04:00
ReinUsesLisp 7dafa96ab5 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
ameerj 27ca8a0e13 glsl: Better IAdd Overflow CC fix
This ensures the original operand values are not overwritten when being used in the overflow detection.
2021-07-22 21:51:39 -04:00
ReinUsesLisp 4397053d5c shader: Remove IAbs64 2021-07-22 21:51:39 -04:00
ameerj bc6e399ae3 glsl: Fix IADD CC 2021-07-22 21:51:39 -04:00
ReinUsesLisp 808ef97a08 shader: Move loop safety tests to code emission 2021-07-22 21:51:39 -04:00
ameerj cbce9ddd4a glsl: Remove frag color initialization 2021-07-22 21:51:39 -04:00
ameerj 3a2dd1b483 glasm: Implement SetAttribute ViewportMask 2021-07-22 21:51:39 -04:00
ameerj 1c648f176c emit_glsl_special: Skip initialization of frag_color0
Fixes rendering in Devil May Cry without regressing Ori and the Blind Forest.
2021-07-22 21:51:38 -04:00
Morph cfbc85839d glsl: Add missing ; in EmitSetSampleMask
Fixes shader compilation in Okami HD
2021-07-22 21:51:38 -04:00
ameerj 9e066dcb15 glsl: Fix output varying initialization when transform feedback is used 2021-07-22 21:51:38 -04:00
ReinUsesLisp 59fead3a47 spirv: Properly handle devices without int8 and int16 2021-07-22 21:51:38 -04:00
ReinUsesLisp b5e78607ad spirv: Handle small storage buffer loads on devices with no support 2021-07-22 21:51:38 -04:00
ameerj ccbd24fe00 glsl: Fix cbuf component indexing bug falback 2021-07-22 21:51:38 -04:00
ReinUsesLisp 374eeda1a3 shader: Properly manage attributes not written from previous stages 2021-07-22 21:51:38 -04:00
ReinUsesLisp 892b8aa2ad glsl: Only declare fragment outputs on fragment shaders 2021-07-22 21:51:38 -04:00
ReinUsesLisp 0ffea97e2e shader: Split profile and runtime info headers 2021-07-22 21:51:38 -04:00
ameerj 12ef06ba8b glsl: Obey need_declared_frag_colors to declare and initialize all frag_color
Fixes Ori and the blind forest title screen
2021-07-22 21:51:38 -04:00
ameerj d36f667bc0 glsl: Address rest of feedback 2021-07-22 21:51:38 -04:00
ameerj c5dfa0b630 glsl: Move gl_Position/generic attribute initialization to EmitProlgue 2021-07-22 21:51:38 -04:00
ameerj 3b339fbbf6 glsl: Conditionally use fine/coarse derivatives based on device support 2021-07-22 21:51:38 -04:00
ameerj 6eea88d614 glsl: Cleanup/Address feedback 2021-07-22 21:51:38 -04:00
ameerj ae4e452759 glsl: Add Shader_GLSL logging 2021-07-22 21:51:38 -04:00
ameerj 6c6a451d6a glsl: Add LoopSafety instructions 2021-07-22 21:51:38 -04:00
ameerj a0d0704aff glsl: Conditionally add EXT_texture_shadow_lod 2021-07-22 21:51:38 -04:00
ameerj 5e7b2b9661 glsl: Add stubs for sparse queries and variable aoffi when not supported 2021-07-22 21:51:38 -04:00
ameerj 6aa1bf7b6f glsl: Implement legacy varyings 2021-07-22 21:51:38 -04:00
ameerj 39c29664f9 glsl: Minor cleanup 2021-07-22 21:51:38 -04:00
ameerj 427a2596a1 glsl: Fix Cbuf getters for F32 type 2021-07-22 21:51:38 -04:00
ameerj 7c82f20b52 glsl: Add immediate index oob checking for Cbuf getters 2021-07-22 21:51:38 -04:00
ameerj 84c86e03cd glsl: Refactor GetCbuf functions to reduce code duplication 2021-07-22 21:51:38 -04:00
ameerj e81c73a874 glsl: Address more feedback. Implement indexed texture reads 2021-07-22 21:51:38 -04:00
ameerj 7d89a82a48 glsl: Remove Signed Integer variables 2021-07-22 21:51:38 -04:00
ameerj 4759db28d0 glsl: Address Rodrigo's feedback 2021-07-22 21:51:38 -04:00
ameerj 85399e119d glsl: Reorganize backend code, remove unneeded [[maybe_unused]] 2021-07-22 21:51:37 -04:00
ameerj e7c8f8911f glsl: Implement SampleId and SetSampleMask
plus some minor refactoring of implementations
2021-07-22 21:51:37 -04:00
ameerj d1a68f7997 glsl: Add gl_PerVertex in for GS 2021-07-22 21:51:37 -04:00