summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_arb_decompiler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* video_core: Make use of ordered container contains() where applicableLioncash2020-12-071-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.
* video_core: Remove unnecessary enum class casting in logging messagesLioncash2020-12-071-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.
* video_core: Resolve more variable shadowing scenariosLioncash2020-12-041-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.
* shader: Partially implement texture cube array shadowReinUsesLisp2020-10-281-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[].
* gl_arb_decompiler: Implement robust buffer operationsReinUsesLisp2020-10-201-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.
* Merge pull request #4391 from lioncash/nrvobunnei2020-07-241-2/+2
|\ | | | | video_core: Allow copy elision to take place where applicable
| * video_core: Allow copy elision to take place where applicableLioncash2020-07-211-2/+2
| | | | | | | | | | Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them.
* | Merge pull request #4394 from lioncash/unused6bunnei2020-07-241-8/+1
|\ \ | | | | | | video_core: Remove unused variables
| * | video_core: Remove unused variablesLioncash2020-07-211-8/+1
| |/ | | | | | | Silences several compiler warnings about unused variables.
* | Merge pull request #4359 from ReinUsesLisp/clamp-sharedRodrigo Locatti2020-07-211-4/+12
|\ \ | | | | | | renderer_{opengl,vulkan}: Clamp shared memory to host's limit
| * | renderer_{opengl,vulkan}: Clamp shared memory to host's limitReinUsesLisp2020-07-161-4/+12
| |/ | | | | | | | | This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged.
* | Merge pull request #4360 from ReinUsesLisp/glasm-barRodrigo Locatti2020-07-211-4/+0
|\ \ | | | | | | gl_arb_decompiler: Execute BAR even when inside control flow
| * | gl_arb_decompiler: Execute BAR even when inside control flowReinUsesLisp2020-07-161-4/+0
| |/ | | | | | | | | | | Unlike GLSL, GLASM allows us to call BAR inside control flow. - Fixes graphical artifacts in Paper Mario.
* / gl_arb_decompiler: Use NV_shader_buffer_{load,store} on assembly shadersReinUsesLisp2020-07-181-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.
* gl_arb_decompiler: Avoid several string copiesLioncash2020-06-201-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.
* gl_arb_decompiler: Implement FSwizzleAddReinUsesLisp2020-06-121-4/+27
|
* gl_arb_decompiler: Implement an assembly shader decompilerReinUsesLisp2020-06-121-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.