Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2020-09-16 | video_core: Enforce -Werror=switch | ReinUsesLisp | 1 | -1/+3 | |
This forces us to fix all -Wswitch warnings in video_core. | |||||
2020-07-21 | video_core: Remove unused variables | Lioncash | 1 | -13/+0 | |
Silences several compiler warnings about unused variables. | |||||
2020-07-21 | video_core: Allow copy elision to take place where applicable | Lioncash | 1 | -1/+1 | |
Removes const from some variables that are returned from functions, as this allows the move assignment/constructors to execute for them. | |||||
2020-07-16 | renderer_{opengl,vulkan}: Clamp shared memory to host's limit | ReinUsesLisp | 1 | -2/+9 | |
This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged. | |||||
2020-06-21 | gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available | Morph | 1 | -7/+43 | |
Enable GL_EXT_texture_shadow_lod if available. If this extension is not available, such as on Intel/AMD proprietary drivers, use textureGrad as a workaround. | |||||
2020-06-01 | gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shaders | Morph | 1 | -6/+16 | |
2020-06-01 | gl_shader_decompiler: Fix geometry shader outputs for Intel drivers | Morph | 1 | -13/+15 | |
On Intel's proprietary drivers, gl_Layer and gl_ViewportIndex are not allowed members of gl_PerVertex block, causing the shader to fail to compile. Fix this by declaring these variables outside of gl_PerVertex. | |||||
2020-06-01 | glsl: Squash constant buffers into a single SSBO when we hit the limit | ReinUsesLisp | 1 | -34/+65 | |
Avoids compilation errors at the cost of shader build times and runtime performance when a game hits the limit of uniform buffers we can use. | |||||
2020-05-27 | shader/other: Implement MEMBAR.CTS | ReinUsesLisp | 1 | -2/+8 | |
This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it. | |||||
2020-05-22 | shader/other: Implement BAR.SYNC 0x0 | ReinUsesLisp | 1 | -0/+10 | |
Trivially implement this particular case of BAR. Unless games use OpenCL or CUDA barriers, we shouldn't hit any other case here. | |||||
2020-05-22 | shader/other: Implement thread comparisons (NV_shader_thread_group) | ReinUsesLisp | 1 | -0/+23 | |
Hardware S2R special registers match gl_Thread*MaskNV. We can trivially implement these using Nvidia's extension on OpenGL or naively stubbing them with the ARB instructions to match. This might cause issues if the host device warp size doesn't match Nvidia's. That said, this is unlikely on proper shaders. Refer to the attached url for more documentation about these flags. https://www.khronos.org/registry/OpenGL/extensions/NV/NV_shader_thread_group.txt | |||||
2020-05-22 | shader_decompiler: Visit source nodes even when they assign to RZ | ReinUsesLisp | 1 | -1/+3 | |
Some operations like atomicMin were ignored because they returned were being stored to RZ. This operations have a side effect and it was being ignored. | |||||
2020-05-10 | gl_shader_decompiler: Properly emulate NaN behaviour on NE | ReinUsesLisp | 1 | -0/+9 | |
"Not equal" operators on GLSL seem to behave as unordered when we expect an ordered comparison. Manually emulate this checking for LGE values (numbers, not-NaNs). | |||||
2020-05-09 | shader_ir: Separate float-point comparisons in ordered and unordered | ReinUsesLisp | 1 | -44/+55 | |
This allows us to use native SPIR-V instructions without having to manually check for NAN. | |||||
2020-04-26 | shader/arithmetic_integer: Implement CC for IADD | ReinUsesLisp | 1 | -0/+10 | |
2020-04-23 | shader_ir: Turn classes into data structures | ReinUsesLisp | 1 | -27/+25 | |
2020-04-18 | video_core: gl_shader_decompiler: Fix implicit fallthrough errors. | bunnei | 1 | -0/+1 | |
2020-04-18 | gl_shader_decompiler: Avoid copies where applicable | Lioncash | 1 | -3/+3 | |
Avoids unnecessary reference count increments where applicable and also avoids reallocating a vector. Unlikely to make a huge difference, but given how trivial of an amendment it is, why not? | |||||
2020-04-16 | CMakeLists: Specify -Wextra on linux builds | Lioncash | 1 | -1/+2 | |
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well. | |||||
2020-04-15 | Revert "gl_shader_decompiler: Implement merges with bitfieldInsert" | ReinUsesLisp | 1 | -2/+4 | |
This reverts commit 05cf27083608bebd3ee4c38f2f948c8f2030f881. Apparently the first approach using floats instead of bitfieldInert worked better for Fire Emblem: Three Houses. Reverting to get that behavior back. | |||||
2020-04-13 | gl_shader_decompiler: Implement merges with bitfieldInsert | ReinUsesLisp | 1 | -4/+2 | |
This also fixes Turing issues but it avoids doing more bitcasts. This should improve the generated code while also avoiding more points where compilers can flush floats. | |||||
2020-04-12 | gl_shader_decompiler: Improve generated code in HMergeH* | ReinUsesLisp | 1 | -6/+8 | |
Avoiding bitwise expressions, this fixes Turing issues in shaders using half float merges that affected several games. | |||||
2020-04-06 | shader/memory: Implement RED.E.ADD | ReinUsesLisp | 1 | -2/+22 | |
Implements a reduction operation. It's an atomic operation that doesn't return a value. This commit introduces another primitive because some shading languages might have a primitive for reduction operations. | |||||
2020-04-02 | shader_decompiler: Remove FragCoord.w hack and change IPA implementation | ReinUsesLisp | 1 | -18/+16 | |
Credits go to gdkchan and Ryujinx. The pull request used for this can be found here: https://github.com/Ryujinx/Ryujinx/pull/1082 yuzu was already using the header for interpolation, but it was missing the FragCoord.w multiplication described in the linked pull request. This commit finally removes the FragCoord.w == 1.0f hack from the shader decompiler. While we are at it, this commit renames some enumerations to match Nvidia's documentation (linked below) and fixes component declaration order in the shader program header (z and w were swapped). https://github.com/NVIDIA/open-gpu-doc/blob/master/Shader-Program-Header/Shader-Program-Header.html | |||||
2020-03-30 | gl_decompiler: min/max op not implement yet | namkazy | 1 | -0/+4 | |
2020-03-30 | gl_decompiler: add atomic op | Nguyen Dac Nam | 1 | -0/+16 | |
2020-03-19 | gl_shader_decompiler: Remove deprecated function and its usages | ReinUsesLisp | 1 | -11/+8 | |
2020-03-18 | gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceID | ReinUsesLisp | 1 | -8/+0 | |
2020-03-16 | gl_shader_decompiler: Implement legacy varyings | ReinUsesLisp | 1 | -6/+57 | |
Legacy varyings are special attributes carried over in hardware from the OpenGL 1 and OpenGL 2 days. These were generally used instead of the generic attributes we use today. They are deprecated or removed from most APIs, but Nvidia still ships them in hardware. To implement these, this commit maps them 1:1 to OpenGL compatibility. | |||||
2020-03-13 | vk/gl_shader_decompiler: Silence assertion on compute | ReinUsesLisp | 1 | -3/+6 | |
2020-03-13 | gl_shader_decompiler: Fix implicit conversion errors | ReinUsesLisp | 1 | -3/+3 | |
2020-03-13 | shader/transform_feedback: Expose buffer stride | ReinUsesLisp | 1 | -1/+2 | |
2020-03-13 | gl_shader_decompiler: Decorate output attributes with XFB layout | ReinUsesLisp | 1 | -29/+105 | |
We sometimes have to slice attributes in different parts. This is needed for example in instances where the game feedbacks 3 components but writes 4 from the shader (something that is possible with GL_NV_transform_feedback). | |||||
2020-03-13 | gl_shader_decompiler: Initialize gl_Position on vertex shaders | ReinUsesLisp | 1 | -0/+4 | |
2020-03-13 | gl_shader_decompiler: Add missing {} on smem GLSL emission | ReinUsesLisp | 1 | -1/+1 | |
2020-03-12 | gl_shader_decompiler: Add layer component to texelFetch | ReinUsesLisp | 1 | -6/+9 | |
TexelFetch was not emitting the array component generating invalid GLSL. | |||||
2020-03-12 | gl_shader_decompiler: Fix regression in render target declarations | ReinUsesLisp | 1 | -12/+2 | |
A previous commit introduced a way to declare as few render targets as possible. Turns out this introduced a regression in some games. | |||||
2020-03-09 | shader/registry: Address feedback | ReinUsesLisp | 1 | -1/+1 | |
2020-03-09 | gl_shader_decompiler: Add identifier to decompiled code | ReinUsesLisp | 1 | -5/+10 | |
2020-03-09 | gl_shader_decompiler: Roll back to GLSL core 430 | ReinUsesLisp | 1 | -1/+1 | |
RenderDoc won't build shaders if we use GLSL compatibility. | |||||
2020-03-09 | shader/registry: Store graphics and compute metadata | ReinUsesLisp | 1 | -17/+67 | |
Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size). | |||||
2020-03-09 | gl_shader_cache: Rework shader cache and remove post-specializations | ReinUsesLisp | 1 | -63/+138 | |
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it. | |||||
2020-02-28 | gl_state_tracker: Implement dirty flags for clip distances and shaders | ReinUsesLisp | 1 | -1/+4 | |
2020-01-28 | gl_shader_decompiler: Remove UNIMPLEMENTED for gl_PointSize | ReinUsesLisp | 1 | -1/+0 | |
This was implemented by a previous commit and it's no longer required. | |||||
2020-01-26 | shader/memory: Implement ATOM.ADD | ReinUsesLisp | 1 | -4/+1 | |
ATOM operates atomically on global memory. For now only add ATOM.ADD since that's what was found in commercial games. This asserts for ATOM.ADD.S32 (handling the others as unimplemented), although ATOM.ADD.U32 shouldn't be any different. This change forces us to change the default type on SPIR-V storage buffers from float to uint. We could also alias the buffers, but it's simpler for now to just use uint. While we are at it, abstract the code to avoid repetition. | |||||
2020-01-25 | Shader_IR: Address feedback. | Fernando Sahmkow | 1 | -3/+3 | |
2020-01-24 | Shader_IR: Correct Custom Variable assignment. | Fernando Sahmkow | 1 | -0/+2 | |
2020-01-24 | Shader_IR: Propagate bindless index into the GL compiler. | Fernando Sahmkow | 1 | -1/+1 | |
2020-01-24 | Shader_IR: Implement Injectable Custom Variables to the IR. | Fernando Sahmkow | 1 | -0/+20 | |
2020-01-24 | GL Backend: Introduce indexed samplers into the GL backend | Fernando Sahmkow | 1 | -3/+12 | |
2020-01-18 | gl_shader_decompiler: Fix decompilation of condition codes | ReinUsesLisp | 1 | -27/+5 | |
Use Visit instead of reimplementing it. Fixes unimplemented negations for condition codes. | |||||
2020-01-16 | shader/memory: Implement ATOMS.ADD.U32 | ReinUsesLisp | 1 | -0/+12 | |
2020-01-04 | Shader_IR: Address Feedback | Fernando Sahmkow | 1 | -13/+4 | |
2019-12-30 | Shader_IR: add the ability to amend code in the shader ir. | Fernando Sahmkow | 1 | -0/+15 | |
This commit introduces a mechanism by which shader IR code can be amended and extended. This useful for track algorithms where certain information can derived from before the track such as indexes to array samplers. | |||||
2019-12-18 | gl_shader_decompiler: Add missing DeclareImages | ReinUsesLisp | 1 | -0/+1 | |
2019-12-16 | shader/texture: Implement TLD4.PTP | ReinUsesLisp | 1 | -31/+53 | |
2019-12-16 | gl_shader_decompiler: Rename "sepparate" to "separate" | ReinUsesLisp | 1 | -3/+3 | |
2019-12-12 | Shader_IR: Correct TLD4S Depth Compare. | Fernando Sahmkow | 1 | -4/+4 | |
2019-12-12 | Gl_Shader_compiler: Correct Depth Compare for Texture Gather operations. | Fernando Sahmkow | 1 | -8/+21 | |
2019-12-10 | shader: Implement MEMBAR.GL | ReinUsesLisp | 1 | -0/+7 | |
Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V. | |||||
2019-12-10 | shader_ir/other: Implement S2R InvocationId | ReinUsesLisp | 1 | -0/+5 | |
2019-11-26 | gl_shader_decompiler: Fix casts from fp32 to f16 | ReinUsesLisp | 1 | -1/+2 | |
Casts from f32 to f16 zeroes the higher half of the target register. | |||||
2019-11-23 | gl_shader_decompiler: Normalize image bindings | ReinUsesLisp | 1 | -12/+8 | |
2019-11-23 | gl_shader_decompiler: Normalize cbuf bindings | ReinUsesLisp | 1 | -8/+4 | |
Stage and compute shaders were using a different binding counter. Normalize these. | |||||
2019-11-23 | gl_shader_cache: Remove dynamic BaseBinding specialization | ReinUsesLisp | 1 | -11/+18 | |
2019-11-23 | video_core: Unify ProgramType and ShaderStage into ShaderType | ReinUsesLisp | 1 | -21/+23 | |
2019-11-23 | gl_shader_cache: Specialize local memory size for compute shaders | ReinUsesLisp | 1 | -10/+8 | |
Local memory size in compute shaders was stubbed with an arbitary size. This commit specializes local memory size from guest GPU parameters. | |||||
2019-11-23 | gl_shader_cache: Specialize shared memory size | ReinUsesLisp | 1 | -19/+4 | |
Shared memory was being declared with an undefined size. Specialize from guest GPU parameters the compute shader's shared memory size. | |||||
2019-11-23 | shader/texture: Deduce texture buffers from locker | ReinUsesLisp | 1 | -33/+6 | |
Instead of specializing shaders to separate texture buffers from 1D textures, use the locker to deduce them while they are being decoded. | |||||
2019-11-18 | Shader_IR: Address Feedback | Fernando Sahmkow | 1 | -1/+1 | |
2019-11-14 | Shader_IR: Implement TXD instruction. | Fernando Sahmkow | 1 | -1/+43 | |
2019-11-14 | Shader_IR: Implement FLO instruction. | Fernando Sahmkow | 1 | -0/+7 | |
2019-11-08 | gl_shader_decompiler: Add safe fallbacks when ARB_shader_ballot is not available | ReinUsesLisp | 1 | -5/+21 | |
2019-11-08 | shader_ir/warp: Implement FSWZADD | ReinUsesLisp | 1 | -0/+18 | |
2019-11-08 | gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsics | ReinUsesLisp | 1 | -40/+8 | |
2019-11-07 | GLSLDecompiler: Correct Texture Gather Offset. | Fernando Sahmkow | 1 | -1/+1 | |
This commit corrects the argument ordering in textureGatherOffset. | |||||
2019-11-07 | gl_shader_decompiler: Fix typo "y_negate"->"y_direction" | ReinUsesLisp | 1 | -1/+1 | |
2019-11-07 | gl_rasterizer: Emulate viewport flipping with ARB_clip_control | ReinUsesLisp | 1 | -7/+1 | |
Emulates negative y viewports with ARB_clip_control. This allows us to more easily emulated pipelines with tessellation and/or geometry shader stages. It also avoids corrupting games with transform feedbacks and negative viewports (gl_Position.y was being modified). | |||||
2019-10-30 | shader/node: Unpack bindless texture encoding | ReinUsesLisp | 1 | -6/+6 | |
Bindless textures were using u64 to pack the buffer and offset from where they come from. Drop this in favor of separated entries in the struct. Remove the usage of std::set in favor of std::list (it's not std::vector to avoid reference invalidations) for samplers and images. | |||||
2019-10-25 | gl_shader_decompiler: Move entries to a separate function | ReinUsesLisp | 1 | -35/+35 | |
2019-10-25 | Shader_IR: Implement Fast BRX and allow multi-branches in the CFG. | Fernando Sahmkow | 1 | -0/+5 | |
2019-10-16 | gl_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator() | Lioncash | 1 | -0/+3 | |
This would previously result in NeverExecute and UnusedIndex being treated as regular predicates. | |||||
2019-10-16 | gl_shader_decompiler: Make ExprDecompiler's GetResult() a const member function | Lioncash | 1 | -1/+1 | |
This is only ever used to read, but not write, the resulting string, so we can enforce this by making it a const member function. | |||||
2019-10-16 | gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix() | Lioncash | 1 | -1/+1 | |
This allows the function to be completely non-allocating for inputs of all sizes (i.e. there's no heap cost for an input to convert to a std::string_view). | |||||
2019-10-16 | gl_shader_decompiler: Fold flow_var constant into GetFlowVariable() | Lioncash | 1 | -3/+1 | |
This is only ever used within this function, so we can narrow it's scope down. | |||||
2019-10-16 | gl_shader_decompiler: Mark ASTDecompiler/ExprDecompiler parameters as const references where applicable | Lioncash | 1 | -21/+21 | |
These member functions don't actually modify the input parameter, so we can make this explicit with the use of const. | |||||
2019-10-16 | gl_shader_decompiler: Pass by reference to GenerateTextureArgument() | Lioncash | 1 | -2/+2 | |
Avoids an unnecessary atomic reference count increment and decrement. | |||||
2019-10-16 | gl_shader_decompiler: Use std::holds_alternative within GenerateTexture() | Lioncash | 1 | -1/+1 | |
This only ever queries if the type exists within the variant, but doesn't actually do anything with the return value. We can just use std::holds_alternative for this use case. | |||||
2019-10-16 | gl_shader_decompiler: Avoid unnecessary copies of MetaImage | Lioncash | 1 | -4/+4 | |
MetaImage contains a std::vector, so copying here could result in unnecessary reallocations. Given the operation lives throughout the entire scope, this is safe to do. | |||||
2019-10-05 | Shader_ir: Address feedback | Fernando Sahmkow | 1 | -4/+8 | |
2019-10-05 | vk_shader_decompiler: Clean code and be const correct. | Fernando Sahmkow | 1 | -1/+1 | |
2019-10-05 | gl_shader_decompiler: Refactor and address feedback. | Fernando Sahmkow | 1 | -17/+18 | |
2019-10-05 | Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. | Fernando Sahmkow | 1 | -3/+5 | |
2019-10-05 | gl_shader_decompiler: Implement AST decompiling | Fernando Sahmkow | 1 | -29/+242 | |
2019-09-24 | gl_shader_decompiler: Add tailing return for HUnpack2 | ReinUsesLisp | 1 | -0/+2 | |
2019-09-24 | gl_shader_decompiler: Fix clang build issues | ReinUsesLisp | 1 | -26/+23 | |
2019-09-21 | gl_shader_decompiler: Use uint for images and fix SUATOM | ReinUsesLisp | 1 | -97/+35 | |
In the process remove implementation of SUATOM.MIN and SUATOM.MAX as these require a distinction between U32 and S32. These have to be implemented with imageCompSwap loop. | |||||
2019-09-21 | shader/image: Implement SULD and remove irrelevant code | ReinUsesLisp | 1 | -2/+15 | |
* Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array. | |||||
2019-09-19 | VideoCore: Corrections to the MME Inliner and removal of hacky instance management. | Fernando Sahmkow | 1 | -1/+9 | |
2019-09-19 | Video Core: initial Implementation of InstanceDraw Packaging | Fernando Sahmkow | 1 | -1/+1 | |
2019-09-17 | shader_ir/warp: Implement SHFL | ReinUsesLisp | 1 | -8/+55 | |
2019-09-11 | shader/image: Implement SUATOM and fix SUST | ReinUsesLisp | 1 | -26/+119 | |
2019-09-06 | gl_shader_decompiler: Avoid writing output attribute when unimplemented | ReinUsesLisp | 1 | -10/+14 | |
2019-09-06 | gl_shader_decompiler: Keep track of written images and mark them as modified | ReinUsesLisp | 1 | -6/+12 | |
2019-09-05 | gl_shader_decompiler: Implement shared memory | ReinUsesLisp | 1 | -0/+23 | |
2019-09-04 | gl_shader_decompiler: Fixup slow path | ReinUsesLisp | 1 | -1/+1 | |
2019-09-04 | gl_device: Disable precise in fragment shaders on bugged drivers | ReinUsesLisp | 1 | -1/+8 | |
2019-09-04 | gl_shader_decompiler: Fixup AMD's slow path type | ReinUsesLisp | 1 | -1/+1 | |
2019-09-04 | gl_shader_decompiler: Rework GLSL decompiler type system | ReinUsesLisp | 1 | -416/+505 | |
GLSL decompiler type system was broken. We converted all return values to float except for some cases where returning we couldn't and implicitly broke the rule of returning floats (e.g. for bools or bool pairs). Instead of doing this introduce class Expression that knows what type a return value has and when a consumer wants to use the string it asks for it with a required type, emitting a runtime error if types are incompatible. This has the disadvantage that there's more C++ code, but we can emit better GLSL code that's easier to read. | |||||
2019-08-21 | shader_ir: Implement VOTE | ReinUsesLisp | 1 | -0/+47 | |
Implement VOTE using Nvidia's intrinsics. Documentation about these can be found here https://developer.nvidia.com/reading-between-threads-shader-intrinsics Instead of using portable ARB instructions I opted to use Nvidia intrinsics because these are the closest we have to how Tegra X1 hardware renders. To stub VOTE on non-Nvidia drivers (including nouveau) this commit simulates a GPU with a warp size of one, returning what is meaningful for the instruction being emulated: * anyThreadNV(value) -> value * allThreadsNV(value) -> value * allThreadsEqualNV(value) -> true ballotARB, also known as "uint64_t(activeThreadsNV())", emits VOTE.ANY Rd, PT, PT; on nouveau's compiler. This doesn't match exactly to Nvidia's code VOTE.ALL Rd, PT, PT; Which is emulated with activeThreadsNV() by this commit. In theory this shouldn't really matter since .ANY, .ALL and .EQ affect the predicates (set to PT on those cases) and not the registers. | |||||
2019-07-20 | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F. | Fernando Sahmkow | 1 | -0/+18 | |
This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done. | |||||
2019-07-20 | shader/half_set_predicate: Fix HSETP2 implementation | ReinUsesLisp | 1 | -12/+4 | |
2019-07-18 | gl_shader_decompiler: Rename bufferImage to imageBuffer | ReinUsesLisp | 1 | -1/+1 | |
The online OpenGL documentation is wrong. The type definition is imageBuffer. | |||||
2019-07-15 | gl_shader_decompiler: Stub local memory size | ReinUsesLisp | 1 | -8/+14 | |
2019-07-15 | gl_rasterizer: Implement compute shaders | ReinUsesLisp | 1 | -26/+34 | |
2019-07-11 | gl_shader_decompiler: Fix gl_PointSize redeclaration | ReinUsesLisp | 1 | -1/+1 | |
2019-07-11 | gl_shader_decompiler: Fix conditional usage of GL_ARB_shader_viewport_layer_array | ReinUsesLisp | 1 | -2/+3 | |
2019-07-09 | shader_ir: Unify blocks in decompiled shaders. | Fernando Sahmkow | 1 | -4/+6 | |
2019-07-09 | shader_ir: Implement BRX & BRA.CC | Fernando Sahmkow | 1 | -0/+9 | |
2019-07-08 | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ReinUsesLisp | 1 | -29/+75 | |
This commit implements gl_ViewportIndex and gl_Layer in vertex and geometry shaders. In the case it's used in a vertex shader, it requires ARB_shader_viewport_layer_array. This extension is available on AMD and Nvidia devices (mesa and proprietary drivers), but not available on Intel on any platform. At the moment of writing this description I don't know if this is a hardware limitation or a driver limitation. In the case that ARB_shader_viewport_layer_array is not available, writes to these registers on a vertex shader are ignored, with the appropriate logging. | |||||
2019-07-06 | gl_rasterizer: Minor style changes | ReinUsesLisp | 1 | -1/+1 | |
2019-06-24 | gl_shader_decompiler: Address feedback | ReinUsesLisp | 1 | -11/+12 | |
2019-06-21 | gl_shader_decompiler: Implement image binding settings | ReinUsesLisp | 1 | -0/+3 | |
2019-06-21 | shader: Decode SUST and implement backing image functionality | ReinUsesLisp | 1 | -0/+70 | |
2019-06-21 | gl_shader_decompiler: Allow 1D textures to be texture buffers | ReinUsesLisp | 1 | -4/+38 | |
2019-06-07 | shader: Split SSY and PBK stack | ReinUsesLisp | 1 | -4/+27 | |
Hardware testing revealed that SSY and PBK push to a different stack, allowing code like this: SSY label1; PBK label2; SYNC; label1: PBK; label2: EXIT; | |||||
2019-06-06 | shader: Use shared_ptr to store nodes and move initialization to file | ReinUsesLisp | 1 | -31/+31 | |
Instead of having a vector of unique_ptr stored in a vector and returning star pointers to this, use shared_ptr. While changing initialization code, move it to a separate file when possible. This is a first step to allow code analysis and node generation beyond the ShaderIR class. | |||||
2019-06-03 | gl_shader_decompiler: Remove guest "position" varying | ReinUsesLisp | 1 | -19/+19 | |
"position" was being written but not read anywhere besides geometry shaders, where it had the same value as gl_Position. This commit replaces "position" with gl_Position, reducing the complexity of our code and the emitted GLSL code. | |||||
2019-05-30 | gl_rasterizer: Move alpha testing to the OpenGL pipeline | ReinUsesLisp | 1 | -19/+1 | |
Removes the alpha testing code from each fragment shader invocation. | |||||
2019-05-24 | gl_shader_decompiler: Use an if based cbuf indexing for broken drivers | ReinUsesLisp | 1 | -3/+20 | |
The following code is broken on AMD's proprietary GLSL compiler: ```glsl uint idx = ...; vec4 values = ...; float some_value = values[idx & 3]; ``` It index the wrong components, to fix this the following pessimized code is emitted when that bug is present: ```glsl uint idx = ...; vec4 values = ...; float some_value; if ((idx & 3) == 0) some_value = values.x; if ((idx & 3) == 1) some_value = values.y; if ((idx & 3) == 2) some_value = values.z; if ((idx & 3) == 3) some_value = values.w; ``` | |||||
2019-05-21 | renderer_opengl/gl_shader_decompiler: Remove redundant name specification in format string | Lioncash | 1 | -1/+1 | |
This accidentally slipped through a rebase. | |||||
2019-05-20 | shader: Implement S2R Tid{XYZ} and CtaId{XYZ} | ReinUsesLisp | 1 | -0/+16 | |
2019-05-20 | gl_shader_decompiler: Make GetSwizzle constexpr | ReinUsesLisp | 1 | -7/+7 | |
2019-05-20 | gl_shader_decompiler: Tidy up minor remaining cases of unnecessary std::string concatenation | Lioncash | 1 | -21/+20 | |
2019-05-20 | gl_shader_decompiler: Replace individual overloads with the fmt-based one | Lioncash | 1 | -28/+16 | |
Gets rid of the need to special-case brace handling depending on the overload used, and makes it consistent across the board with how fmt handles them. Strings with compile-time deducible strings are directly forwarded to std::string's constructor, so we don't need to worry about the performance difference here, as it'll be identical. | |||||
2019-05-20 | gl_shader_decompiler: Utilize fmt overload of AddLine() where applicable | Lioncash | 1 | -136/+152 | |
2019-05-19 | gl_shader_decompiler: Add AddLine() overload that forwards to fmt | Lioncash | 1 | -0/+11 | |
In a lot of places throughout the decompiler, string concatenation via operator+ is used quite heavily. This is usually fine, when not heavily used, but when used extensively, can be a problem. operator+ creates an entirely new heap allocated temporary string and given we perform expressions like: std::string thing = a + b + c + d; this ends up with a lot of unnecessary temporary strings being created and discarded, which kind of thrashes the heap more than we need to. Given we utilize fmt in some AddLine calls, we can make this a part of the ShaderWriter's API. We can make an overload that simply acts as a passthrough to fmt. This way, whenever things need to be appended to a string, the operation can be done via a single string formatting operation instead of discarding numerous temporary strings. This also has the benefit of making the strings themselves look nicer and makes it easier to spot errors in them. | |||||
2019-05-10 | video_core/renderer_opengl/gl_shader_decompiler: Remove unused Composite() function | Lioncash | 1 | -11/+0 | |
This isn't used at all, so it can be removed. | |||||
2019-05-03 | gl_shader_decompiler: Skip physical unused attributes | ReinUsesLisp | 1 | -18/+27 | |
2019-05-03 | shader: Add physical attributes commentaries | ReinUsesLisp | 1 | -0/+2 | |
2019-05-03 | gl_shader_decompiler: Implement GLSL physical attributes | ReinUsesLisp | 1 | -65/+100 | |
2019-05-03 | gl_shader_decompiler: Abstract generic attribute operations | ReinUsesLisp | 1 | -29/+26 | |
2019-05-03 | gl_shader_decompiler: Declare all possible varyings on physical attribute usage | ReinUsesLisp | 1 | -26/+65 | |
2019-05-03 | shader: Remove unused AbufNode Ipa mode | ReinUsesLisp | 1 | -2/+1 | |
2019-04-16 | shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmetic | ReinUsesLisp | 1 | -28/+23 | |
Operations done before the main half float operation (like HAdd) were managing a packed value instead of the unpacked one. Adding an unpacked operation allows us to drop the per-operand MetaHalfArithmetic entry, simplifying the code overall. | |||||
2019-04-16 | gl_shader_decompiler: Fix MrgH0 decompilation | ReinUsesLisp | 1 | -2/+2 | |
GLSL decompilation for HMergeH0 was wrong. This addresses that issue. | |||||
2019-04-16 | shader_ir/decode: Implement half float saturation | ReinUsesLisp | 1 | -4/+11 | |
2019-04-16 | renderer_opengl: Implement half float NaN comparisons | ReinUsesLisp | 1 | -18/+42 | |
2019-04-14 | gl_shader_decompiler: Use variable AOFFI on supported hardware | ReinUsesLisp | 1 | -5/+13 | |
2019-04-14 | shader_ir: Implement STG, keep track of global memory usage and flush | ReinUsesLisp | 1 | -11/+25 | |
2019-04-10 | Remove bounding in LD_C | Fernando Sahmkow | 1 | -2/+1 | |
2019-04-05 | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary() | Lioncash | 1 | -12/+12 | |
Temporal generally indicates a relation to time, but this is just creating a temporary, so this isn't really an accurate name for what the function is actually doing. | |||||
2019-04-05 | gl_shader_decompiler: Fix TXQ types | ReinUsesLisp | 1 | -2/+3 | |
TXQ returns integer types. Shaders usually do: R0 = TXQ(); // => int R0 = static_cast<float>(R0); If we don't treat it as an integer, it will cast a binary float value as float - resulting in a corrupted number. | |||||
2019-04-03 | gl_shader_decompiler: Return early when an operation is invalid | ReinUsesLisp | 1 | -1/+6 | |
2019-03-31 | gl_shader_decompiler: Hide local definitions inside an anonymous namespace | ReinUsesLisp | 1 | -6/+8 | |
2019-03-30 | gl_shader_decompiler: Add AOFFI backing implementation | ReinUsesLisp | 1 | -38/+85 | |
2019-02-26 | shader/decode: Remove extras from MetaTexture | ReinUsesLisp | 1 | -21/+35 | |
2019-02-14 | shader_decompiler: Improve Accuracy of Attribute Interpolation. | Fernando Sahmkow | 1 | -27/+17 | |
2019-02-12 | gl_shader_decompiler: Re-implement TLDS lod | ReinUsesLisp | 1 | -21/+34 | |
2019-02-07 | shader_ir: Remove F4 prefix to texture operations | ReinUsesLisp | 1 | -12/+12 | |
This was originally included because texture operations returned a vec4. These operations now return a single float and the F4 prefix doesn't mean anything. | |||||
2019-02-07 | shader_ir: Clean texture management code | ReinUsesLisp | 1 | -32/+41 | |
Previous code relied on GLSL parameter order (something that's always ill-formed on an IR design). This approach passes spatial coordiantes through operation nodes and array and depth compare values in the the texture metadata. It still contains an "extra" vector containing generic nodes for bias and component index (for example) which is still a bit ill-formed but it should be better than the previous approach. | |||||
2019-02-07 | gl_shader_disk_cache: Save GLSL and entries into the precompiled file | ReinUsesLisp | 1 | -3/+4 | |
2019-02-07 | gl_shader_decompiler: Remove name entries | ReinUsesLisp | 1 | -5/+3 | |
2019-02-03 | shader_ir: Rename BasicBlock to NodeBlock | ReinUsesLisp | 1 | -3/+3 | |
It's not always used as a basic block. Rename it for consistency. | |||||
2019-01-30 | shader_ir: Unify constant buffer offset values | ReinUsesLisp | 1 | -2/+3 | |
Constant buffer values on the shader IR were using different offsets if the access direct or indirect. cbuf34 has a non-multiplied offset while cbuf36 does. On shader decoding this commit multiplies it by four on cbuf34 queries. | |||||
2019-01-30 | gl_shader_cache: Use explicit bindings | ReinUsesLisp | 1 | -3/+8 | |
2019-01-30 | shader_decode: Implement LDG and basic cbuf tracking | ReinUsesLisp | 1 | -6/+38 | |
2019-01-15 | gl_shader_decompiler: replace std::get<> with std::get_if<> for macOS compatibility | ReinUsesLisp | 1 | -44/+58 | |
2019-01-15 | gl_shader_decompiler: Inline textureGather component | ReinUsesLisp | 1 | -15/+16 | |
2019-01-15 | shader_ir: Remove composite primitives and use temporals instead | ReinUsesLisp | 1 | -66/+37 | |
2019-01-15 | gl_shader_decompiler: Fixup AssignCompositeHalf | ReinUsesLisp | 1 | -1/+1 | |
2019-01-15 | shader_decode: Use proper primitive names | ReinUsesLisp | 1 | -10/+8 | |
2019-01-15 | shader_decode: Use BitfieldExtract instead of shift + and | ReinUsesLisp | 1 | -0/+7 | |
2019-01-15 | shader_ir: Remove Ipa primitive | ReinUsesLisp | 1 | -8/+0 | |
2019-01-15 | gl_shader_decompiler: Use rasterizer's UBO size limit | ReinUsesLisp | 1 | -1/+3 | |
2019-01-15 | gl_shader_gen: Fixup code formatting | ReinUsesLisp | 1 | -1/+1 | |
2019-01-15 | video_core: Rename glsl_decompiler to gl_shader_decompiler | ReinUsesLisp | 1 | -1/+1 | |
2019-01-15 | shader_ir: Remove RZ and use Register::ZeroIndex instead | ReinUsesLisp | 1 | -4/+5 | |
2019-01-15 | shader_decode: Implement TEXS.F16 | ReinUsesLisp | 1 | -0/+26 | |
2019-01-15 | glsl_decompiler: Fixup TLDS | ReinUsesLisp | 1 | -1/+0 | |
2019-01-15 | glsl_decompiler: Fixup geometry shaders | ReinUsesLisp | 1 | -10/+16 | |
2019-01-15 | glsl_decompiler: Fixup permissive member function declarations | ReinUsesLisp | 1 | -133/+133 | |
2019-01-15 | video_core: Implement IR based geometry shaders | ReinUsesLisp | 1 | -2/+68 | |
2019-01-15 | shader_decode: Implement HSET2 | ReinUsesLisp | 1 | -0/+6 | |
2019-01-15 | shader_decode: Rework HSETP2 | ReinUsesLisp | 1 | -26/+33 | |
2019-01-15 | shader_decode: Implement HFMA2 | ReinUsesLisp | 1 | -4/+5 | |
2019-01-15 | glsl_decompiler: Remove HNegate inlining | ReinUsesLisp | 1 | -10/+0 | |
2019-01-15 | shader_decode: Implement POPC | ReinUsesLisp | 1 | -0/+7 | |
2019-01-15 | shader_decode: Implement TLDS (untested) | ReinUsesLisp | 1 | -2/+27 | |
2019-01-15 | shader_ir: Fixup TEX and TEXS and partially fix TLD4 decompiling | ReinUsesLisp | 1 | -9/+20 | |
2019-01-15 | video_core: Return safe values after an assert hits | ReinUsesLisp | 1 | -0/+5 | |
2019-01-15 | video_core: Address feedback | ReinUsesLisp | 1 | -1/+1 | |
2019-01-15 | glsl_decompiler: Implementation | ReinUsesLisp | 1 | -0/+1393 | |