summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_arb_decompiler.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-12-07video_core: Make use of ordered container contains() where applicableLioncash1-3/+1
With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
2020-12-07video_core: Remove unnecessary enum class casting in logging messagesLioncash1-4/+4
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more. Reduces the line noise a bit.
2020-12-04video_core: Resolve more variable shadowing scenariosLioncash1-24/+24
Resolves variable shadowing scenarios up to the end of the OpenGL code to make it nicer to review. The rest will be resolved in a following commit.
2020-10-28shader: Partially implement texture cube array shadowReinUsesLisp1-16/+25
This implements texture cube arrays with shadow comparisons but doesn't fix the asserts related to it. Fixes out of bounds reads on swizzle constructors and makes them use bounds checked ::at instead of the unsafe operator[].
2020-10-20gl_arb_decompiler: Implement robust buffer operationsReinUsesLisp1-8/+23
This emulates the behavior we get on GLSL with regular SSBOs with a pointer + length pair. It aims to be consistent with the crashes we might get. Out of bounds stores are ignored. Atomics are ignored and return zero. Reads return zero.
2020-07-21video_core: Remove unused variablesLioncash1-8/+1
Silences several compiler warnings about unused variables.
2020-07-21video_core: Allow copy elision to take place where applicableLioncash1-2/+2
Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
2020-07-18gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shadersReinUsesLisp1-26/+58
NV_shader_buffer_{load,store} is a 2010 extension that allows GL applications to use what in Vulkan is known as physical pointers, this is basically C pointers. On GLASM these is exposed through the LOAD/STORE/ATOM instructions. Up until now, assembly shaders were using NV_shader_storage_buffer_object. These work fine, but have a (probably unintended) limitation that forces us to have the limit of a single stage for all shader stages. In contrast, with NV_shader_buffer_{load,store} we can pass GPU addresses to the shader through local parameters (GLASM equivalent uniform constants, or push constants on Vulkan). Local parameters have the advantage of being per stage, allowing us to generate code without worrying about binding overlaps.
2020-07-16gl_arb_decompiler: Execute BAR even when inside control flowReinUsesLisp1-4/+0
Unlike GLSL, GLASM allows us to call BAR inside control flow. - Fixes graphical artifacts in Paper Mario.
2020-07-16renderer_{opengl,vulkan}: Clamp shared memory to host's limitReinUsesLisp1-4/+12
This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged.
2020-06-20gl_arb_decompiler: Avoid several string copiesLioncash1-32/+31
Variables that are marked as const cannot have the move constructor invoked when returning from a function (the move constructor requires a non-const variable so it can "steal" the resources from it.
2020-06-12gl_arb_decompiler: Implement FSwizzleAddReinUsesLisp1-4/+27
2020-06-12gl_arb_decompiler: Implement an assembly shader decompilerReinUsesLisp1-0/+2051
Emit code compatible with NV_gpu_program5. This should emit code compatible with Fermi, but it wasn't tested on that architecture. Pascal has some issues not present on Turing GPUs.