Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | General: Resolve fmt specifiers to adhere to 8.0.0 API where applicable | Lioncash | 2021-06-23 | 1 | -1/+1 |
| | | | | Also removes some deprecated API usages. | ||||
* | video_core: Reimplement the buffer cache | ReinUsesLisp | 2021-02-13 | 1 | -47/+14 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reimplement the buffer cache using cached bindings and page level granularity for modification tracking. This also drops the usage of shared pointers and virtual functions from the cache. - Bindings are cached, allowing to skip work when the game changes few bits between draws. - OpenGL Assembly shaders no longer copy when a region has been modified from the GPU to emulate constant buffers, instead GL_EXT_memory_object is used to alias sub-buffers within the same allocation. - OpenGL Assembly shaders stream constant buffer data using glProgramBufferParametersIuivNV, from NV_parameter_buffer_object. In theory this should save one hash table resolve inside the driver compared to glBufferSubData. - A new OpenGL stream buffer is implemented based on fences for drivers that are not Nvidia's proprietary, due to their low performance on partial glBufferSubData calls synchronized with 3D rendering (that some games use a lot). - Most optimizations are shared between APIs now, allowing Vulkan to cache more bindings than before, skipping unnecesarry work. This commit adds the necessary infrastructure to use Vulkan object from OpenGL. Overall, it improves performance and fixes some bugs present on the old cache. There are still some edge cases hit by some games that harm performance on some vendors, this are planned to be fixed in later commits. | ||||
* | gl_shader_decompiler: Fix constant buffer size calculation | ReinUsesLisp | 2021-01-21 | 1 | -1/+2 |
| | | | | | The divide logic was wrong and can cause an uniform buffer size overflow. | ||||
* | video_core: Rewrite the texture cache | ReinUsesLisp | 2020-12-30 | 1 | -5/+3 |
| | | | | | | | | | | | | | | The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues. | ||||
* | gl_shader_decompiler: Elide unnecessary copies within DeclareConstantBuffers() | Lioncash | 2020-12-07 | 1 | -1/+1 |
| | | | | Resolves a -Wrange-loop-analysis warning. | ||||
* | video_core: Remove unnecessary enum class casting in logging messages | Lioncash | 2020-12-07 | 1 | -5/+5 |
| | | | | | | | 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 scenarios | Lioncash | 2020-12-04 | 1 | -17/+18 |
| | | | | | | 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 shadow | ReinUsesLisp | 2020-10-28 | 1 | -8/+12 |
| | | | | | | | | 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[]. | ||||
* | General: Make use of std::nullopt where applicable | Lioncash | 2020-09-22 | 1 | -6/+6 |
| | | | | | | | | Allows some implementations to avoid completely zeroing out the internal buffer of the optional, and instead only set the validity byte within the structure. This also makes it consistent how we return empty optionals. | ||||
* | video_core: Enforce -Werror=switch | ReinUsesLisp | 2020-09-16 | 1 | -1/+3 |
| | | | | This forces us to fix all -Wswitch warnings in video_core. | ||||
* | Merge pull request #4391 from lioncash/nrvo | bunnei | 2020-07-24 | 1 | -1/+1 |
|\ | | | | | video_core: Allow copy elision to take place where applicable | ||||
| * | video_core: Allow copy elision to take place where applicable | Lioncash | 2020-07-21 | 1 | -1/+1 |
| | | | | | | | | | | 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/unused6 | bunnei | 2020-07-24 | 1 | -13/+0 |
|\ \ | | | | | | | video_core: Remove unused variables | ||||
| * | | video_core: Remove unused variables | Lioncash | 2020-07-21 | 1 | -13/+0 |
| |/ | | | | | | | Silences several compiler warnings about unused variables. | ||||
* / | renderer_{opengl,vulkan}: Clamp shared memory to host's limit | ReinUsesLisp | 2020-07-16 | 1 | -2/+9 |
|/ | | | | | This stops shaders from failing to build when the exceed host's shared memory size limit. An error is logged. | ||||
* | gl_shader_decompiler: Enable GL_EXT_texture_shadow_lod if available | Morph | 2020-06-21 | 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. | ||||
* | Merge pull request #4031 from Morph1984/fix-gs-outputs | bunnei | 2020-06-04 | 1 | -1/+13 |
|\ | | | | | gl_shader_decompiler: Fix geometry shader outputs on Intel drivers | ||||
| * | gl_shader_decompiler: Declare gl_Layer and gl_ViewportIndex within gl_PerVertex for vertex and tessellation shaders | Morph | 2020-06-01 | 1 | -6/+16 |
| | | |||||
| * | gl_shader_decompiler: Fix geometry shader outputs for Intel drivers | Morph | 2020-06-01 | 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. | ||||
* | | glsl: Squash constant buffers into a single SSBO when we hit the limit | ReinUsesLisp | 2020-06-01 | 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. | ||||
* | shader/other: Implement MEMBAR.CTS | ReinUsesLisp | 2020-05-27 | 1 | -2/+8 |
| | | | | | This silences an assertion we were hitting and uses workgroup memory barriers when the game requests it. | ||||
* | Merge pull request #3981 from ReinUsesLisp/bar | bunnei | 2020-05-26 | 1 | -0/+10 |
|\ | | | | | shader/other: Implement BAR.SYNC 0x0 | ||||
| * | shader/other: Implement BAR.SYNC 0x0 | ReinUsesLisp | 2020-05-22 | 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. | ||||
* | | Merge pull request #3978 from ReinUsesLisp/write-rz | bunnei | 2020-05-26 | 1 | -1/+3 |
|\ \ | | | | | | | shader_decompiler: Visit source nodes even when they assign to RZ | ||||
| * | | shader_decompiler: Visit source nodes even when they assign to RZ | ReinUsesLisp | 2020-05-22 | 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. | ||||
* / | shader/other: Implement thread comparisons (NV_shader_thread_group) | ReinUsesLisp | 2020-05-22 | 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 | ||||
* | gl_shader_decompiler: Properly emulate NaN behaviour on NE | ReinUsesLisp | 2020-05-10 | 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). | ||||
* | shader_ir: Separate float-point comparisons in ordered and unordered | ReinUsesLisp | 2020-05-09 | 1 | -44/+55 |
| | | | | | This allows us to use native SPIR-V instructions without having to manually check for NAN. | ||||
* | Merge pull request #3693 from ReinUsesLisp/clean-samplers | bunnei | 2020-05-02 | 1 | -27/+25 |
|\ | | | | | shader/texture: Support multiple unknown sampler properties | ||||
| * | shader_ir: Turn classes into data structures | ReinUsesLisp | 2020-04-23 | 1 | -27/+25 |
| | | |||||
* | | shader/arithmetic_integer: Implement CC for IADD | ReinUsesLisp | 2020-04-26 | 1 | -0/+10 |
|/ | |||||
* | Merge pull request #3714 from lioncash/copies | bunnei | 2020-04-22 | 1 | -3/+3 |
|\ | | | | | gl_shader_decompiler: Avoid copies where applicable | ||||
| * | gl_shader_decompiler: Avoid copies where applicable | Lioncash | 2020-04-18 | 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? | ||||
* | | video_core: gl_shader_decompiler: Fix implicit fallthrough errors. | bunnei | 2020-04-18 | 1 | -0/+1 |
|/ | |||||
* | CMakeLists: Specify -Wextra on linux builds | Lioncash | 2020-04-16 | 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. | ||||
* | Merge pull request #3612 from ReinUsesLisp/red | Fernando Sahmkow | 2020-04-15 | 1 | -2/+22 |
|\ | | | | | shader/memory: Implement RED.E.ADD and minor changes to ATOM | ||||
| * | shader/memory: Implement RED.E.ADD | ReinUsesLisp | 2020-04-06 | 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. | ||||
* | | Revert "gl_shader_decompiler: Implement merges with bitfieldInsert" | ReinUsesLisp | 2020-04-15 | 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. | ||||
* | | gl_shader_decompiler: Implement merges with bitfieldInsert | ReinUsesLisp | 2020-04-13 | 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. | ||||
* | | gl_shader_decompiler: Improve generated code in HMergeH* | ReinUsesLisp | 2020-04-12 | 1 | -6/+8 |
| | | | | | | | | | | Avoiding bitwise expressions, this fixes Turing issues in shaders using half float merges that affected several games. | ||||
* | | shader_decompiler: Remove FragCoord.w hack and change IPA implementation | ReinUsesLisp | 2020-04-02 | 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 | ||||
* | gl_decompiler: min/max op not implement yet | namkazy | 2020-03-30 | 1 | -0/+4 |
| | |||||
* | gl_decompiler: add atomic op | Nguyen Dac Nam | 2020-03-30 | 1 | -0/+16 |
| | |||||
* | Merge pull request #3520 from ReinUsesLisp/legacy-varyings | bunnei | 2020-03-26 | 1 | -12/+55 |
|\ | | | | | gl_shader_decompiler: Implement legacy varyings | ||||
| * | gl_shader_decompiler: Don't redeclare gl_VertexID and gl_InstanceID | ReinUsesLisp | 2020-03-18 | 1 | -8/+0 |
| | | |||||
| * | gl_shader_decompiler: Implement legacy varyings | ReinUsesLisp | 2020-03-16 | 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. | ||||
* | | gl_shader_decompiler: Remove deprecated function and its usages | ReinUsesLisp | 2020-03-19 | 1 | -11/+8 |
| | | |||||
* | | Merge pull request #3498 from ReinUsesLisp/texel-fetch-glsl | bunnei | 2020-03-17 | 1 | -6/+9 |
|\ \ | |/ |/| | gl_shader_decompiler: Add layer component to texelFetch | ||||
| * | gl_shader_decompiler: Add layer component to texelFetch | ReinUsesLisp | 2020-03-12 | 1 | -6/+9 |
| | | | | | | | | TexelFetch was not emitting the array component generating invalid GLSL. | ||||
* | | vk/gl_shader_decompiler: Silence assertion on compute | ReinUsesLisp | 2020-03-13 | 1 | -3/+6 |
| | | |||||
* | | gl_shader_decompiler: Fix implicit conversion errors | ReinUsesLisp | 2020-03-13 | 1 | -3/+3 |
| | | |||||
* | | shader/transform_feedback: Expose buffer stride | ReinUsesLisp | 2020-03-13 | 1 | -1/+2 |
| | | |||||
* | | gl_shader_decompiler: Decorate output attributes with XFB layout | ReinUsesLisp | 2020-03-13 | 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). | ||||
* | | gl_shader_decompiler: Initialize gl_Position on vertex shaders | ReinUsesLisp | 2020-03-13 | 1 | -0/+4 |
| | | |||||
* | | gl_shader_decompiler: Add missing {} on smem GLSL emission | ReinUsesLisp | 2020-03-13 | 1 | -1/+1 |
| | | |||||
* | | gl_shader_decompiler: Fix regression in render target declarations | ReinUsesLisp | 2020-03-12 | 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. | ||||
* | | shader/registry: Address feedback | ReinUsesLisp | 2020-03-09 | 1 | -1/+1 |
| | | |||||
* | | gl_shader_decompiler: Add identifier to decompiled code | ReinUsesLisp | 2020-03-09 | 1 | -5/+10 |
| | | |||||
* | | gl_shader_decompiler: Roll back to GLSL core 430 | ReinUsesLisp | 2020-03-09 | 1 | -1/+1 |
| | | | | | | | | RenderDoc won't build shaders if we use GLSL compatibility. | ||||
* | | shader/registry: Store graphics and compute metadata | ReinUsesLisp | 2020-03-09 | 1 | -17/+67 |
| | | | | | | | | | | Store information GLSL forces us to provide but it's dynamic state in hardware (workgroup sizes, primitive topology, shared memory size). | ||||
* | | gl_shader_cache: Rework shader cache and remove post-specializations | ReinUsesLisp | 2020-03-09 | 1 | -63/+138 |
|/ | | | | | Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it. | ||||
* | gl_state_tracker: Implement dirty flags for clip distances and shaders | ReinUsesLisp | 2020-02-28 | 1 | -1/+4 |
| | |||||
* | Merge pull request #3282 from FernandoS27/indexed-samplers | bunnei | 2020-02-02 | 1 | -3/+34 |
|\ | | | | | Partially implement Indexed samplers in general and specific code in GLSL | ||||
| * | Shader_IR: Address feedback. | Fernando Sahmkow | 2020-01-25 | 1 | -3/+3 |
| | | |||||
| * | Shader_IR: Correct Custom Variable assignment. | Fernando Sahmkow | 2020-01-24 | 1 | -0/+2 |
| | | |||||
| * | Shader_IR: Propagate bindless index into the GL compiler. | Fernando Sahmkow | 2020-01-24 | 1 | -1/+1 |
| | | |||||
| * | Shader_IR: Implement Injectable Custom Variables to the IR. | Fernando Sahmkow | 2020-01-24 | 1 | -0/+20 |
| | | |||||
| * | GL Backend: Introduce indexed samplers into the GL backend | Fernando Sahmkow | 2020-01-24 | 1 | -3/+12 |
| | | |||||
* | | Merge pull request #3350 from ReinUsesLisp/atom | bunnei | 2020-01-29 | 1 | -4/+1 |
|\ \ | | | | | | | shader/memory: Implement ATOM.ADD | ||||
| * | | shader/memory: Implement ATOM.ADD | ReinUsesLisp | 2020-01-26 | 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. | ||||
* / | gl_shader_decompiler: Remove UNIMPLEMENTED for gl_PointSize | ReinUsesLisp | 2020-01-28 | 1 | -1/+0 |
|/ | | | | This was implemented by a previous commit and it's no longer required. | ||||
* | Merge pull request #3317 from ReinUsesLisp/gl-decomp-cc-decomp | Fernando Sahmkow | 2020-01-19 | 1 | -27/+5 |
|\ | | | | | gl_shader_decompiler: Fix decompilation of condition codes | ||||
| * | gl_shader_decompiler: Fix decompilation of condition codes | ReinUsesLisp | 2020-01-18 | 1 | -27/+5 |
| | | | | | | | | | | Use Visit instead of reimplementing it. Fixes unimplemented negations for condition codes. | ||||
* | | shader/memory: Implement ATOMS.ADD.U32 | ReinUsesLisp | 2020-01-16 | 1 | -0/+12 |
|/ | |||||
* | Shader_IR: Address Feedback | Fernando Sahmkow | 2020-01-04 | 1 | -13/+4 |
| | |||||
* | Shader_IR: add the ability to amend code in the shader ir. | Fernando Sahmkow | 2019-12-30 | 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. | ||||
* | Merge pull request #3228 from ReinUsesLisp/ptp | bunnei | 2019-12-27 | 1 | -34/+56 |
|\ | | | | | shader/texture: Implement AOFFI and PTP for TLD4 and TLD4S | ||||
| * | shader/texture: Implement TLD4.PTP | ReinUsesLisp | 2019-12-16 | 1 | -31/+53 |
| | | |||||
| * | gl_shader_decompiler: Rename "sepparate" to "separate" | ReinUsesLisp | 2019-12-16 | 1 | -3/+3 |
| | | |||||
* | | gl_shader_decompiler: Add missing DeclareImages | ReinUsesLisp | 2019-12-18 | 1 | -0/+1 |
|/ | |||||
* | Shader_IR: Correct TLD4S Depth Compare. | Fernando Sahmkow | 2019-12-12 | 1 | -4/+4 |
| | |||||
* | Gl_Shader_compiler: Correct Depth Compare for Texture Gather operations. | Fernando Sahmkow | 2019-12-12 | 1 | -8/+21 |
| | |||||
* | shader: Implement MEMBAR.GL | ReinUsesLisp | 2019-12-10 | 1 | -0/+7 |
| | | | | Implement using memoryBarrier in GLSL and OpMemoryBarrier on SPIR-V. | ||||
* | shader_ir/other: Implement S2R InvocationId | ReinUsesLisp | 2019-12-10 | 1 | -0/+5 |
| | |||||
* | Merge pull request #3109 from FernandoS27/new-instr | bunnei | 2019-12-07 | 1 | -1/+50 |
|\ | | | | | Implement FLO & TXD Instructions on GPU Shaders | ||||
| * | Shader_IR: Address Feedback | Fernando Sahmkow | 2019-11-18 | 1 | -1/+1 |
| | | |||||
| * | Shader_IR: Implement TXD instruction. | Fernando Sahmkow | 2019-11-14 | 1 | -1/+43 |
| | | |||||
| * | Shader_IR: Implement FLO instruction. | Fernando Sahmkow | 2019-11-14 | 1 | -0/+7 |
| | | |||||
* | | gl_shader_decompiler: Fix casts from fp32 to f16 | ReinUsesLisp | 2019-11-26 | 1 | -1/+2 |
| | | | | | | | | Casts from f32 to f16 zeroes the higher half of the target register. | ||||
* | | gl_shader_decompiler: Normalize image bindings | ReinUsesLisp | 2019-11-23 | 1 | -12/+8 |
| | | |||||
* | | gl_shader_decompiler: Normalize cbuf bindings | ReinUsesLisp | 2019-11-23 | 1 | -8/+4 |
| | | | | | | | | | | Stage and compute shaders were using a different binding counter. Normalize these. | ||||
* | | gl_shader_cache: Remove dynamic BaseBinding specialization | ReinUsesLisp | 2019-11-23 | 1 | -11/+18 |
| | | |||||
* | | video_core: Unify ProgramType and ShaderStage into ShaderType | ReinUsesLisp | 2019-11-23 | 1 | -21/+23 |
| | | |||||
* | | gl_shader_cache: Specialize local memory size for compute shaders | ReinUsesLisp | 2019-11-23 | 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. | ||||
* | | gl_shader_cache: Specialize shared memory size | ReinUsesLisp | 2019-11-23 | 1 | -19/+4 |
| | | | | | | | | | | Shared memory was being declared with an undefined size. Specialize from guest GPU parameters the compute shader's shared memory size. | ||||
* | | shader/texture: Deduce texture buffers from locker | ReinUsesLisp | 2019-11-23 | 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. | ||||
* | | Merge pull request #3047 from ReinUsesLisp/clip-control | bunnei | 2019-11-15 | 1 | -7/+1 |
|\ \ | |/ |/| | gl_rasterizer: Emulate viewport flipping with ARB_clip_control | ||||
| * | gl_shader_decompiler: Fix typo "y_negate"->"y_direction" | ReinUsesLisp | 2019-11-07 | 1 | -1/+1 |
| | | |||||
| * | gl_rasterizer: Emulate viewport flipping with ARB_clip_control | ReinUsesLisp | 2019-11-07 | 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). | ||||
* | | Merge pull request #3081 from ReinUsesLisp/fswzadd-shuffles | Fernando Sahmkow | 2019-11-14 | 1 | -37/+39 |
|\ \ | | | | | | | shader: Implement FSWZADD and reimplement SHFL | ||||
| * | | gl_shader_decompiler: Add safe fallbacks when ARB_shader_ballot is not available | ReinUsesLisp | 2019-11-08 | 1 | -5/+21 |
| | | | |||||
| * | | shader_ir/warp: Implement FSWZADD | ReinUsesLisp | 2019-11-08 | 1 | -0/+18 |
| | | | |||||
| * | | gl_shader_decompiler: Reimplement shuffles with platform agnostic intrinsics | ReinUsesLisp | 2019-11-08 | 1 | -40/+8 |
| |/ | |||||
* | | Merge pull request #3080 from FernandoS27/glsl-fix | bunnei | 2019-11-08 | 1 | -1/+1 |
|\ \ | |/ |/| | GLSLDecompiler: Correct Texture Gather Offset. | ||||
| * | GLSLDecompiler: Correct Texture Gather Offset. | Fernando Sahmkow | 2019-11-07 | 1 | -1/+1 |
| | | | | | | | | This commit corrects the argument ordering in textureGatherOffset. | ||||
* | | shader/node: Unpack bindless texture encoding | ReinUsesLisp | 2019-10-30 | 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. | ||||
* | gl_shader_decompiler: Move entries to a separate function | ReinUsesLisp | 2019-10-25 | 1 | -35/+35 |
| | |||||
* | Shader_IR: Implement Fast BRX and allow multi-branches in the CFG. | Fernando Sahmkow | 2019-10-25 | 1 | -0/+5 |
| | |||||
* | Merge pull request #2983 from lioncash/fallthrough | Fernando Sahmkow | 2019-10-22 | 1 | -0/+3 |
|\ | | | | | gl_shader_decompiler/vk_shader_decompiler: Resolve implicit fallthrough cases | ||||
| * | gl_shader_decompiler: Resolve fallthrough within ExprDecompiler's ExprCondCode operator() | Lioncash | 2019-10-16 | 1 | -0/+3 |
| | | | | | | | | | | This would previously result in NeverExecute and UnusedIndex being treated as regular predicates. | ||||
* | | gl_shader_decompiler: Make ExprDecompiler's GetResult() a const member function | Lioncash | 2019-10-16 | 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. | ||||
* | | gl_shader_decompiler: Use a std::string_view with GetDeclarationWithSuffix() | Lioncash | 2019-10-16 | 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). | ||||
* | | gl_shader_decompiler: Fold flow_var constant into GetFlowVariable() | Lioncash | 2019-10-16 | 1 | -3/+1 |
| | | | | | | | | | | This is only ever used within this function, so we can narrow it's scope down. | ||||
* | | gl_shader_decompiler: Mark ASTDecompiler/ExprDecompiler parameters as const references where applicable | Lioncash | 2019-10-16 | 1 | -21/+21 |
| | | | | | | | | | | These member functions don't actually modify the input parameter, so we can make this explicit with the use of const. | ||||
* | | gl_shader_decompiler: Pass by reference to GenerateTextureArgument() | Lioncash | 2019-10-16 | 1 | -2/+2 |
| | | | | | | | | Avoids an unnecessary atomic reference count increment and decrement. | ||||
* | | gl_shader_decompiler: Use std::holds_alternative within GenerateTexture() | Lioncash | 2019-10-16 | 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. | ||||
* | | gl_shader_decompiler: Avoid unnecessary copies of MetaImage | Lioncash | 2019-10-16 | 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. | ||||
* | Shader_ir: Address feedback | Fernando Sahmkow | 2019-10-05 | 1 | -4/+8 |
| | |||||
* | vk_shader_decompiler: Clean code and be const correct. | Fernando Sahmkow | 2019-10-05 | 1 | -1/+1 |
| | |||||
* | gl_shader_decompiler: Refactor and address feedback. | Fernando Sahmkow | 2019-10-05 | 1 | -17/+18 |
| | |||||
* | Shader_Ir: Refactor Decompilation process and allow multiple decompilation modes. | Fernando Sahmkow | 2019-10-05 | 1 | -3/+5 |
| | |||||
* | gl_shader_decompiler: Implement AST decompiling | Fernando Sahmkow | 2019-10-05 | 1 | -29/+242 |
| | |||||
* | gl_shader_decompiler: Add tailing return for HUnpack2 | ReinUsesLisp | 2019-09-24 | 1 | -0/+2 |
| | |||||
* | gl_shader_decompiler: Fix clang build issues | ReinUsesLisp | 2019-09-24 | 1 | -26/+23 |
| | |||||
* | Merge pull request #2869 from ReinUsesLisp/suld | bunnei | 2019-09-24 | 1 | -98/+49 |
|\ | | | | | shader/image: Implement SULD and fix SUATOM | ||||
| * | gl_shader_decompiler: Use uint for images and fix SUATOM | ReinUsesLisp | 2019-09-21 | 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. | ||||
| * | shader/image: Implement SULD and remove irrelevant code | ReinUsesLisp | 2019-09-21 | 1 | -2/+15 |
| | | | | | | | | | | * Implement SULD as float. * Remove conditional declaration of GL_ARB_shader_viewport_layer_array. | ||||
* | | Merge pull request #2870 from FernandoS27/multi-draw | David | 2019-09-22 | 1 | -1/+9 |
|\ \ | |/ |/| | Implement a MME Draw commands Inliner and correct host instance drawing | ||||
| * | VideoCore: Corrections to the MME Inliner and removal of hacky instance management. | Fernando Sahmkow | 2019-09-19 | 1 | -1/+9 |
| | | |||||
| * | Video Core: initial Implementation of InstanceDraw Packaging | Fernando Sahmkow | 2019-09-19 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #2846 from ReinUsesLisp/fixup-viewport-index | bunnei | 2019-09-20 | 1 | -10/+14 |
|\ \ | | | | | | | gl_shader_decompiler: Avoid writing output attribute when unimplemented | ||||
| * | | gl_shader_decompiler: Avoid writing output attribute when unimplemented | ReinUsesLisp | 2019-09-06 | 1 | -10/+14 |
| | | | |||||
* | | | Merge pull request #2855 from ReinUsesLisp/shfl | bunnei | 2019-09-20 | 1 | -8/+55 |
|\ \ \ | |_|/ |/| | | shader_ir/warp: Implement SHFL for Nvidia devices | ||||
| * | | shader_ir/warp: Implement SHFL | ReinUsesLisp | 2019-09-17 | 1 | -8/+55 |
| | | | |||||
* | | | Merge pull request #2784 from ReinUsesLisp/smem | bunnei | 2019-09-18 | 1 | -0/+23 |
|\ \ \ | |/ / |/| | | shader_ir: Implement shared memory | ||||
| * | | gl_shader_decompiler: Implement shared memory | ReinUsesLisp | 2019-09-05 | 1 | -0/+23 |
| |/ | |||||
* | | shader/image: Implement SUATOM and fix SUST | ReinUsesLisp | 2019-09-11 | 1 | -26/+119 |
| | | |||||
* | | gl_shader_decompiler: Keep track of written images and mark them as modified | ReinUsesLisp | 2019-09-06 | 1 | -6/+12 |
|/ | |||||
* | gl_shader_decompiler: Fixup slow path | ReinUsesLisp | 2019-09-04 | 1 | -1/+1 |
| | |||||
* | gl_device: Disable precise in fragment shaders on bugged drivers | ReinUsesLisp | 2019-09-04 | 1 | -1/+8 |
| | |||||
* | gl_shader_decompiler: Fixup AMD's slow path type | ReinUsesLisp | 2019-09-04 | 1 | -1/+1 |
| | |||||
* | gl_shader_decompiler: Rework GLSL decompiler type system | ReinUsesLisp | 2019-09-04 | 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. | ||||
* | Merge pull request #2742 from ReinUsesLisp/fix-texture-buffers | bunnei | 2019-08-29 | 1 | -1/+1 |
|\ | | | | | gl_texture_cache: Miscellaneous texture buffer fixes | ||||
| * | gl_shader_decompiler: Rename bufferImage to imageBuffer | ReinUsesLisp | 2019-07-18 | 1 | -1/+1 |
| | | | | | | | | | | The online OpenGL documentation is wrong. The type definition is imageBuffer. | ||||
* | | shader_ir: Implement VOTE | ReinUsesLisp | 2019-08-21 | 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. | ||||
* | | Merge pull request #2753 from FernandoS27/float-convert | bunnei | 2019-08-21 | 1 | -0/+18 |
|\ \ | | | | | | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F. | ||||
| * | | Shader_Ir: Implement F16 Variants of F2F, F2I, I2F. | Fernando Sahmkow | 2019-07-20 | 1 | -0/+18 |
| | | | | | | | | | | | | | | | This commit takes care of implementing the F16 Variants of the conversion instructions and makes sure conversions are done. | ||||
* | | | Merge pull request #2734 from ReinUsesLisp/compute-shaders | bunnei | 2019-07-22 | 1 | -30/+44 |
|\ \ \ | |/ / |/| | | gl_rasterizer: Implement compute shaders | ||||
| * | | gl_shader_decompiler: Stub local memory size | ReinUsesLisp | 2019-07-15 | 1 | -8/+14 |
| | | | |||||
| * | | gl_rasterizer: Implement compute shaders | ReinUsesLisp | 2019-07-15 | 1 | -26/+34 |
| |/ | |||||
* / | shader/half_set_predicate: Fix HSETP2 implementation | ReinUsesLisp | 2019-07-20 | 1 | -12/+4 |
|/ | |||||
* | Merge pull request #2695 from ReinUsesLisp/layer-viewport | Fernando Sahmkow | 2019-07-15 | 1 | -29/+76 |
|\ | | | | | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ||||
| * | gl_shader_decompiler: Fix gl_PointSize redeclaration | ReinUsesLisp | 2019-07-11 | 1 | -1/+1 |
| | | |||||
| * | gl_shader_decompiler: Fix conditional usage of GL_ARB_shader_viewport_layer_array | ReinUsesLisp | 2019-07-11 | 1 | -2/+3 |
| | | |||||
| * | gl_shader_decompiler: Implement gl_ViewportIndex and gl_Layer in vertex shaders | ReinUsesLisp | 2019-07-08 | 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. | ||||
* | | Merge pull request #2675 from ReinUsesLisp/opengl-buffer-cache | bunnei | 2019-07-15 | 1 | -1/+1 |
|\ \ | | | | | | | buffer_cache: Implement a generic buffer cache and its OpenGL backend | ||||
| * | | gl_rasterizer: Minor style changes | ReinUsesLisp | 2019-07-06 | 1 | -1/+1 |
| |/ | |||||
* | | shader_ir: Unify blocks in decompiled shaders. | Fernando Sahmkow | 2019-07-09 | 1 | -4/+6 |
| | | |||||
* | | shader_ir: Implement BRX & BRA.CC | Fernando Sahmkow | 2019-07-09 | 1 | -0/+9 |
|/ | |||||
* | gl_shader_decompiler: Address feedback | ReinUsesLisp | 2019-06-24 | 1 | -11/+12 |
| | |||||
* | gl_shader_decompiler: Implement image binding settings | ReinUsesLisp | 2019-06-21 | 1 | -0/+3 |
| | |||||
* | shader: Decode SUST and implement backing image functionality | ReinUsesLisp | 2019-06-21 | 1 | -0/+70 |
| | |||||
* | gl_shader_decompiler: Allow 1D textures to be texture buffers | ReinUsesLisp | 2019-06-21 | 1 | -4/+38 |
| | |||||
* | Merge pull request #2538 from ReinUsesLisp/ssy-pbk | Zach Hilman | 2019-06-16 | 1 | -4/+27 |
|\ | | | | | shader: Split SSY and PBK stack | ||||
| * | shader: Split SSY and PBK stack | ReinUsesLisp | 2019-06-07 | 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; | ||||
* | | Merge pull request #2514 from ReinUsesLisp/opengl-compat | Zach Hilman | 2019-06-07 | 1 | -19/+1 |
|\ \ | |/ |/| | video_core: Drop OpenGL core in favor of OpenGL compatibility | ||||
| * | gl_rasterizer: Move alpha testing to the OpenGL pipeline | ReinUsesLisp | 2019-05-30 | 1 | -19/+1 |
| | | | | | | | | Removes the alpha testing code from each fragment shader invocation. | ||||
* | | shader: Use shared_ptr to store nodes and move initialization to file | ReinUsesLisp | 2019-06-06 | 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. | ||||
* | | Merge pull request #2540 from ReinUsesLisp/remove-guest-position | bunnei | 2019-06-06 | 1 | -19/+19 |
|\ \ | | | | | | | gl_shader_decompiler: Remove guest "position" varying | ||||
| * | | gl_shader_decompiler: Remove guest "position" varying | ReinUsesLisp | 2019-06-03 | 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. | ||||
* | | Merge pull request #2512 from ReinUsesLisp/comp-indexing | bunnei | 2019-06-06 | 1 | -3/+20 |
|\ \ | |/ |/| | gl_shader_decompiler: Pessimize uniform buffer access on AMD's prorpietary driver | ||||
| * | gl_shader_decompiler: Use an if based cbuf indexing for broken drivers | ReinUsesLisp | 2019-05-24 | 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; ``` | ||||
* | | Merge pull request #2446 from ReinUsesLisp/tid | bunnei | 2019-05-29 | 1 | -7/+23 |
|\ \ | |/ |/| | shader: Implement S2R Tid{XYZ} and CtaId{XYZ} | ||||
| * | shader: Implement S2R Tid{XYZ} and CtaId{XYZ} | ReinUsesLisp | 2019-05-20 | 1 | -0/+16 |
| | | |||||
| * | gl_shader_decompiler: Make GetSwizzle constexpr | ReinUsesLisp | 2019-05-20 | 1 | -7/+7 |
| | | |||||
* | | renderer_opengl/gl_shader_decompiler: Remove redundant name specification in format string | Lioncash | 2019-05-21 | 1 | -1/+1 |
| | | | | | | | | This accidentally slipped through a rebase. | ||||
* | | gl_shader_decompiler: Tidy up minor remaining cases of unnecessary std::string concatenation | Lioncash | 2019-05-20 | 1 | -21/+20 |
| | | |||||
* | | gl_shader_decompiler: Replace individual overloads with the fmt-based one | Lioncash | 2019-05-20 | 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. | ||||
* | | gl_shader_decompiler: Utilize fmt overload of AddLine() where applicable | Lioncash | 2019-05-20 | 1 | -136/+152 |
| | | |||||
* | | gl_shader_decompiler: Add AddLine() overload that forwards to fmt | Lioncash | 2019-05-19 | 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. | ||||
* | Merge pull request #2441 from ReinUsesLisp/al2p | bunnei | 2019-05-19 | 1 | -116/+197 |
|\ | | | | | shader: Implement AL2P and ALD.PHYS | ||||
| * | gl_shader_decompiler: Skip physical unused attributes | ReinUsesLisp | 2019-05-03 | 1 | -18/+27 |
| | | |||||
| * | shader: Add physical attributes commentaries | ReinUsesLisp | 2019-05-03 | 1 | -0/+2 |
| | | |||||
| * | gl_shader_decompiler: Implement GLSL physical attributes | ReinUsesLisp | 2019-05-03 | 1 | -65/+100 |
| | | |||||
| * | gl_shader_decompiler: Abstract generic attribute operations | ReinUsesLisp | 2019-05-03 | 1 | -29/+26 |
| | | |||||
| * | gl_shader_decompiler: Declare all possible varyings on physical attribute usage | ReinUsesLisp | 2019-05-03 | 1 | -26/+65 |
| | | |||||
| * | shader: Remove unused AbufNode Ipa mode | ReinUsesLisp | 2019-05-03 | 1 | -2/+1 |
| | | |||||
* | | video_core/renderer_opengl/gl_shader_decompiler: Remove unused Composite() function | Lioncash | 2019-05-10 | 1 | -11/+0 |
|/ | | | | This isn't used at all, so it can be removed. | ||||
* | Merge pull request #2383 from ReinUsesLisp/aoffi-test | bunnei | 2019-04-23 | 1 | -5/+13 |
|\ | | | | | gl_shader_decompiler: Disable variable AOFFI on unsupported devices | ||||
| * | gl_shader_decompiler: Use variable AOFFI on supported hardware | ReinUsesLisp | 2019-04-14 | 1 | -5/+13 |
| | | |||||
* | | Merge pull request #2409 from ReinUsesLisp/half-floats | bunnei | 2019-04-20 | 1 | -50/+76 |
|\ \ | | | | | | | shader_ir/decode: Miscellaneous fixes to half-float decompilation | ||||
| * | | shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmetic | ReinUsesLisp | 2019-04-16 | 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. | ||||
| * | | gl_shader_decompiler: Fix MrgH0 decompilation | ReinUsesLisp | 2019-04-16 | 1 | -2/+2 |
| | | | | | | | | | | | | GLSL decompilation for HMergeH0 was wrong. This addresses that issue. | ||||
| * | | shader_ir/decode: Implement half float saturation | ReinUsesLisp | 2019-04-16 | 1 | -4/+11 |
| | | | |||||
| * | | renderer_opengl: Implement half float NaN comparisons | ReinUsesLisp | 2019-04-16 | 1 | -18/+42 |
| |/ | |||||
* / | shader_ir: Implement STG, keep track of global memory usage and flush | ReinUsesLisp | 2019-04-14 | 1 | -11/+25 |
|/ | |||||
* | Remove bounding in LD_C | Fernando Sahmkow | 2019-04-10 | 1 | -2/+1 |
| | |||||
* | Merge pull request #2306 from ReinUsesLisp/aoffi | bunnei | 2019-04-07 | 1 | -42/+91 |
|\ | | | | | shader_ir: Implement AOFFI for TEX and TLD4 | ||||
| * | gl_shader_decompiler: Hide local definitions inside an anonymous namespace | ReinUsesLisp | 2019-03-31 | 1 | -6/+8 |
| | | |||||
| * | gl_shader_decompiler: Add AOFFI backing implementation | ReinUsesLisp | 2019-03-30 | 1 | -38/+85 |
| | | |||||
* | | Merge pull request #2327 from ReinUsesLisp/crash-safe-visit | bunnei | 2019-04-06 | 1 | -1/+6 |
|\ \ | | | | | | | gl_shader_decompiler: Return early when an operation is invalid | ||||
| * | | gl_shader_decompiler: Return early when an operation is invalid | ReinUsesLisp | 2019-04-03 | 1 | -1/+6 |
| |/ | |||||
* | | Merge pull request #2337 from lioncash/temporary | bunnei | 2019-04-06 | 1 | -12/+12 |
|\ \ | | | | | | | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary() | ||||
| * | | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary() | Lioncash | 2019-04-05 | 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. | ||||
* / | gl_shader_decompiler: Fix TXQ types | ReinUsesLisp | 2019-04-05 | 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. | ||||
* | shader/decode: Remove extras from MetaTexture | ReinUsesLisp | 2019-02-26 | 1 | -21/+35 |
| | |||||
* | Merge pull request #2118 from FernandoS27/ipa-improve | bunnei | 2019-02-25 | 1 | -27/+17 |
|\ | | | | | shader_decompiler: Improve Accuracy of Attribute Interpolation. | ||||
| * | shader_decompiler: Improve Accuracy of Attribute Interpolation. | Fernando Sahmkow | 2019-02-14 | 1 | -27/+17 |
| | | |||||
* | | gl_shader_decompiler: Re-implement TLDS lod | ReinUsesLisp | 2019-02-12 | 1 | -21/+34 |
|/ | |||||
* | shader_ir: Remove F4 prefix to texture operations | ReinUsesLisp | 2019-02-07 | 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. | ||||
* | shader_ir: Clean texture management code | ReinUsesLisp | 2019-02-07 | 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. | ||||
* | Merge pull request #2083 from ReinUsesLisp/shader-ir-cbuf-tracking | bunnei | 2019-02-07 | 1 | -3/+3 |
|\ | | | | | shader/track: Add a more permissive global memory tracking | ||||
| * | shader_ir: Rename BasicBlock to NodeBlock | ReinUsesLisp | 2019-02-03 | 1 | -3/+3 |
| | | | | | | | | It's not always used as a basic block. Rename it for consistency. | ||||
* | | gl_shader_disk_cache: Save GLSL and entries into the precompiled file | ReinUsesLisp | 2019-02-07 | 1 | -3/+4 |
| | | |||||
* | | gl_shader_decompiler: Remove name entries | ReinUsesLisp | 2019-02-07 | 1 | -5/+3 |
|/ | |||||
* | shader_ir: Unify constant buffer offset values | ReinUsesLisp | 2019-01-30 | 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. | ||||
* | gl_shader_cache: Use explicit bindings | ReinUsesLisp | 2019-01-30 | 1 | -3/+8 |
| | |||||
* | shader_decode: Implement LDG and basic cbuf tracking | ReinUsesLisp | 2019-01-30 | 1 | -6/+38 |
| | |||||
* | gl_shader_decompiler: replace std::get<> with std::get_if<> for macOS compatibility | ReinUsesLisp | 2019-01-15 | 1 | -44/+58 |
| | |||||
* | gl_shader_decompiler: Inline textureGather component | ReinUsesLisp | 2019-01-15 | 1 | -15/+16 |
| | |||||
* | shader_ir: Remove composite primitives and use temporals instead | ReinUsesLisp | 2019-01-15 | 1 | -66/+37 |
| | |||||
* | gl_shader_decompiler: Fixup AssignCompositeHalf | ReinUsesLisp | 2019-01-15 | 1 | -1/+1 |
| | |||||
* | shader_decode: Use proper primitive names | ReinUsesLisp | 2019-01-15 | 1 | -10/+8 |
| | |||||
* | shader_decode: Use BitfieldExtract instead of shift + and | ReinUsesLisp | 2019-01-15 | 1 | -0/+7 |
| | |||||
* | shader_ir: Remove Ipa primitive | ReinUsesLisp | 2019-01-15 | 1 | -8/+0 |
| | |||||
* | gl_shader_decompiler: Use rasterizer's UBO size limit | ReinUsesLisp | 2019-01-15 | 1 | -1/+3 |
| | |||||
* | gl_shader_gen: Fixup code formatting | ReinUsesLisp | 2019-01-15 | 1 | -1/+1 |
| | |||||
* | video_core: Rename glsl_decompiler to gl_shader_decompiler | ReinUsesLisp | 2019-01-15 | 1 | -0/+1543 |
| | |||||
* | video_core: Replace gl_shader_decompiler | ReinUsesLisp | 2019-01-15 | 1 | -3950/+0 |
| | |||||
* | Add missing uintBitsToFloat to SetRegisterToHalfFloat | Rodolfo Bogado | 2018-12-27 | 1 | -2/+2 |
| | |||||
* | Merge pull request #1892 from Tinob/master | bunnei | 2018-12-27 | 1 | -113/+122 |
|\ | | | | | Improve Zero flag implementation | ||||
| * | Apply CC test to the final value to be stored in the register | Rodolfo Bogado | 2018-12-26 | 1 | -9/+12 |
| | | |||||
| * | Includde saturation in the evaluation of the control code | Rodolfo Bogado | 2018-12-22 | 1 | -3/+4 |
| | | |||||
| * | Handle RZ cases evaluating the expression instead of the register value. | Rodolfo Bogado | 2018-12-22 | 1 | -14/+22 |
| | | |||||
| * | complete emulation of ZeroFlag | Rodolfo Bogado | 2018-12-22 | 1 | -100/+97 |
| | | |||||
* | | Fixed shader linking error due to TLDS (#1934) | David | 2018-12-26 | 1 | -1/+1 |
|/ | | | | | | | | * Fixed shader linking error due to TLDS coord should be coords * Fix remaining coords | ||||
* | Merge pull request #1921 from ogniK5377/no-unit | bunnei | 2018-12-21 | 1 | -2/+10 |
|\ | | | | | Fixed uninitialized memory due to missing returns in canary | ||||
| * | hopefully fix clang format issue | David Marcec | 2018-12-19 | 1 | -0/+1 |
| | | |||||
| * | Fixed uninitialized memory due to missing returns in canary | David Marcec | 2018-12-19 | 1 | -2/+9 |
| | | | | | | | | Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used. | ||||
* | | Merge pull request #1909 from heapo/shadow_sampling_fixes | bunnei | 2018-12-19 | 1 | -16/+14 |
|\ \ | |/ |/| | Fix arrayed texture LOD selection and depth comparison ordering | ||||
| * | Fix arrayed shadow sampler array slice/depth comparison ordering, as well as invalid GLSL LOD selection. | heapo | 2018-12-17 | 1 | -16/+14 |
| | | |||||
* | | Implement postfactor multiplication/division for fmul instructions | heapo | 2018-12-17 | 1 | -4/+20 |
|/ | |||||
* | Merge pull request #1888 from marcosvitali/glFrontFacing | bunnei | 2018-12-11 | 1 | -1/+1 |
|\ | | | | | gl_shader_decompiler: IPA fix FrontFacing. | ||||
| * | gl_shader_decompiler: IPA FrontFacing: the right value when is the front face is 0xFFFFFFFF. | Marcos Vitali | 2018-12-10 | 1 | -1/+1 |
| | | |||||
* | | gl_shader_decompiler: TLDS/TLD4/TLD4S Reworked reflecting the source registers, bugs fixed and modularize. | Marcos Vitali | 2018-12-07 | 1 | -106/+134 |
|/ | |||||
* | gl_shader_decompiler: Implement TEXS.F16 | ReinUsesLisp | 2018-12-05 | 1 | -12/+49 |
| | |||||
* | gl_shader_decompiler: Fixup inverted if | ReinUsesLisp | 2018-12-05 | 1 | -6/+5 |
| | |||||
* | Rewrited TEX/TEXS (TEX Scalar). (#1826) | Marcos | 2018-12-04 | 1 | -259/+177 |
| | | | | | | | | * Rewrited TEX/TEXS (TEX Scalar). * Style fixes. * Styles issues. | ||||
* | Merge pull request #1822 from ReinUsesLisp/glsl-scope | bunnei | 2018-12-03 | 1 | -250/+213 |
|\ | | | | | gl_shader_decompiler: Introduce a scoped object and style changes | ||||
| * | gl_shader_decompiler: Remove texture temporal in TLD4 | ReinUsesLisp | 2018-11-29 | 1 | -3/+1 |
| | | |||||
| * | gl_shader_decompiler: Flip negated if else statement | ReinUsesLisp | 2018-11-29 | 1 | -3/+3 |
| | | |||||
| * | gl_shader_decompiler: Use GLSL scope on instructions unrelated to textures | ReinUsesLisp | 2018-11-29 | 1 | -35/+10 |
| | | |||||
| * | gl_shader_decompiler: Move texture code generation into lambdas | ReinUsesLisp | 2018-11-29 | 1 | -97/+78 |
| | | |||||
| * | gl_shader_decompiler: Clean up texture instructions | ReinUsesLisp | 2018-11-29 | 1 | -87/+56 |
| | | |||||
| * | gl_shader_decompiler: Scope GLSL variables with a scoped object | ReinUsesLisp | 2018-11-29 | 1 | -32/+72 |
| | | |||||
* | | gl_rasterizer: Enable clip distances when set in register and in shader | ReinUsesLisp | 2018-11-29 | 1 | -1/+9 |
|/ | |||||
* | gl_shader_decompiler: Fixup clip distance index | ReinUsesLisp | 2018-11-27 | 1 | -1/+1 |
| | |||||
* | Merge pull request #1713 from FernandoS27/bra-cc | bunnei | 2018-11-27 | 1 | -4/+14 |
|\ | | | | | Implemented BRA CC conditional and FSET CC Setting | ||||
| * | Implemented BRA CC conditional and FSET CC Setting | FernandoS27 | 2018-11-24 | 1 | -4/+14 |
| | | |||||
* | | Merge pull request #1798 from ReinUsesLisp/y-direction | bunnei | 2018-11-27 | 1 | -1/+7 |
|\ \ | | | | | | | gl_shader_decompiler: Implement S2R's Y_DIRECTION | ||||
| * | | gl_shader_decompiler: Implement S2R's Y_DIRECTION | ReinUsesLisp | 2018-11-25 | 1 | -1/+7 |
| |/ | |||||
* | | Merge pull request #1763 from ReinUsesLisp/bfi | bunnei | 2018-11-26 | 1 | -0/+20 |
|\ \ | | | | | | | gl_shader_decompiler: Implement BFI_IMM_R | ||||
| * | | gl_shader_decompiler: Implement BFI_IMM_R | ReinUsesLisp | 2018-11-21 | 1 | -0/+20 |
| | | | |||||
* | | | Merge pull request #1760 from ReinUsesLisp/r2p | bunnei | 2018-11-26 | 1 | -0/+28 |
|\ \ \ | | | | | | | | | gl_shader_decompiler: Implement R2P_IMM | ||||
| * | | | gl_shader_decompiler: Implement R2P_IMM | ReinUsesLisp | 2018-11-21 | 1 | -0/+28 |
| |/ / | |||||
* | | | Merge pull request #1782 from FernandoS27/dc | bunnei | 2018-11-26 | 1 | -116/+188 |
|\ \ \ | | | | | | | | | Fixed Coordinate Encodings in TEX and TEXS instructions | ||||
| * | | | Fix Texture Overlapping | FernandoS27 | 2018-11-24 | 1 | -43/+70 |
| | | | | |||||
| * | | | Fix TEXS Instruction encodings | FernandoS27 | 2018-11-24 | 1 | -22/+48 |
| | | | | |||||
| * | | | Fix one encoding in TEX Instruction | FernandoS27 | 2018-11-24 | 1 | -3/+3 |
| | | | | |||||
| * | | | Corrected inputs indexing in TEX instruction | FernandoS27 | 2018-11-24 | 1 | -66/+85 |
| | | | | |||||
* | | | | Merge pull request #1783 from ReinUsesLisp/clip-distances | bunnei | 2018-11-26 | 1 | -20/+46 |
|\ \ \ \ | |_|_|/ |/| | | | gl_shader_decompiler: Implement clip distances | ||||
| * | | | gl_shader_decompiler: Implement clip distances | ReinUsesLisp | 2018-11-23 | 1 | -20/+46 |
| | | | | |||||
* | | | | Merge pull request #1769 from ReinUsesLisp/cc | bunnei | 2018-11-24 | 1 | -66/+78 |
|\ \ \ \ | |_|/ / |/| | | | gl_shader_decompiler: Rename cc to condition code and name internal flags | ||||
| * | | | gl_shader_decompiler: Add a message for unimplemented cc generation | ReinUsesLisp | 2018-11-22 | 1 | -23/+46 |
| | | | | |||||
| * | | | gl_shader_decompiler: Rename internal flag strings | ReinUsesLisp | 2018-11-22 | 1 | -15/+20 |
| | | | | |||||
| * | | | gl_shader_decompiler: Rename control codes to condition codes | ReinUsesLisp | 2018-11-22 | 1 | -63/+47 |
| |/ / | |||||
* | | | Merge pull request #1744 from degasus/shader_cache | bunnei | 2018-11-24 | 1 | -7/+20 |
|\ \ \ | | | | | | | | | shader_cache: Only lock covered instructions. | ||||
| * | | | shader_cache: Only lock covered instructions. | Markus Wick | 2018-11-20 | 1 | -7/+20 |
| | |/ | |/| | |||||
* | | | Added predicate comparison LessEqualWithNan (#1736) | Hexagon12 | 2018-11-23 | 1 | -5/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | * Added predicate comparison LessEqualWithNan * oops * Clang fix | ||||
* | | | Merge pull request #1756 from ReinUsesLisp/fix-textures | bunnei | 2018-11-23 | 1 | -60/+78 |
|\ \ \ | | | | | | | | | gl_shader_decompiler: Fix register overwriting on texture calls | ||||
| * | | | gl_shader_decompiler: Fix register overwriting on texture calls | ReinUsesLisp | 2018-11-22 | 1 | -60/+78 |
| | |/ | |/| | |||||
* | | | Merge pull request #1766 from FernandoS27/fix-txq | bunnei | 2018-11-23 | 1 | -2/+12 |
|\ \ \ | |/ / |/| | | Properly Implemented TXQ Instruction | ||||
| * | | Properly Implemented TXQ Instruction | FernandoS27 | 2018-11-21 | 1 | -2/+12 |
| |/ | |||||
* | | Merge pull request #1752 from ReinUsesLisp/unimpl-decompiler | bunnei | 2018-11-21 | 1 | -371/+258 |
|\ \ | | | | | | | gl_shader_decompiler: Use UNIMPLEMENTED when applicable | ||||
| * | | gl_shader_decompiler: Use UNIMPLEMENTED instead of LOG+UNREACHABLE when applicable | ReinUsesLisp | 2018-11-21 | 1 | -371/+258 |
| |/ | |||||
* / | gl_shader_decompiler: Remove UNREACHABLE when setting RZ | ReinUsesLisp | 2018-11-21 | 1 | -2/+1 |
|/ | |||||
* | Merge pull request #1669 from ReinUsesLisp/fixup-gs | bunnei | 2018-11-11 | 1 | -5/+9 |
|\ | | | | | gl_shader_decompiler: Guard out of bound geometry shader input reads | ||||
| * | gl_shader_decompiler: Guard out of bound geometry shader input reads | ReinUsesLisp | 2018-11-10 | 1 | -5/+9 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | Geometry shaders follow a pattern that results in out of bound reads. This pattern is: - VSETP to predicate - Use that predicate to conditionally set a register a big number - Use the register to access geometry shaders At the time of writing this commit I don't know what's the intent of this number. Some drivers argue about these out of bound reads. To avoid this issue, input reads are guarded limiting reads to the highest posible vertex input of the current topology (e.g. points to 1 and triangles to 3). | ||||
* | | Correct issue where texturelod could not be applied to 2darrayshadow | FernandoS27 | 2018-11-08 | 1 | -1/+5 |
| | | |||||
* | | Implement 3 coordinate array in TEXS instruction | FernandoS27 | 2018-11-07 | 1 | -6/+6 |
|/ | |||||
* | Merge pull request #1527 from FernandoS27/assert-flow | bunnei | 2018-11-01 | 1 | -2/+26 |
|\ | | | | | Assert Control Flow Instructions using Control Codes | ||||
| * | Assert Control Flow Instructions using Control Codes | FernandoS27 | 2018-10-29 | 1 | -2/+26 |
| | | |||||
* | | Merge pull request #1528 from FernandoS27/assert-control-codes | bunnei | 2018-11-01 | 1 | -0/+98 |
|\ \ | | | | | | | Assert Control Codes Generation on Shader Instructions | ||||
| * | | Assert Control Codes Generation | FernandoS27 | 2018-10-30 | 1 | -0/+98 |
| |/ | |||||
* / | global: Use std::optional instead of boost::optional (#1578) | Frederic L | 2018-10-30 | 1 | -53/+59 |
|/ | | | | | | | | | | | | | | | | * get rid of boost::optional * Remove optional references * Use std::reference_wrapper for optional references * Fix clang format * Fix clang format part 2 * Adressed feedback * Fix clang format and MacOS build | ||||
* | Refactor precise usage and add FMNMX, MUFU, FMUL32 and FADD332 | FernandoS27 | 2018-10-28 | 1 | -68/+34 |
| | |||||
* | Improved Shader accuracy on Vertex and Geometry Shaders with FFMA, FMUL and FADD | FernandoS27 | 2018-10-28 | 1 | -3/+52 |
| | |||||
* | Implemented LD_L and ST_L | FernandoS27 | 2018-10-24 | 1 | -12/+76 |
| | |||||
* | Implement Shader Local Memory | FernandoS27 | 2018-10-24 | 1 | -0/+37 |
| | |||||
* | Implement PointSize | FernandoS27 | 2018-10-23 | 1 | -2/+27 |
| | |||||
* | Merge pull request #1519 from ReinUsesLisp/vsetp | bunnei | 2018-10-23 | 1 | -72/+93 |
|\ | | | | | gl_shader_decompiler: Implement VSETP | ||||
| * | gl_shader_decompiler: Implement VSETP | ReinUsesLisp | 2018-10-23 | 1 | -0/+24 |
| | | |||||
| * | gl_shader_decompiler: Abstract VMAD into a video subset | ReinUsesLisp | 2018-10-23 | 1 | -72/+69 |
| | | |||||
* | | Merge pull request #1470 from FernandoS27/alpha_testing | bunnei | 2018-10-23 | 1 | -2/+22 |
|\ \ | | | | | | | Implemented Alpha Test using Shader Emulation | ||||
| * | | Assert that multiple render targets are not set while alpha testing | FernandoS27 | 2018-10-22 | 1 | -3/+2 |
| | | | |||||
| * | | Use standard UBO and fix/stylize the code | FernandoS27 | 2018-10-22 | 1 | -41/+5 |
| | | | |||||
| * | | Remove SyncAlphaTest and clang format | FernandoS27 | 2018-10-22 | 1 | -2/+3 |
| | | | |||||
| * | | Added Alpha Func | FernandoS27 | 2018-10-22 | 1 | -2/+34 |
| | | | |||||
| * | | Implemented Alpha Testing | FernandoS27 | 2018-10-22 | 1 | -2/+26 |
| | | | |||||
* | | | Merge pull request #1512 from ReinUsesLisp/brk | bunnei | 2018-10-23 | 1 | -19/+36 |
|\ \ \ | |_|/ |/| | | gl_shader_decompiler: Implement PBK and BRK | ||||
| * | | gl_shader_decompiler: Implement PBK and BRK | ReinUsesLisp | 2018-10-18 | 1 | -19/+36 |
| | | | |||||
* | | | Merge pull request #1550 from FernandoS27/fmul32 | bunnei | 2018-10-23 | 1 | -3/+4 |
|\ \ \ | | | | | | | | | Added Saturation to FMUL32I | ||||
| * | | | Added Saturation to FMUL32I | FernandoS27 | 2018-10-23 | 1 | -3/+4 |
| | |/ | |/| | |||||
* | | | Merge pull request #1537 from lioncash/shader | bunnei | 2018-10-23 | 1 | -6/+7 |
|\ \ \ | |/ / |/| | | gl_shader_decompiler: Minor changes | ||||
| * | | gl_shader_decompiler: Allow std::move to function in SetPredicate | Lioncash | 2018-10-20 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | If the variable being moved is const, then std::move will always perform a copy (since it can't actually move the data). | ||||
| * | | gl_shader_decompiler: Get rid of variable shadowing warnings | Lioncash | 2018-10-20 | 1 | -2/+2 |
| | | | | | | | | | | | | A variable with the same name was previously declared in an outer scope. | ||||
| * | | gl_shader_decompiler: Fix a few comment typos | Lioncash | 2018-10-20 | 1 | -3/+4 |
| | | | |||||
* | | | Fixed FSETP and FSET | FernandoS27 | 2018-10-22 | 1 | -28/+12 |
|/ / | |||||
* | | gl_shader_decompiler: Move position varying declaration back to gl_shader_gen | ReinUsesLisp | 2018-10-20 | 1 | -13/+0 |
| | | | | | | | | | | | | | | The intention of declaring them in gl_shader_decompiler was to be able to use blocks to implement geometry shaders. But that wasn't needed in the end and it caused issues when both vertex stages were being used, resulting in a redeclaration of "position". | ||||
* | | Merge pull request #1501 from ReinUsesLisp/half-float | bunnei | 2018-10-20 | 1 | -0/+313 |
|\ \ | | | | | | | gl_shader_decompiler: Implement H* instructions | ||||
| * | | gl_shader_decompiler: Implement HSET2_R | ReinUsesLisp | 2018-10-15 | 1 | -0/+44 |
| | | | |||||
| * | | gl_shader_decompiler: Implement HSETP2_R | ReinUsesLisp | 2018-10-15 | 1 | -0/+45 |
| | | | |||||
| * | | gl_shader_decompiler: Implement HFMA2 instructions | ReinUsesLisp | 2018-10-15 | 1 | -0/+53 |
| | | | |||||
| * | | gl_shader_decompiler: Implement HADD2_IMM and HMUL2_IMM | ReinUsesLisp | 2018-10-15 | 1 | -0/+43 |
| | | | |||||
| * | | gl_shader_decompiler: Implement non-immediate HADD2 and HMUL2 instructions | ReinUsesLisp | 2018-10-15 | 1 | -0/+50 |
| | | | |||||
| * | | gl_shader_decompiler: Setup base for half float unpacking and setting | ReinUsesLisp | 2018-10-15 | 1 | -0/+78 |
| | | | |||||
* | | | Merge pull request #1505 from FernandoS27/tex-3d | bunnei | 2018-10-18 | 1 | -0/+1 |
|\ \ \ | | | | | | | | | Implemented 3D Textures | ||||
| * | | | Implement 3D Textures | FernandoS27 | 2018-10-18 | 1 | -0/+1 |
| | | | | |||||
* | | | | Merge pull request #1489 from FernandoS27/fix-tlds | bunnei | 2018-10-18 | 1 | -1/+5 |
|\ \ \ \ | |/ / / |/| | | | shader_decompiler: Fix TLDS | ||||
| * | | | Fix TLDS | FernandoS27 | 2018-10-14 | 1 | -1/+5 |
| |/ / | |||||
* | | | Merge pull request #1496 from FernandoS27/tex-array | bunnei | 2018-10-18 | 1 | -14/+55 |
|\ \ \ | |_|/ |/| | | Implement Arrays on Tex Instruction | ||||
| * | | Implement Arrays on Tex Instruction | FernandoS27 | 2018-10-14 | 1 | -14/+55 |
| |/ | |||||
* / | gl_shader_decompiler: Fixup style inconsistencies | ReinUsesLisp | 2018-10-15 | 1 | -5/+3 |
|/ | |||||
* | gl_shader_decompiler: Implement VMAD | ReinUsesLisp | 2018-10-11 | 1 | -0/+82 |
| | |||||
* | Merge pull request #1425 from ReinUsesLisp/geometry-shaders | bunnei | 2018-10-10 | 1 | -60/+236 |
|\ | | | | | gl_shader_decompiler: Implement geometry shaders | ||||
| * | gl_shader_decompiler: Move position varying location from 15 to 0 and apply an offset | ReinUsesLisp | 2018-10-07 | 1 | -6/+10 |
| | | |||||
| * | gl_shader_decompiler: Implement geometry shaders | ReinUsesLisp | 2018-10-07 | 1 | -57/+229 |
| | | |||||
* | | gl_shader_decompiler: Remove unused variables in TMML's implementation | Lioncash | 2018-10-09 | 1 | -7/+3 |
|/ | | | | | Given "y" isn't always used, but "x" is, we can rearrange this to avoid unused variable warnings by changing the names of op_a and op_b | ||||
* | Implemented Depth Compare and Shadow Samplers | FernandoS27 | 2018-10-06 | 1 | -61/+156 |
| | |||||
* | Implemented Texture Processing Modes in TEXS and TLDS | FernandoS27 | 2018-10-03 | 1 | -5/+42 |
| | |||||
* | Merge pull request #1330 from raven02/tlds | bunnei | 2018-10-01 | 1 | -7/+15 |
|\ | | | | | TLDS: Add 1D sampler | ||||
| * | Fix trailing whitespace | raven02 | 2018-09-30 | 1 | -1/+4 |
| | | |||||
| * | Merge branch 'master' into tlds | raven02 | 2018-09-19 | 1 | -67/+156 |
| |\ | |||||
| * | | Add 1D sampler for TLDS - TexelFetch (Mario Rabbids) | raven02 | 2018-09-17 | 1 | -7/+12 |
| | | | |||||
* | | | gl_shader_decompiler: TEXS: Implement TextureType::TextureCube. | bunnei | 2018-09-30 | 1 | -0/+8 |
| |/ |/| | |||||
* | | Merge pull request #1342 from lioncash/trunc | bunnei | 2018-09-19 | 1 | -4/+4 |
|\ \ | | | | | | | gl_shader_decompiler: Avoid truncation warnings within LD_A and ST_A code | ||||
| * | | gl_shader_decompiler: Avoid truncation warnings within LD_A and ST_A code | Lioncash | 2018-09-18 | 1 | -4/+4 |
| | | | | | | | | | | | | | | | | | | These are internally stored as u64 values, so using u32 here causes truncation warnings. Instead, we can just use u64 and preserve the bit width. | ||||
* | | | Merge pull request #1279 from FernandoS27/csetp | bunnei | 2018-09-19 | 1 | -21/+86 |
|\ \ \ | | | | | | | | | shader_decompiler: Implemented (Partialy) Control Codes and CSETP | ||||
| * | | | Implemented Internal Flags | FernandoS27 | 2018-09-18 | 1 | -13/+35 |
| | | | | |||||
| * | | | Implemented I2I.CC on the NEU control code, used by SMO | FernandoS27 | 2018-09-17 | 1 | -13/+17 |
| | | | | |||||
| * | | | Implemented CSETP | FernandoS27 | 2018-09-17 | 1 | -14/+38 |
| | | | | |||||
| * | | | Implemented Control Codes | FernandoS27 | 2018-09-17 | 1 | -0/+15 |
| |/ / | |||||
* | | | Merge pull request #1299 from FernandoS27/texture-sanatize | bunnei | 2018-09-19 | 1 | -2/+45 |
|\ \ \ | | | | | | | | | shader_decompiler: Asserts for Texture Instructions | ||||
| * | | | Added asserts for texture misc modes to texture instructions | FernandoS27 | 2018-09-17 | 1 | -2/+45 |
| |/ / | |||||
* | | | Merge pull request #1290 from FernandoS27/shader-header | bunnei | 2018-09-18 | 1 | -24/+7 |
|\ \ \ | |/ / |/| | | Implemented (Partialy) Shader Header | ||||
| * | | Replace old FragmentHeader for the new Header | FernandoS27 | 2018-09-11 | 1 | -22/+3 |
| | | | |||||
| * | | Implemented (Partialy) Shader Header | FernandoS27 | 2018-09-11 | 1 | -2/+4 |
| | | | |||||
* | | | Merge pull request #1316 from lioncash/shadow | bunnei | 2018-09-17 | 1 | -2/+0 |
|\ \ \ | | | | | | | | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructions | ||||
| * | | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructions | Lioncash | 2018-09-14 | 1 | -2/+0 |
| | | | | | | | | | | | | | | | | These variables are already defined within an outer scope. | ||||
* | | | | Merge pull request #1326 from FearlessTobi/port-4182 | bunnei | 2018-09-17 | 1 | -14/+14 |
|\ \ \ \ | |_|_|/ |/| | | | Port #4182 from Citra: "Prefix all size_t with std::" | ||||
| * | | | Port #4182 from Citra: "Prefix all size_t with std::" | fearlessTobi | 2018-09-15 | 1 | -14/+14 |
| |/ / | |||||
* / / | Shaders: Implemented multiple-word loads and stores to and from attribute memory. | Subv | 2018-09-15 | 1 | -6/+49 |
|/ / | | | | | | | This seems to be an optimization performed by nouveau. | ||||
* | | Merge pull request #1263 from FernandoS27/tex-mode | bunnei | 2018-09-12 | 1 | -1/+33 |
|\ \ | | | | | | | shader_decompiler: Implemented (Partially) Texture Processing Modes | ||||
| * | | Implemented Texture Processing Modes | FernandoS27 | 2018-09-12 | 1 | -1/+33 |
| |/ | |||||
* / | Implemented LEA and PSET | FernandoS27 | 2018-09-11 | 1 | -0/+91 |
|/ | |||||
* | Fixed renderdoc input/output textures not working due to render targets | David Marcec | 2018-09-11 | 1 | -1/+1 |
| | |||||
* | Merge pull request #1268 from FernandoS27/tmml | bunnei | 2018-09-10 | 1 | -0/+48 |
|\ | | | | | shader_decompiler: Implemented TMML | ||||
| * | Implemented TMML | FernandoS27 | 2018-09-10 | 1 | -0/+48 |
| | | |||||
* | | Merge pull request #1280 from zero334/improvements | bunnei | 2018-09-10 | 1 | -73/+82 |
|\ \ | |/ |/| | video_core: fixed arithmetic overflow warnings & improved code style | ||||
| * | video_core: fixed arithmetic overflow warnings & improved code style | Patrick Elsässer | 2018-09-09 | 1 | -73/+82 |
| | | | | | | | | | | | | | | | | - Fixed all warnings, for renderer_opengl items, which were indicating a possible incorrect behavior from integral promotion rules and types larger than those in which arithmetic is typically performed. - Added const for variables where possible and meaningful. - Added constexpr where possible. | ||||
* | | Implemented TXQ dimension query type, used by SMO. | FernandoS27 | 2018-09-09 | 1 | -0/+20 |
|/ | |||||
* | gl_shader_decompiler: Partially implement several non-2D texture types (Subv). | bunnei | 2018-09-08 | 1 | -26/+99 |
| | |||||
* | gl_shader_decompiler: Implement saturate mode for IPA. | bunnei | 2018-09-06 | 1 | -1/+5 |
| | |||||
* | Implemented IPA Properly | FernandoS27 | 2018-09-06 | 1 | -47/+86 |
| | |||||
* | gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations() | Lioncash | 2018-09-02 | 1 | -1/+1 |
| | | | | | Using the getter function intended for external code here makes an unnecessary copy of the already-accessible used_shaders vector. | ||||
* | Merge pull request #1215 from ogniK5377/texs-nodep-assert | bunnei | 2018-09-02 | 1 | -0/+2 |
|\ | | | | | Added assert for TEXS nodep | ||||
| * | Added assert for TEXS nodep | David Marcec | 2018-09-01 | 1 | -0/+2 |
| | | |||||
* | | Merge pull request #1214 from ogniK5377/ipa-assert | bunnei | 2018-09-02 | 1 | -4/+8 |
|\ \ | | | | | | | Added better asserts to IPA, Renamed IPA modes to match mesa | ||||
| * | | Added better asserts to IPA, Renamed IPA modes to match mesa | David Marcec | 2018-09-01 | 1 | -4/+8 |
| |/ | | | | | | | | | | | | | | | | | | | IpaMode is changed to IpaInterpMode IpaMode is suppose to be 2 bits not 3 Added IpaSampleMode Added Saturate Renamed modes based on https://github.com/mesa3d/mesa/blob/d27c7918916cdc8092959124955f887592e37d72/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gm107.cpp#L2530 | ||||
* | | Merge pull request #1216 from ogniK5377/ffma-assert | bunnei | 2018-09-02 | 1 | -0/+6 |
|\ \ | | | | | | | Added FFMA asserts and missing fields | ||||
| * | | Removed saturate assert | David Marcec | 2018-09-01 | 1 | -1/+0 |
| | | | | | | | | | | | | Saturate already implemented | ||||
| * | | Changed tab5980_0 default from 0 -> 1 | David Marcec | 2018-09-01 | 1 | -2/+2 |
| | | | |||||
| * | | Added FFMA asserts | David Marcec | 2018-09-01 | 1 | -0/+7 |
| |/ | |||||
* | | Removed saturate assert | David Marcec | 2018-09-01 | 1 | -1/+0 |
| | | | | | | | | Unneeded as we already implement it | ||||
* | | Added FMUL asserts | David Marcec | 2018-09-01 | 1 | -0/+10 |
|/ | |||||
* | Added predicate comparison GreaterEqualWithNan | Hexagon12 | 2018-08-31 | 1 | -3/+3 |
| | |||||
* | gl_shader_decompiler: Implement POPC (#1203) | Laku | 2018-08-31 | 1 | -0/+9 |
| | | | | | | * Implement POPC * implement invert | ||||
* | Merge pull request #1200 from bunnei/improve-ipa | bunnei | 2018-08-30 | 1 | -1/+33 |
|\ | | | | | gl_shader_decompiler: Improve IPA for Pass mode with Position attribute. | ||||
| * | gl_shader_decompiler: Improve IPA for Pass mode with Position attribute. | bunnei | 2018-08-29 | 1 | -1/+33 |
| | | |||||
* | | Shaders: Implemented IADD3 | tech4me | 2018-08-29 | 1 | -0/+61 |
|/ | |||||
* | Merge pull request #1156 from Lakumakkara/lop3 | bunnei | 2018-08-23 | 1 | -0/+41 |
|\ | | | | | gl_shader_decompiler: Implement LOP3 | ||||
| * | more fixes | Laku | 2018-08-22 | 1 | -6/+7 |
| | | |||||
| * | fixes | Laku | 2018-08-22 | 1 | -6/+12 |
| | | |||||
| * | remove debug logging | Laku | 2018-08-22 | 1 | -2/+0 |
| | | |||||
| * | implement lop3 | Laku | 2018-08-22 | 1 | -0/+36 |
| | | |||||
* | | renderer_opengl: Namespace OpenGL code | Lioncash | 2018-08-22 | 1 | -2/+2 |
|/ | | | | | | | Namespaces all OpenGL code under the OpenGL namespace. Prevents polluting the global namespace and allows clear distinction between other renderers' code in the future. | ||||
* | Revert "Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions." | bunnei | 2018-08-22 | 1 | -109/+25 |
| | | | | | - This reverts commit 3ef4b3d4b445960576f10d1ba6521580d03e3da8. - This commit had broken a lot of games. We really should do a full implementation of this in one change. | ||||
* | Shaders: Implement depth writing in fragment shaders. | Subv | 2018-08-21 | 1 | -1/+6 |
| | | | | We'll write <last color output reg + 2> to gl_FragDepth. | ||||
* | Merge pull request #1131 from bunnei/impl-tex3d-texcube | bunnei | 2018-08-21 | 1 | -0/+15 |
|\ | | | | | gl_shader_decompiler: Implement TextureCube/Texture3D for TEX/TEXS. | ||||
| * | gl_shader_decompiler: Implement Texture3D for TEXS. | bunnei | 2018-08-21 | 1 | -0/+7 |
| | | |||||
| * | gl_shader_decompiler: Implement TextureCube for TEX. | bunnei | 2018-08-21 | 1 | -0/+8 |
| | | |||||
* | | Merge pull request #1106 from Subv/multiple_rendertargets | bunnei | 2018-08-21 | 1 | -5/+44 |
|\ \ | |/ |/| | Shaders: Write all the enabled color outputs when a fragment shader exits. | ||||
| * | Shaders: Write all the enabled color outputs when a fragment shader exits. | Subv | 2018-08-21 | 1 | -5/+44 |
| | | | | | | | | | | | | | | We were only writing to the first render target before. Note that this is only the GLSL side of the implementation, supporting multiple render targets requires more changes in the OpenGL renderer. Dual Source blending is not implemented and stuff that uses it might not work at all. | ||||
* | | Shaders: Fixed the coords in TEX with Texture2D. | Subv | 2018-08-21 | 1 | -1/+1 |
| | | | | | | | | | | | | The X and Y coordinates should be in gpr8 and gpr8+1, respectively. This fixes the cutscene rendering in Sonic Mania. | ||||
* | | Shaders: Log and crash when using an unimplemented texture type in a texture sampling instruction. | Subv | 2018-08-21 | 1 | -5/+14 |
| | | |||||
* | | Merge pull request #1115 from Subv/texs_mask | bunnei | 2018-08-20 | 1 | -18/+18 |
|\ \ | | | | | | | Shaders/TEXS: Write to the correct output register when swizzling. | ||||
| * | | Shaders/TEXS: Fixed the component mask in the TEXS instruction. | Subv | 2018-08-20 | 1 | -18/+18 |
| | | | | | | | | | | | | Previously we could end up with a TEXS that didn't write any outputs, this was wrong. | ||||
* | | | Merge pull request #1112 from Subv/sampler_types | bunnei | 2018-08-20 | 1 | -23/+134 |
|\ \ \ | |/ / |/| | | Shaders: Use the correct shader type when sampling textures. | ||||
| * | | Shader: Implemented the TLD4 and TLD4S opcodes using GLSL's textureGather. | Subv | 2018-08-19 | 1 | -0/+51 |
| | | | | | | | | | | | | It is unknown how TLD4S determines the sampler type, more research is needed. | ||||
| * | | Shader: Use the right sampler type in the TEX, TEXS and TLDS instructions. | Subv | 2018-08-19 | 1 | -23/+83 |
| | | | | | | | | | | | | Different sampler types have their parameters in different registers. | ||||
* | | | Merge pull request #1089 from Subv/neg_bits | bunnei | 2018-08-19 | 1 | -16/+34 |
|\ \ \ | | | | | | | | | Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions. | ||||
| * | | | Shaders: Corrected the 'abs' and 'neg' bit usage in the float arithmetic instructions. | Subv | 2018-08-18 | 1 | -16/+34 |
| | | | | | | | | | | | | | | | | We should definitely audit our shader generator for more errors like this. | ||||
* | | | | Merge pull request #1105 from Subv/convert_neg | bunnei | 2018-08-19 | 1 | -2/+0 |
|\ \ \ \ | | | | | | | | | | | Shader: Remove an unneeded assert, the negate bit is implemented for conversion instructions. | ||||
| * | | | | Shader: Remove an unneeded assert, the negate bit is implemented for conversion instructions. | Subv | 2018-08-18 | 1 | -2/+0 |
| | |_|/ | |/| | | |||||
* | | | | Merge pull request #1101 from Subv/ssy_stack | bunnei | 2018-08-19 | 1 | -3/+36 |
|\ \ \ \ | |_|_|/ |/| | | | Shaders: Implemented a stack for the SSY/SYNC instructions. | ||||
| * | | | Shaders: Implemented a stack for the SSY/SYNC instructions. | Subv | 2018-08-18 | 1 | -3/+36 |
| |/ / | | | | | | | | | | The SSY instruction pushes an address into the stack, and the SYNC instruction pops it. The current stack depth is 20, we should figure out if this is enough or not. | ||||
* | | | Merge pull request #1108 from Subv/front_facing | bunnei | 2018-08-19 | 1 | -0/+4 |
|\ \ \ | | | | | | | | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63). | ||||
| * | | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63). | Subv | 2018-08-19 | 1 | -0/+4 |
| |/ / | |||||
* / / | Shader: Implemented the predicate and mode arguments of LOP. | Subv | 2018-08-18 | 1 | -10/+33 |
|/ / | | | | | | | | | | | The mode can be used to set the predicate to true depending on the result of the logic operation. In some cases, this means discarding the result (writing it to register 0xFF (Zero)). This is used by Super Mario Odyssey. | ||||
* | | Added predcondition GreaterThanWithNan | David Marcec | 2018-08-18 | 1 | -5/+7 |
| | | |||||
* | | Merge pull request #1019 from Subv/vertex_divisor | bunnei | 2018-08-17 | 1 | -1/+1 |
|\ \ | |/ |/| | Rasterizer: Manually implemented instanced rendering. | ||||
| * | Rasterizer: Implemented instanced rendering. | Subv | 2018-08-15 | 1 | -1/+1 |
| | | | | | | | | | | | | We keep track of the current instance and update an uniform in the shaders to let them know which instance they are. Instanced vertex arrays are not yet implemented. | ||||
* | | Shader/Conversion: Implemented the negate bit in F2F and I2I instructions. | Subv | 2018-08-15 | 1 | -4/+12 |
| | | |||||
* | | Shader/I2F: Implemented the negate I2F_C instruction variant. | Subv | 2018-08-15 | 1 | -7/+23 |
| | | |||||
* | | Shader/F2I: Implemented the negate bit in the I2F instruction | Subv | 2018-08-15 | 1 | -0/+4 |
| | | |||||
* | | Shader/F2I: Implemented the F2I_C instruction variant. | Subv | 2018-08-15 | 1 | -2/+10 |
| | | |||||
* | | Shader/F2I: Implemented the negate bit in the F2I instruction. | Subv | 2018-08-15 | 1 | -0/+4 |
|/ | |||||
* | gl_shader_decompiler: Several fixes for indirect constant buffer loads. | bunnei | 2018-08-15 | 1 | -13/+22 |
| | |||||
* | gl_shader_decompiler: Implement XMAD instruction. | bunnei | 2018-08-13 | 1 | -0/+95 |
| | |||||
* | gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check. | bunnei | 2018-08-12 | 1 | -2/+2 |
| | |||||
* | gl_shader_decompiler: Fix GLSL compiler error with KIL instruction. | bunnei | 2018-08-12 | 1 | -0/+8 |
| | |||||
* | Merge pull request #1010 from bunnei/unk-vert-attrib-shader | bunnei | 2018-08-12 | 1 | -8/+10 |
|\ | | | | | gl_shader_decompiler: Improve handling of unknown input/output attributes. | ||||
| * | gl_shader_decompiler: Improve handling of unknown input/output attributes. | bunnei | 2018-08-12 | 1 | -8/+10 |
| | | |||||
* | | GPU/Shader: Don't predicate instructions that don't have a predicate field (SSY). | Subv | 2018-08-11 | 1 | -2/+6 |
| | | |||||
* | | GPU/Shaders: Implemented SSY and SYNC as a way to modify control flow during shader execution. | Subv | 2018-08-11 | 1 | -6/+25 |
|/ | | | | SSY sets the target label to jump to when the SYNC instruction is executed. | ||||
* | gl_shader_decompiler: Reserve element memory beforehand in BuildRegisterList() | Lioncash | 2018-08-09 | 1 | -0/+2 |
| | | | | | Avoids potentially perfoming multiple reallocations when we know the total amount of memory we need beforehand. | ||||
* | gl_shader_decompiler: Declare predicates on use. | bunnei | 2018-08-09 | 1 | -4/+5 |
| | | | | - Used by Super Mario Odyssey (when going in game). | ||||
* | Merge pull request #982 from bunnei/stub-unk-63 | bunnei | 2018-08-09 | 1 | -0/+7 |
|\ | | | | | gl_shader_decompiler: Stub input attribute Unknown_63. | ||||
| * | gl_shader_decompiler: Stub input attribute Unknown_63. | bunnei | 2018-08-08 | 1 | -0/+7 |
| | | |||||
* | | gl_shader_decompiler: Let OpenGL interpret floats. | bunnei | 2018-08-08 | 1 | -2/+2 |
|/ | | | | | - Accuracy is lost in translation to string, e.g. with NaN. - Needed for Super Mario Odyssey. | ||||
* | gl_shader_decompiler: Fix TEXS mask and dest. | bunnei | 2018-08-05 | 1 | -2/+5 |
| | |||||
* | gl_shader_decompiler: Remove unused variable in GenerateDeclarations() | Lioncash | 2018-08-03 | 1 | -2/+0 |
| | | | | | This variable was being incremented, but we were never actually using it. | ||||
* | Merge pull request #792 from lioncash/retval | bunnei | 2018-07-24 | 1 | -2/+2 |
|\ | | | | | gl_shader_decompiler: Correct return value of WriteTexsInstruction() | ||||
| * | gl_shader_decompiler: Correct return value of WriteTexsInstruction() | Lioncash | 2018-07-24 | 1 | -2/+2 |
| | | | | | | | | This should be returning void, not a std::string | ||||
* | | Merge pull request #790 from bunnei/shader-print-instr | bunnei | 2018-07-24 | 1 | -1/+2 |
|\ \ | | | | | | | gl_shader_decompiler: Print instruction value in shader comments. | ||||
| * | | gl_shader_decompiler: Print instruction value in shader comments. | bunnei | 2018-07-24 | 1 | -1/+2 |
| | | | |||||
* | | | Merge pull request #788 from bunnei/shader-check-zero | bunnei | 2018-07-24 | 1 | -0/+6 |
|\ \ \ | |_|/ |/| | | gl_shader_decompiler: Check if SetRegister result is ZeroIndex. | ||||
| * | | gl_shader_decompiler: Check if SetRegister result is ZeroIndex. | bunnei | 2018-07-24 | 1 | -0/+6 |
| |/ | |||||
* | | gl_shader_decompiler: Implement shader instruction TLDS. | bunnei | 2018-07-24 | 1 | -29/+43 |
| | | |||||
* | | gl_shader_decompiler: Simplify GetCommonDeclarations() | Lioncash | 2018-07-23 | 1 | -5/+5 |
|/ | |||||
* | gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine() | Lioncash | 2018-07-22 | 1 | -4/+8 |
| | | | | | | We don't need to toss away the Subroutine instance after the find() call and reconstruct another instance with the same data right after it. Particularly give Subroutine contains a std::set. | ||||
* | Merge pull request #767 from bunnei/shader-cleanup | bunnei | 2018-07-22 | 1 | -78/+15 |
|\ | | | | | gl_shader_decompiler: Remove unused state tracking and minor cleanup. | ||||
| * | gl_shader_decompiler: Remove unused state tracking and minor cleanup. | bunnei | 2018-07-22 | 1 | -78/+15 |
| | | |||||
* | | gl_shader_decompiler: Implement SEL instruction. | bunnei | 2018-07-22 | 1 | -0/+9 |
|/ | |||||
* | video_core: Use nested namespaces where applicable | Lioncash | 2018-07-21 | 1 | -4/+2 |
| | | | | Compresses a few namespace specifiers to be more compact. | ||||
* | Merge pull request #731 from lioncash/shadow | bunnei | 2018-07-20 | 1 | -6/+4 |
|\ | | | | | gl_shader_decompiler: Eliminate variable and declaration shadowing | ||||
| * | gl_shader_decompiler: Eliminate variable and declaration shadowing | Lioncash | 2018-07-20 | 1 | -6/+4 |
| | | | | | | | | | | Ensures that no identifiers are being hidden, which also reduces compiler warnings. | ||||
* | | gl_shader_decompiler: Remove unnecessary const from return values | Lioncash | 2018-07-20 | 1 | -2/+2 |
|/ | | | | | This adds nothing from a behavioral point of view, and can inhibit the move constructor/RVO | ||||
* | gl_shader_gen: Implement dual vertex shader mode. | bunnei | 2018-07-13 | 1 | -32/+39 |
| | | | | - When VertexA shader stage is enabled, we combine with VertexB program to make a single Vertex Shader stage. | ||||
* | Merge pull request #655 from bunnei/pred-lt-nan | bunnei | 2018-07-13 | 1 | -5/+6 |
|\ | | | | | gl_shader_decompiler: Implement PredCondition::LessThanWithNan. | ||||
| * | gl_shader_decompiler: Implement PredCondition::LessThanWithNan. | bunnei | 2018-07-13 | 1 | -5/+6 |
| | | |||||
* | | gl_shader_decompiler: Use FlowCondition field in EXIT instruction. | bunnei | 2018-07-13 | 1 | -8/+25 |
|/ | |||||
* | Merge pull request #652 from Subv/fadd32i | Sebastian Valle | 2018-07-13 | 1 | -0/+23 |
|\ | | | | | GPU: Implement the FADD32I shader instruction. | ||||
| * | GPU: Implement the FADD32I shader instruction. | Subv | 2018-07-12 | 1 | -0/+23 |
| | | |||||
* | | Merge pull request #625 from Subv/imnmx | bunnei | 2018-07-08 | 1 | -0/+14 |
|\ \ | |/ |/| | GPU: Implemented the IMNMX shader instruction. | ||||
| * | GPU: Implemented the IMNMX shader instruction. | Subv | 2018-07-04 | 1 | -0/+14 |
| | | | | | | | | It's similar to the FMNMX instruction but it works on integers. | ||||
* | | Merge pull request #626 from Subv/shader_sync | bunnei | 2018-07-05 | 1 | -0/+7 |
|\ \ | | | | | | | GPU: Stub the shader SYNC and DEPBAR instructions. | ||||
| * | | GPU: Stub the shader SYNC and DEPBAR instructions. | Subv | 2018-07-04 | 1 | -0/+7 |
| |/ | | | | | | | It is unknown at this moment if we actually need to do something with these instructions or if the GLSL compiler takes care of that for us. | ||||
* | | Merge pull request #624 from Subv/f2f_round | bunnei | 2018-07-05 | 1 | -0/+3 |
|\ \ | | | | | | | GPU: Implemented the F2F 'round' rounding mode. | ||||
| * | | GPU: Implemented the F2F 'round' rounding mode. | Subv | 2018-07-04 | 1 | -0/+3 |
| |/ | | | | | | | It's implemented via the GLSL 'roundEven()' function. | ||||
* / | GPU: Implemented the PSETP shader instruction. | Subv | 2018-07-04 | 1 | -0/+30 |
|/ | | | | It's similar to the isetp and fsetp instructions but it works on predicates instead. | ||||
* | Merge pull request #607 from jroweboy/logging | bunnei | 2018-07-03 | 1 | -26/+26 |
|\ | | | | | Logging - Customizable backends | ||||
| * | Update clang format | James Rowe | 2018-07-03 | 1 | -6/+6 |
| | | |||||
| * | Rename logging macro back to LOG_* | James Rowe | 2018-07-03 | 1 | -20/+20 |
| | | |||||
* | | GPU: Implemented MUFU suboperation 8, sqrt. | Subv | 2018-07-03 | 1 | -0/+4 |
|/ | |||||
* | Merge pull request #602 from Subv/mufu_subop | bunnei | 2018-07-01 | 1 | -4/+0 |
|\ | | | | | GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation. | ||||
| * | GPU: Corrected the size of the MUFU subop field, and removed incorrect "min" operation. | Subv | 2018-06-30 | 1 | -4/+0 |
| | | |||||
* | | gl_shader_decompiler: Implement predicate NotEqualWithNan. | bunnei | 2018-06-30 | 1 | -17/+23 |
|/ | |||||
* | gl_shader_decompiler: Add a return path for unknown instructions. | bunnei | 2018-06-27 | 1 | -0/+1 |
| | |||||
* | Merge pull request #554 from Subv/constbuffer_ubo | bunnei | 2018-06-26 | 1 | -6/+16 |
|\ | | | | | Rasterizer: Use UBOs instead of SSBOs for uploading const buffers. | ||||
| * | Rasterizer: Use UBOs instead of SSBOs for uploading const buffers. | Subv | 2018-06-10 | 1 | -6/+16 |
| | | | | | | | | This should help a bit with GPU performance once we're GPU-bound. | ||||
* | | Build: Fixed some MSVC warnings in various parts of the code. | Subv | 2018-06-20 | 1 | -1/+1 |
| | | |||||
* | | Merge pull request #574 from Subv/shader_abs_neg | bunnei | 2018-06-19 | 1 | -7/+14 |
|\ \ | | | | | | | GPU: Perform negation after absolute value in the float shader instructions. | ||||
| * | | GPU: Perform negation after absolute value in the float shader instructions. | Subv | 2018-06-19 | 1 | -7/+14 |
| | | | |||||
* | | | GPU: Don't mark uniform buffers and registers as used for instructions which don't have them. | Subv | 2018-06-19 | 1 | -12/+15 |
|/ / | | | | | | | | | Like the MOV32I and FMUL32I instructions. This fixes a potential crash when using these instructions. | ||||
* | | gl_shader_decompiler: Implement LOP instructions. | bunnei | 2018-06-17 | 1 | -6/+28 |
| | | |||||
* | | gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP. | bunnei | 2018-06-17 | 1 | -54/+40 |
| | | |||||
* | | gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I. | bunnei | 2018-06-16 | 1 | -13/+41 |
| | | |||||
* | | gl_shader_decompiler: Implement LOP32I LogicOperation PassB. | bunnei | 2018-06-16 | 1 | -6/+12 |
| | | |||||
* | | Merge pull request #558 from Subv/iadd32i | bunnei | 2018-06-12 | 1 | -0/+21 |
|\ \ | | | | | | | GPU: Implemented the iadd32i shader instruction. | ||||
| * | | GPU: Implemented the iadd32i shader instruction. | Subv | 2018-06-12 | 1 | -0/+21 |
| | | | |||||
* | | | gl_shader_decompiler: Implement saturate for float instructions. | bunnei | 2018-06-12 | 1 | -37/+31 |
|/ / | |||||
* | | GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them. | Subv | 2018-06-10 | 1 | -1/+1 |
| | | | | | | | | This corrects the invalid position values in some games when doing attribute-less rendering. | ||||
* | | GPU: Implement the iset family of shader instructions. | Subv | 2018-06-09 | 1 | -2/+37 |
|/ | |||||
* | Merge pull request #550 from Subv/ssy | bunnei | 2018-06-09 | 1 | -0/+5 |
|\ | | | | | GPU: Stub the SSY shader instruction. | ||||
| * | GPU: Stub the SSY shader instruction. | Subv | 2018-06-09 | 1 | -0/+5 |
| | | | | | | | | This instruction tells the GPU where the flow reconverges in a non-uniform control flow scenario, we can ignore this when generating GLSL code. | ||||
* | | Merge pull request #551 from bunnei/shr | bunnei | 2018-06-09 | 1 | -0/+13 |
|\ \ | | | | | | | gl_shader_decompiler: Implement SHR instruction. | ||||
| * | | gl_shader_decompiler: Implement SHR instruction. | bunnei | 2018-06-09 | 1 | -0/+13 |
| |/ | |||||
* | | gl_shader_decompiler: Implement IADD instruction. | bunnei | 2018-06-09 | 1 | -6/+26 |
| | | |||||
* | | gl_shader_decompiler: Add missing asserts for saturate_a instructions. | bunnei | 2018-06-09 | 1 | -7/+17 |
|/ | |||||
* | gl_shader_decompiler: Implement BFE_IMM instruction. | bunnei | 2018-06-07 | 1 | -4/+29 |
| | |||||
* | gl_shader_decompiler: F2F: Implement rounding modes. | bunnei | 2018-06-07 | 1 | -7/+23 |
| | |||||
* | Merge pull request #537 from bunnei/misc-shader | bunnei | 2018-06-07 | 1 | -8/+4 |
|\ | | | | | gl_shader_decompiler: Additional decodings, remove unused stuff from TEX | ||||
| * | gl_shader_decompiler: Remove some attribute stuff that has nothing to do with TEX/TEXS. | bunnei | 2018-06-07 | 1 | -8/+4 |
| | | |||||
* | | gl_shader_decompiler: Implement ISETP_IMM instruction. | bunnei | 2018-06-07 | 1 | -8/+9 |
|/ | |||||
* | Merge pull request #534 from Subv/multitexturing | bunnei | 2018-06-07 | 1 | -7/+38 |
|\ | | | | | GPU: Implement sampling multiple textures in the generated glsl shaders. | ||||
| * | GPU: Implement sampling multiple textures in the generated glsl shaders. | Subv | 2018-06-06 | 1 | -7/+38 |
| | | | | | | | | | | | | All tested games that use a single texture show no regression. Only Texture2D textures are supported right now, each shader gets its own "tex_fs/vs/gs" sampler array to maintain independent textures between shader stages, the textures themselves are reused if possible. | ||||
* | | gl_shader_decompiler: Implement LD_C instruction. | bunnei | 2018-06-07 | 1 | -0/+27 |
| | | |||||
* | | gl_shader_gen: Add uniform handling for indirect const buffer access. | bunnei | 2018-06-07 | 1 | -0/+15 |
| | | |||||
* | | gl_shader_decompiler: Refactor uniform handling to allow different decodings. | bunnei | 2018-06-06 | 1 | -20/+19 |
|/ | |||||
* | gl_shader_decompiler: Fix un/signed mismatch with SHL. | bunnei | 2018-06-06 | 1 | -1/+1 |
| | |||||
* | Merge pull request #516 from Subv/f2i_r | bunnei | 2018-06-06 | 1 | -3/+44 |
|\ | | | | | GPU: Implemented the F2I_R shader instruction. | ||||
| * | GPU: Implemented the F2I_R shader instruction. | Subv | 2018-06-05 | 1 | -3/+44 |
| | | |||||
* | | Merge pull request #520 from bunnei/shader-shl | bunnei | 2018-06-05 | 1 | -2/+31 |
|\ \ | | | | | | | gl_shader_decompiler: Implement SHL instruction. | ||||
| * | | gl_shader_decompiler: Fix typo with ISCADD instruction. | bunnei | 2018-06-05 | 1 | -1/+1 |
| | | | |||||
| * | | gl_shader_decompiler: Implement SHL instruction. | bunnei | 2018-06-05 | 1 | -1/+30 |
| | | | |||||
* | | | Merge pull request #518 from Subv/incomplete_shaders | bunnei | 2018-06-05 | 1 | -5/+16 |
|\ \ \ | |/ / |/| | | GPU: Implemented predicated exit instructions in the shader programs. | ||||
| * | | GPU: Implement predicated exit instructions in the shader programs. | Subv | 2018-06-05 | 1 | -4/+6 |
| | | | |||||
| * | | GPU: Take into account predicated exits when performing shader control flow analysis. | Subv | 2018-06-05 | 1 | -1/+10 |
| | | | |||||
* | | | gl_shader_decompiler: Implement PredCondition::NotEqual. | bunnei | 2018-06-05 | 1 | -3/+3 |
| | | | |||||
* | | | GPU: Implement the ISCADD shader instructions. | Subv | 2018-06-05 | 1 | -0/+24 |
| |/ |/| | |||||
* | | Merge pull request #514 from Subv/lop32i | bunnei | 2018-06-05 | 1 | -0/+43 |
|\ \ | | | | | | | GPU: Implemented the LOP32I instruction. | ||||
| * | | GPU: Implemented the LOP32I instruction. | Subv | 2018-06-04 | 1 | -0/+43 |
| | | | |||||
* | | | Merge pull request #510 from Subv/isetp | bunnei | 2018-06-05 | 1 | -6/+53 |
|\ \ \ | | | | | | | | | GPU: Implemented the ISETP_R and ISETP_C instructions | ||||
| * | | | GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register. | Subv | 2018-06-04 | 1 | -9/+18 |
| | | | | |||||
| * | | | GPU: Implemented the ISETP_R and ISETP_C shader instructions. | Subv | 2018-06-04 | 1 | -0/+38 |
| |/ / | |||||
* | | | Merge pull request #512 from Subv/fset | bunnei | 2018-06-05 | 1 | -3/+18 |
|\ \ \ | |_|/ |/| | | GPU: Corrected the FSET and I2F instructions. | ||||
| * | | GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f. | Subv | 2018-06-04 | 1 | -1/+6 |
| | | | |||||
| * | | GPU: Corrected the I2F_R implementation. | Subv | 2018-06-04 | 1 | -2/+12 |
| |/ | |||||
* / | GPU: Partially implemented the shader BRA instruction. | Subv | 2018-06-04 | 1 | -1/+30 |
|/ | |||||
* | gl_shader_decompiler: Implement TEXS component mask. | bunnei | 2018-06-03 | 1 | -7/+10 |
| | |||||
* | Merge pull request #494 from bunnei/shader-tex | bunnei | 2018-06-03 | 1 | -2/+43 |
|\ | | | | | gl_shader_decompiler: Implement TEX, fixes for TEXS. | ||||
| * | gl_shader_decompiler: Implement TEX instruction. | bunnei | 2018-06-01 | 1 | -1/+26 |
| | | |||||
| * | gl_shader_decompiler: Support multi-destination for TEXS. | bunnei | 2018-06-01 | 1 | -2/+18 |
| | | |||||
* | | gl_shader_decompiler: Implement RRO as a register move. | bunnei | 2018-06-03 | 1 | -6/+11 |
|/ | |||||
* | Merge pull request #489 from Subv/vertexid | bunnei | 2018-05-30 | 1 | -1/+7 |
|\ | | | | | Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader. | ||||
| * | Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader. | Subv | 2018-05-30 | 1 | -1/+7 |
| | | |||||
* | | gl_shader_decompiler: F2F_R instruction: Implement abs. | bunnei | 2018-05-30 | 1 | -1/+7 |
| | | |||||
* | | gl_shader_decompiler: Partially implement F2F_R instruction. | bunnei | 2018-05-30 | 1 | -1/+6 |
|/ | |||||
* | Merge pull request #472 from bunnei/greater-equal | bunnei | 2018-05-27 | 1 | -4/+3 |
|\ | | | | | gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual. | ||||
| * | gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual. | bunnei | 2018-05-26 | 1 | -4/+3 |
| | | |||||
* | | shader_bytecode: Implement other variants of FMNMX. | bunnei | 2018-05-26 | 1 | -1/+3 |
|/ | |||||
* | Shader: Implemented compound predicates in fset. | Subv | 2018-05-25 | 1 | -28/+12 |
| | | | | | | You can specify a predicate in the fset instruction: Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0; | ||||
* | Shader: Implemented compound predicates in fsetp. | Subv | 2018-05-25 | 1 | -19/+55 |
| | | | | | | | You can specify three predicates in an fsetp instruction: P1 = (Value1 Comp Value2) OP P0; P2 = !(Value1 Comp Value2) OP P0; | ||||
* | Shaders: Implemented the FMNMX shader instruction. | Subv | 2018-05-21 | 1 | -6/+21 |
| | |||||
* | Merge pull request #422 from bunnei/shader-mov | bunnei | 2018-04-30 | 1 | -0/+6 |
|\ | | | | | Shader instructions MOV_C, MOV_R, and several minor GPU things | ||||
| * | gl_shader_decompiler: Implement MOV_R. | bunnei | 2018-04-29 | 1 | -1/+2 |
| | | |||||
| * | gl_shader_decompiler: Implement MOV_C. | bunnei | 2018-04-29 | 1 | -0/+5 |
| | | |||||
* | | Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions. | Subv | 2018-04-29 | 1 | -0/+7 |
|/ | |||||
* | gl_shader_decompiler: Partially implement I2I_R, and I2F_R. | bunnei | 2018-04-29 | 1 | -0/+26 |
| | |||||
* | gl_shader_decompiler: More cleanups, etc. with how we handle register types. | bunnei | 2018-04-29 | 1 | -44/+120 |
| | |||||
* | GLSLRegister: Simplify register declarations, etc. | bunnei | 2018-04-29 | 1 | -63/+31 |
| | |||||
* | gl_shader_decompiler: Implement MOV32_IMM instruction. | bunnei | 2018-04-29 | 1 | -0/+5 |
| | |||||
* | gl_shader_decompiler: Add GLSLRegisterManager class to track register state. | bunnei | 2018-04-27 | 1 | -154/+262 |
| | |||||
* | gl_shader_decompiler: Boilerplate for handling integer instructions. | bunnei | 2018-04-26 | 1 | -5/+102 |
| | |||||
* | gl_shader_decompiler: Move color output to EXIT instruction. | bunnei | 2018-04-26 | 1 | -6/+12 |
| | |||||
* | Shaders: Implemented the FSET instruction. | Subv | 2018-04-25 | 1 | -0/+53 |
| | | | | This instruction is similar to the FSETP instruction, but it doesn't set a predicate, it sets the destination register to 1.0 if the condition holds, and 0 otherwise. | ||||
* | Shaders: Added decodings for the FSET instructions. | Subv | 2018-04-25 | 1 | -1/+1 |
| | |||||
* | gl_shader_decompiler: Skip RRO instruction. | bunnei | 2018-04-21 | 1 | -0/+4 |
| | |||||
* | gl_shader_decompiler: Cleanup error logging. | bunnei | 2018-04-21 | 1 | -14/+6 |
| | |||||
* | shader_bytecode: Decode instructions based on bit strings. | bunnei | 2018-04-21 | 1 | -20/+29 |
| | |||||
* | ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'. | Subv | 2018-04-21 | 1 | -1/+7 |
| | |||||
* | ShaderGen: Implemented predicated instruction execution. | Subv | 2018-04-21 | 1 | -0/+35 |
| | | | | Each predicated instruction will be wrapped in an `if (predicate) { instruction_body; }` in the GLSL, where `predicate` is one of the predicate boolean variables previously set by fsetp. | ||||
* | ShaderGen: Implemented the fsetp instruction. | Subv | 2018-04-21 | 1 | -0/+72 |
| | | | | | | | | | | Predicate variables are now added to the generated shader code in the form of 'pX' where X is the predicate id. These predicate variables are initialized to false on shader startup and are set via the fsetp instructions. TODO: * Not all the comparison types are implemented. * Only the single-predicate version is implemented. | ||||
* | ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO). | Subv | 2018-04-20 | 1 | -0/+2 |
| | |||||
* | ShaderGen: Ignore the 'sched' instruction when generating shaders. | Subv | 2018-04-20 | 1 | -0/+16 |
| | | | | The 'sched' instruction has a very convoluted encoding, but fortunately it seems to only appear on a fixed interval (once every 4 instructions). | ||||
* | Merge pull request #356 from lioncash/shader | bunnei | 2018-04-20 | 1 | -12/+30 |
|\ | | | | | glsl_shader_decompiler: Minor API changes to ShaderWriter | ||||
| * | glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine() | Lioncash | 2018-04-20 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | This function doesn't need to take ownership of the string data being given to it, considering all we do is append the characters to the internal string instance. Instead, use a string view to simply reference the string data without any potential heap allocation. Now anything that is a raw const char* won't need to be converted to a std::string before appending. | ||||
| * | glsl_shader_decompiler: Add AddNewLine() function to ShaderWriter | Lioncash | 2018-04-20 | 1 | -6/+12 |
| | | | | | | | | Avoids constructing a std::string just to append a newline character | ||||
| * | glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine() | Lioncash | 2018-04-20 | 1 | -4/+11 |
| | | | | | | | | Avoids constructing a std::string just to append a character. | ||||
| * | glsl_shader_decompiler: Append indentation without constructing a separate std::string | Lioncash | 2018-04-20 | 1 | -1/+5 |
| | | | | | | | | | | The interface of std::string already lets us append N copies of a character to an existing string. | ||||
* | | ShaderGen: Implemented the fmul32i shader instruction. | Subv | 2018-04-19 | 1 | -6/+16 |
| | | |||||
* | | ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output. | Subv | 2018-04-19 | 1 | -2/+9 |
|/ | | | | It will now save the coords before writing the outputs in a subscope. | ||||
* | gl_shader_decompiler: Fix warnings with MarkAsUsed. | bunnei | 2018-04-17 | 1 | -1/+2 |
| | |||||
* | gl_shader_decompiler: Cleanup logging, updating to NGLOG_*. | bunnei | 2018-04-17 | 1 | -24/+22 |
| | |||||
* | gl_shader_decompiler: Implement several MUFU subops and abs_d. | bunnei | 2018-04-17 | 1 | -7/+21 |
| | |||||
* | gl_shader_decompiler: Fix swizzle in GetRegister. | bunnei | 2018-04-17 | 1 | -1/+1 |
| | |||||
* | gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions. | bunnei | 2018-04-17 | 1 | -12/+39 |
| | |||||
* | gl_shader_decompiler: Allow vertex position to be used in fragment shader. | bunnei | 2018-04-17 | 1 | -15/+13 |
| | |||||
* | gl_shader_decompiler: Implement IPA instruction. | bunnei | 2018-04-17 | 1 | -0/+11 |
| | |||||
* | gl_shader_decompiler: Add support for TEXS instruction. | bunnei | 2018-04-17 | 1 | -7/+29 |
| | |||||
* | gl_shader_decompiler: Use fragment output color for GPR 0-3. | bunnei | 2018-04-17 | 1 | -0/+5 |
| | |||||
* | gl_shader_decompiler: Partially implement MUFU. | bunnei | 2018-04-17 | 1 | -2/+11 |
| | |||||
* | GPU: Use the same buffer names in the generated GLSL and the buffer uploading code. | Subv | 2018-04-15 | 1 | -3/+2 |
| | |||||
* | shaders: Expose hints about used const buffers. | bunnei | 2018-04-15 | 1 | -8/+32 |
| | |||||
* | shaders: Address PR review feedback. | bunnei | 2018-04-14 | 1 | -6/+8 |
| | |||||
* | gl_shader_decompiler: Cleanup log statements. | bunnei | 2018-04-14 | 1 | -15/+15 |
| | |||||
* | shaders: Fix GCC and clang build issues. | bunnei | 2018-04-14 | 1 | -1/+1 |
| | |||||
* | gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup. | bunnei | 2018-04-14 | 1 | -20/+57 |
| | |||||
* | gl_shader_decompiler: Add shader stage hint. | bunnei | 2018-04-14 | 1 | -4/+7 |
| | |||||
* | gl_shader_decompiler: Basic impl. for very simple vertex shaders. | bunnei | 2018-04-14 | 1 | -8/+307 |
| | | | | - Tested with Puyo Puyo Tetris and Cave Story+ | ||||
* | gl_shader_decompiler: Add skeleton code from Citra for shader analysis. | bunnei | 2018-04-14 | 1 | -33/+134 |
| | |||||
* | renderer_opengl: Logging, etc. cleanup. | bunnei | 2018-03-27 | 1 | -1/+1 |
| | |||||
* | renderer_gl: Port over gl_shader_decompiler module from Citra. | bunnei | 2018-03-20 | 1 | -0/+58 |