summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Implemented Depth Compare and Shadow SamplersFernandoS272018-10-061-61/+156
|
* Implemented Texture Processing Modes in TEXS and TLDSFernandoS272018-10-031-5/+42
|
* Merge pull request #1330 from raven02/tldsbunnei2018-10-011-7/+15
|\ | | | | TLDS: Add 1D sampler
| * Fix trailing whitespaceraven022018-09-301-1/+4
| |
| * Merge branch 'master' into tldsraven022018-09-191-67/+156
| |\
| * | Add 1D sampler for TLDS - TexelFetch (Mario Rabbids)raven022018-09-171-7/+12
| | |
* | | gl_shader_decompiler: TEXS: Implement TextureType::TextureCube.bunnei2018-09-301-0/+8
| |/ |/|
* | Merge pull request #1342 from lioncash/truncbunnei2018-09-191-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 codeLioncash2018-09-181-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/csetpbunnei2018-09-191-21/+86
|\ \ \ | | | | | | | | shader_decompiler: Implemented (Partialy) Control Codes and CSETP
| * | | Implemented Internal FlagsFernandoS272018-09-181-13/+35
| | | |
| * | | Implemented I2I.CC on the NEU control code, used by SMOFernandoS272018-09-171-13/+17
| | | |
| * | | Implemented CSETPFernandoS272018-09-171-14/+38
| | | |
| * | | Implemented Control CodesFernandoS272018-09-171-0/+15
| |/ /
* | | Merge pull request #1299 from FernandoS27/texture-sanatizebunnei2018-09-191-2/+45
|\ \ \ | | | | | | | | shader_decompiler: Asserts for Texture Instructions
| * | | Added asserts for texture misc modes to texture instructionsFernandoS272018-09-171-2/+45
| |/ /
* | | Merge pull request #1290 from FernandoS27/shader-headerbunnei2018-09-181-24/+7
|\ \ \ | |/ / |/| | Implemented (Partialy) Shader Header
| * | Replace old FragmentHeader for the new HeaderFernandoS272018-09-111-22/+3
| | |
| * | Implemented (Partialy) Shader HeaderFernandoS272018-09-111-2/+4
| | |
* | | Merge pull request #1316 from lioncash/shadowbunnei2018-09-171-2/+0
|\ \ \ | | | | | | | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructions
| * | | gl_shader_decompiler: Get rid of variable shadowing within LEA instructionsLioncash2018-09-141-2/+0
| | | | | | | | | | | | | | | | These variables are already defined within an outer scope.
* | | | Merge pull request #1326 from FearlessTobi/port-4182bunnei2018-09-171-14/+14
|\ \ \ \ | |_|_|/ |/| | | Port #4182 from Citra: "Prefix all size_t with std::"
| * | | Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-14/+14
| |/ /
* / / Shaders: Implemented multiple-word loads and stores to and from attribute memory.Subv2018-09-151-6/+49
|/ / | | | | | | This seems to be an optimization performed by nouveau.
* | Merge pull request #1263 from FernandoS27/tex-modebunnei2018-09-121-1/+33
|\ \ | | | | | | shader_decompiler: Implemented (Partially) Texture Processing Modes
| * | Implemented Texture Processing ModesFernandoS272018-09-121-1/+33
| |/
* / Implemented LEA and PSETFernandoS272018-09-111-0/+91
|/
* Fixed renderdoc input/output textures not working due to render targetsDavid Marcec2018-09-111-1/+1
|
* Merge pull request #1268 from FernandoS27/tmmlbunnei2018-09-101-0/+48
|\ | | | | shader_decompiler: Implemented TMML
| * Implemented TMMLFernandoS272018-09-101-0/+48
| |
* | Merge pull request #1280 from zero334/improvementsbunnei2018-09-101-73/+82
|\ \ | |/ |/| video_core: fixed arithmetic overflow warnings & improved code style
| * video_core: fixed arithmetic overflow warnings & improved code stylePatrick Elsässer2018-09-091-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.FernandoS272018-09-091-0/+20
|/
* gl_shader_decompiler: Partially implement several non-2D texture types (Subv).bunnei2018-09-081-26/+99
|
* gl_shader_decompiler: Implement saturate mode for IPA.bunnei2018-09-061-1/+5
|
* Implemented IPA ProperlyFernandoS272018-09-061-47/+86
|
* gl_shader_decompiler: Use used_shaders member variable directly within GenerateDeclarations()Lioncash2018-09-021-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-assertbunnei2018-09-021-0/+2
|\ | | | | Added assert for TEXS nodep
| * Added assert for TEXS nodepDavid Marcec2018-09-011-0/+2
| |
* | Merge pull request #1214 from ogniK5377/ipa-assertbunnei2018-09-021-4/+8
|\ \ | | | | | | Added better asserts to IPA, Renamed IPA modes to match mesa
| * | Added better asserts to IPA, Renamed IPA modes to match mesaDavid Marcec2018-09-011-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-assertbunnei2018-09-021-0/+6
|\ \ | | | | | | Added FFMA asserts and missing fields
| * | Removed saturate assertDavid Marcec2018-09-011-1/+0
| | | | | | | | | | | | Saturate already implemented
| * | Changed tab5980_0 default from 0 -> 1David Marcec2018-09-011-2/+2
| | |
| * | Added FFMA assertsDavid Marcec2018-09-011-0/+7
| |/
* | Removed saturate assertDavid Marcec2018-09-011-1/+0
| | | | | | | | Unneeded as we already implement it
* | Added FMUL assertsDavid Marcec2018-09-011-0/+10
|/
* Added predicate comparison GreaterEqualWithNanHexagon122018-08-311-3/+3
|
* gl_shader_decompiler: Implement POPC (#1203)Laku2018-08-311-0/+9
| | | | | | * Implement POPC * implement invert
* Merge pull request #1200 from bunnei/improve-ipabunnei2018-08-301-1/+33
|\ | | | | gl_shader_decompiler: Improve IPA for Pass mode with Position attribute.
| * gl_shader_decompiler: Improve IPA for Pass mode with Position attribute.bunnei2018-08-291-1/+33
| |
* | Shaders: Implemented IADD3tech4me2018-08-291-0/+61
|/
* Merge pull request #1156 from Lakumakkara/lop3bunnei2018-08-231-0/+41
|\ | | | | gl_shader_decompiler: Implement LOP3
| * more fixesLaku2018-08-221-6/+7
| |
| * fixesLaku2018-08-221-6/+12
| |
| * remove debug loggingLaku2018-08-221-2/+0
| |
| * implement lop3Laku2018-08-221-0/+36
| |
* | renderer_opengl: Namespace OpenGL codeLioncash2018-08-221-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."bunnei2018-08-221-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.Subv2018-08-211-1/+6
| | | | We'll write <last color output reg + 2> to gl_FragDepth.
* Merge pull request #1131 from bunnei/impl-tex3d-texcubebunnei2018-08-211-0/+15
|\ | | | | gl_shader_decompiler: Implement TextureCube/Texture3D for TEX/TEXS.
| * gl_shader_decompiler: Implement Texture3D for TEXS.bunnei2018-08-211-0/+7
| |
| * gl_shader_decompiler: Implement TextureCube for TEX.bunnei2018-08-211-0/+8
| |
* | Merge pull request #1106 from Subv/multiple_rendertargetsbunnei2018-08-211-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.Subv2018-08-211-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.Subv2018-08-211-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.Subv2018-08-211-5/+14
| |
* | Merge pull request #1115 from Subv/texs_maskbunnei2018-08-201-18/+18
|\ \ | | | | | | Shaders/TEXS: Write to the correct output register when swizzling.
| * | Shaders/TEXS: Fixed the component mask in the TEXS instruction.Subv2018-08-201-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_typesbunnei2018-08-201-23/+134
|\ \ \ | |/ / |/| | Shaders: Use the correct shader type when sampling textures.
| * | Shader: Implemented the TLD4 and TLD4S opcodes using GLSL's textureGather.Subv2018-08-191-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.Subv2018-08-191-23/+83
| | | | | | | | | | | | Different sampler types have their parameters in different registers.
* | | Merge pull request #1089 from Subv/neg_bitsbunnei2018-08-191-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.Subv2018-08-181-16/+34
| | | | | | | | | | | | | | | | We should definitely audit our shader generator for more errors like this.
* | | | Merge pull request #1105 from Subv/convert_negbunnei2018-08-191-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.Subv2018-08-181-2/+0
| | |_|/ | |/| |
* | | | Merge pull request #1101 from Subv/ssy_stackbunnei2018-08-191-3/+36
|\ \ \ \ | |_|_|/ |/| | | Shaders: Implemented a stack for the SSY/SYNC instructions.
| * | | Shaders: Implemented a stack for the SSY/SYNC instructions.Subv2018-08-181-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_facingbunnei2018-08-191-0/+4
|\ \ \ | | | | | | | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63).
| * | | Shaders: Implemented the gl_FrontFacing input attribute (attr 63).Subv2018-08-191-0/+4
| |/ /
* / / Shader: Implemented the predicate and mode arguments of LOP.Subv2018-08-181-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 GreaterThanWithNanDavid Marcec2018-08-181-5/+7
| |
* | Merge pull request #1019 from Subv/vertex_divisorbunnei2018-08-171-1/+1
|\ \ | |/ |/| Rasterizer: Manually implemented instanced rendering.
| * Rasterizer: Implemented instanced rendering.Subv2018-08-151-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.Subv2018-08-151-4/+12
| |
* | Shader/I2F: Implemented the negate I2F_C instruction variant.Subv2018-08-151-7/+23
| |
* | Shader/F2I: Implemented the negate bit in the I2F instructionSubv2018-08-151-0/+4
| |
* | Shader/F2I: Implemented the F2I_C instruction variant.Subv2018-08-151-2/+10
| |
* | Shader/F2I: Implemented the negate bit in the F2I instruction.Subv2018-08-151-0/+4
|/
* gl_shader_decompiler: Several fixes for indirect constant buffer loads.bunnei2018-08-151-13/+22
|
* gl_shader_decompiler: Implement XMAD instruction.bunnei2018-08-131-0/+95
|
* gl_shader_decompiler: Fix SetOutputAttributeToRegister empty check.bunnei2018-08-121-2/+2
|
* gl_shader_decompiler: Fix GLSL compiler error with KIL instruction.bunnei2018-08-121-0/+8
|
* Merge pull request #1010 from bunnei/unk-vert-attrib-shaderbunnei2018-08-121-8/+10
|\ | | | | gl_shader_decompiler: Improve handling of unknown input/output attributes.
| * gl_shader_decompiler: Improve handling of unknown input/output attributes.bunnei2018-08-121-8/+10
| |
* | GPU/Shader: Don't predicate instructions that don't have a predicate field (SSY).Subv2018-08-111-2/+6
| |
* | GPU/Shaders: Implemented SSY and SYNC as a way to modify control flow during shader execution.Subv2018-08-111-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()Lioncash2018-08-091-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.bunnei2018-08-091-4/+5
| | | | - Used by Super Mario Odyssey (when going in game).
* Merge pull request #982 from bunnei/stub-unk-63bunnei2018-08-091-0/+7
|\ | | | | gl_shader_decompiler: Stub input attribute Unknown_63.
| * gl_shader_decompiler: Stub input attribute Unknown_63.bunnei2018-08-081-0/+7
| |
* | gl_shader_decompiler: Let OpenGL interpret floats.bunnei2018-08-081-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.bunnei2018-08-051-2/+5
|
* gl_shader_decompiler: Remove unused variable in GenerateDeclarations()Lioncash2018-08-031-2/+0
| | | | | This variable was being incremented, but we were never actually using it.
* Merge pull request #792 from lioncash/retvalbunnei2018-07-241-2/+2
|\ | | | | gl_shader_decompiler: Correct return value of WriteTexsInstruction()
| * gl_shader_decompiler: Correct return value of WriteTexsInstruction()Lioncash2018-07-241-2/+2
| | | | | | | | This should be returning void, not a std::string
* | Merge pull request #790 from bunnei/shader-print-instrbunnei2018-07-241-1/+2
|\ \ | | | | | | gl_shader_decompiler: Print instruction value in shader comments.
| * | gl_shader_decompiler: Print instruction value in shader comments.bunnei2018-07-241-1/+2
| | |
* | | Merge pull request #788 from bunnei/shader-check-zerobunnei2018-07-241-0/+6
|\ \ \ | |_|/ |/| | gl_shader_decompiler: Check if SetRegister result is ZeroIndex.
| * | gl_shader_decompiler: Check if SetRegister result is ZeroIndex.bunnei2018-07-241-0/+6
| |/
* | gl_shader_decompiler: Implement shader instruction TLDS.bunnei2018-07-241-29/+43
| |
* | gl_shader_decompiler: Simplify GetCommonDeclarations()Lioncash2018-07-231-5/+5
|/
* gl_shader_decompiler: Remove redundant Subroutine construction in AddSubroutine()Lioncash2018-07-221-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-cleanupbunnei2018-07-221-78/+15
|\ | | | | gl_shader_decompiler: Remove unused state tracking and minor cleanup.
| * gl_shader_decompiler: Remove unused state tracking and minor cleanup.bunnei2018-07-221-78/+15
| |
* | gl_shader_decompiler: Implement SEL instruction.bunnei2018-07-221-0/+9
|/
* video_core: Use nested namespaces where applicableLioncash2018-07-211-4/+2
| | | | Compresses a few namespace specifiers to be more compact.
* Merge pull request #731 from lioncash/shadowbunnei2018-07-201-6/+4
|\ | | | | gl_shader_decompiler: Eliminate variable and declaration shadowing
| * gl_shader_decompiler: Eliminate variable and declaration shadowingLioncash2018-07-201-6/+4
| | | | | | | | | | Ensures that no identifiers are being hidden, which also reduces compiler warnings.
* | gl_shader_decompiler: Remove unnecessary const from return valuesLioncash2018-07-201-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.bunnei2018-07-131-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-nanbunnei2018-07-131-5/+6
|\ | | | | gl_shader_decompiler: Implement PredCondition::LessThanWithNan.
| * gl_shader_decompiler: Implement PredCondition::LessThanWithNan.bunnei2018-07-131-5/+6
| |
* | gl_shader_decompiler: Use FlowCondition field in EXIT instruction.bunnei2018-07-131-8/+25
|/
* Merge pull request #652 from Subv/fadd32iSebastian Valle2018-07-131-0/+23
|\ | | | | GPU: Implement the FADD32I shader instruction.
| * GPU: Implement the FADD32I shader instruction.Subv2018-07-121-0/+23
| |
* | Merge pull request #625 from Subv/imnmxbunnei2018-07-081-0/+14
|\ \ | |/ |/| GPU: Implemented the IMNMX shader instruction.
| * GPU: Implemented the IMNMX shader instruction.Subv2018-07-041-0/+14
| | | | | | | | It's similar to the FMNMX instruction but it works on integers.
* | Merge pull request #626 from Subv/shader_syncbunnei2018-07-051-0/+7
|\ \ | | | | | | GPU: Stub the shader SYNC and DEPBAR instructions.
| * | GPU: Stub the shader SYNC and DEPBAR instructions.Subv2018-07-041-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_roundbunnei2018-07-051-0/+3
|\ \ | | | | | | GPU: Implemented the F2F 'round' rounding mode.
| * | GPU: Implemented the F2F 'round' rounding mode.Subv2018-07-041-0/+3
| |/ | | | | | | It's implemented via the GLSL 'roundEven()' function.
* / GPU: Implemented the PSETP shader instruction.Subv2018-07-041-0/+30
|/ | | | It's similar to the isetp and fsetp instructions but it works on predicates instead.
* Merge pull request #607 from jroweboy/loggingbunnei2018-07-031-26/+26
|\ | | | | Logging - Customizable backends
| * Update clang formatJames Rowe2018-07-031-6/+6
| |
| * Rename logging macro back to LOG_*James Rowe2018-07-031-20/+20
| |
* | GPU: Implemented MUFU suboperation 8, sqrt.Subv2018-07-031-0/+4
|/
* Merge pull request #602 from Subv/mufu_subopbunnei2018-07-011-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.Subv2018-06-301-4/+0
| |
* | gl_shader_decompiler: Implement predicate NotEqualWithNan.bunnei2018-06-301-17/+23
|/
* gl_shader_decompiler: Add a return path for unknown instructions.bunnei2018-06-271-0/+1
|
* Merge pull request #554 from Subv/constbuffer_ubobunnei2018-06-261-6/+16
|\ | | | | Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.
| * Rasterizer: Use UBOs instead of SSBOs for uploading const buffers.Subv2018-06-101-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.Subv2018-06-201-1/+1
| |
* | Merge pull request #574 from Subv/shader_abs_negbunnei2018-06-191-7/+14
|\ \ | | | | | | GPU: Perform negation after absolute value in the float shader instructions.
| * | GPU: Perform negation after absolute value in the float shader instructions.Subv2018-06-191-7/+14
| | |
* | | GPU: Don't mark uniform buffers and registers as used for instructions which don't have them.Subv2018-06-191-12/+15
|/ / | | | | | | | | Like the MOV32I and FMUL32I instructions. This fixes a potential crash when using these instructions.
* | gl_shader_decompiler: Implement LOP instructions.bunnei2018-06-171-6/+28
| |
* | gl_shader_decompiler: Refactor LOP32I instruction a bit in support of LOP.bunnei2018-06-171-54/+40
| |
* | gl_shader_decompiler: Implement integer size conversions for I2I/I2F/F2I.bunnei2018-06-161-13/+41
| |
* | gl_shader_decompiler: Implement LOP32I LogicOperation PassB.bunnei2018-06-161-6/+12
| |
* | Merge pull request #558 from Subv/iadd32ibunnei2018-06-121-0/+21
|\ \ | | | | | | GPU: Implemented the iadd32i shader instruction.
| * | GPU: Implemented the iadd32i shader instruction.Subv2018-06-121-0/+21
| | |
* | | gl_shader_decompiler: Implement saturate for float instructions.bunnei2018-06-121-37/+31
|/ /
* | GPU: Convert the gl_InstanceId and gl_VertexID variables to floats when reading from them.Subv2018-06-101-1/+1
| | | | | | | | This corrects the invalid position values in some games when doing attribute-less rendering.
* | GPU: Implement the iset family of shader instructions.Subv2018-06-091-2/+37
|/
* Merge pull request #550 from Subv/ssybunnei2018-06-091-0/+5
|\ | | | | GPU: Stub the SSY shader instruction.
| * GPU: Stub the SSY shader instruction.Subv2018-06-091-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/shrbunnei2018-06-091-0/+13
|\ \ | | | | | | gl_shader_decompiler: Implement SHR instruction.
| * | gl_shader_decompiler: Implement SHR instruction.bunnei2018-06-091-0/+13
| |/
* | gl_shader_decompiler: Implement IADD instruction.bunnei2018-06-091-6/+26
| |
* | gl_shader_decompiler: Add missing asserts for saturate_a instructions.bunnei2018-06-091-7/+17
|/
* gl_shader_decompiler: Implement BFE_IMM instruction.bunnei2018-06-071-4/+29
|
* gl_shader_decompiler: F2F: Implement rounding modes.bunnei2018-06-071-7/+23
|
* Merge pull request #537 from bunnei/misc-shaderbunnei2018-06-071-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.bunnei2018-06-071-8/+4
| |
* | gl_shader_decompiler: Implement ISETP_IMM instruction.bunnei2018-06-071-8/+9
|/
* Merge pull request #534 from Subv/multitexturingbunnei2018-06-071-7/+38
|\ | | | | GPU: Implement sampling multiple textures in the generated glsl shaders.
| * GPU: Implement sampling multiple textures in the generated glsl shaders.Subv2018-06-061-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.bunnei2018-06-071-0/+27
| |
* | gl_shader_gen: Add uniform handling for indirect const buffer access.bunnei2018-06-071-0/+15
| |
* | gl_shader_decompiler: Refactor uniform handling to allow different decodings.bunnei2018-06-061-20/+19
|/
* gl_shader_decompiler: Fix un/signed mismatch with SHL.bunnei2018-06-061-1/+1
|
* Merge pull request #516 from Subv/f2i_rbunnei2018-06-061-3/+44
|\ | | | | GPU: Implemented the F2I_R shader instruction.
| * GPU: Implemented the F2I_R shader instruction.Subv2018-06-051-3/+44
| |
* | Merge pull request #520 from bunnei/shader-shlbunnei2018-06-051-2/+31
|\ \ | | | | | | gl_shader_decompiler: Implement SHL instruction.
| * | gl_shader_decompiler: Fix typo with ISCADD instruction.bunnei2018-06-051-1/+1
| | |
| * | gl_shader_decompiler: Implement SHL instruction.bunnei2018-06-051-1/+30
| | |
* | | Merge pull request #518 from Subv/incomplete_shadersbunnei2018-06-051-5/+16
|\ \ \ | |/ / |/| | GPU: Implemented predicated exit instructions in the shader programs.
| * | GPU: Implement predicated exit instructions in the shader programs.Subv2018-06-051-4/+6
| | |
| * | GPU: Take into account predicated exits when performing shader control flow analysis.Subv2018-06-051-1/+10
| | |
* | | gl_shader_decompiler: Implement PredCondition::NotEqual.bunnei2018-06-051-3/+3
| | |
* | | GPU: Implement the ISCADD shader instructions.Subv2018-06-051-0/+24
| |/ |/|
* | Merge pull request #514 from Subv/lop32ibunnei2018-06-051-0/+43
|\ \ | | | | | | GPU: Implemented the LOP32I instruction.
| * | GPU: Implemented the LOP32I instruction.Subv2018-06-041-0/+43
| | |
* | | Merge pull request #510 from Subv/isetpbunnei2018-06-051-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.Subv2018-06-041-9/+18
| | | |
| * | | GPU: Implemented the ISETP_R and ISETP_C shader instructions.Subv2018-06-041-0/+38
| |/ /
* | | Merge pull request #512 from Subv/fsetbunnei2018-06-051-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.Subv2018-06-041-1/+6
| | |
| * | GPU: Corrected the I2F_R implementation.Subv2018-06-041-2/+12
| |/
* / GPU: Partially implemented the shader BRA instruction.Subv2018-06-041-1/+30
|/
* gl_shader_decompiler: Implement TEXS component mask.bunnei2018-06-031-7/+10
|
* Merge pull request #494 from bunnei/shader-texbunnei2018-06-031-2/+43
|\ | | | | gl_shader_decompiler: Implement TEX, fixes for TEXS.
| * gl_shader_decompiler: Implement TEX instruction.bunnei2018-06-011-1/+26
| |
| * gl_shader_decompiler: Support multi-destination for TEXS.bunnei2018-06-011-2/+18
| |
* | gl_shader_decompiler: Implement RRO as a register move.bunnei2018-06-031-6/+11
|/
* Merge pull request #489 from Subv/vertexidbunnei2018-05-301-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.Subv2018-05-301-1/+7
| |
* | gl_shader_decompiler: F2F_R instruction: Implement abs.bunnei2018-05-301-1/+7
| |
* | gl_shader_decompiler: Partially implement F2F_R instruction.bunnei2018-05-301-1/+6
|/
* Merge pull request #472 from bunnei/greater-equalbunnei2018-05-271-4/+3
|\ | | | | gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.
| * gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.bunnei2018-05-261-4/+3
| |
* | shader_bytecode: Implement other variants of FMNMX.bunnei2018-05-261-1/+3
|/
* Shader: Implemented compound predicates in fset.Subv2018-05-251-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.Subv2018-05-251-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.Subv2018-05-211-6/+21
|
* Merge pull request #422 from bunnei/shader-movbunnei2018-04-301-0/+6
|\ | | | | Shader instructions MOV_C, MOV_R, and several minor GPU things
| * gl_shader_decompiler: Implement MOV_R.bunnei2018-04-291-1/+2
| |
| * gl_shader_decompiler: Implement MOV_C.bunnei2018-04-291-0/+5
| |
* | Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions.Subv2018-04-291-0/+7
|/
* gl_shader_decompiler: Partially implement I2I_R, and I2F_R.bunnei2018-04-291-0/+26
|
* gl_shader_decompiler: More cleanups, etc. with how we handle register types.bunnei2018-04-291-44/+120
|
* GLSLRegister: Simplify register declarations, etc.bunnei2018-04-291-63/+31
|
* gl_shader_decompiler: Implement MOV32_IMM instruction.bunnei2018-04-291-0/+5
|
* gl_shader_decompiler: Add GLSLRegisterManager class to track register state.bunnei2018-04-271-154/+262
|
* gl_shader_decompiler: Boilerplate for handling integer instructions.bunnei2018-04-261-5/+102
|
* gl_shader_decompiler: Move color output to EXIT instruction.bunnei2018-04-261-6/+12
|
* Shaders: Implemented the FSET instruction.Subv2018-04-251-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.Subv2018-04-251-1/+1
|
* gl_shader_decompiler: Skip RRO instruction.bunnei2018-04-211-0/+4
|
* gl_shader_decompiler: Cleanup error logging.bunnei2018-04-211-14/+6
|
* shader_bytecode: Decode instructions based on bit strings.bunnei2018-04-211-20/+29
|
* ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'.Subv2018-04-211-1/+7
|
* ShaderGen: Implemented predicated instruction execution.Subv2018-04-211-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.Subv2018-04-211-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).Subv2018-04-201-0/+2
|
* ShaderGen: Ignore the 'sched' instruction when generating shaders.Subv2018-04-201-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/shaderbunnei2018-04-201-12/+30
|\ | | | | glsl_shader_decompiler: Minor API changes to ShaderWriter
| * glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine()Lioncash2018-04-201-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 ShaderWriterLioncash2018-04-201-6/+12
| | | | | | | | Avoids constructing a std::string just to append a newline character
| * glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine()Lioncash2018-04-201-4/+11
| | | | | | | | Avoids constructing a std::string just to append a character.
| * glsl_shader_decompiler: Append indentation without constructing a separate std::stringLioncash2018-04-201-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.Subv2018-04-191-6/+16
| |
* | ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output.Subv2018-04-191-2/+9
|/ | | | It will now save the coords before writing the outputs in a subscope.
* gl_shader_decompiler: Fix warnings with MarkAsUsed.bunnei2018-04-171-1/+2
|
* gl_shader_decompiler: Cleanup logging, updating to NGLOG_*.bunnei2018-04-171-24/+22
|
* gl_shader_decompiler: Implement several MUFU subops and abs_d.bunnei2018-04-171-7/+21
|
* gl_shader_decompiler: Fix swizzle in GetRegister.bunnei2018-04-171-1/+1
|
* gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions.bunnei2018-04-171-12/+39
|
* gl_shader_decompiler: Allow vertex position to be used in fragment shader.bunnei2018-04-171-15/+13
|
* gl_shader_decompiler: Implement IPA instruction.bunnei2018-04-171-0/+11
|
* gl_shader_decompiler: Add support for TEXS instruction.bunnei2018-04-171-7/+29
|
* gl_shader_decompiler: Use fragment output color for GPR 0-3.bunnei2018-04-171-0/+5
|
* gl_shader_decompiler: Partially implement MUFU.bunnei2018-04-171-2/+11
|
* GPU: Use the same buffer names in the generated GLSL and the buffer uploading code.Subv2018-04-151-3/+2
|
* shaders: Expose hints about used const buffers.bunnei2018-04-151-8/+32
|
* shaders: Address PR review feedback.bunnei2018-04-141-6/+8
|
* gl_shader_decompiler: Cleanup log statements.bunnei2018-04-141-15/+15
|
* shaders: Fix GCC and clang build issues.bunnei2018-04-141-1/+1
|
* gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup.bunnei2018-04-141-20/+57
|
* gl_shader_decompiler: Add shader stage hint.bunnei2018-04-141-4/+7
|
* gl_shader_decompiler: Basic impl. for very simple vertex shaders.bunnei2018-04-141-8/+307
| | | | - Tested with Puyo Puyo Tetris and Cave Story+
* gl_shader_decompiler: Add skeleton code from Citra for shader analysis.bunnei2018-04-141-33/+134
|
* renderer_opengl: Logging, etc. cleanup.bunnei2018-03-271-1/+1
|
* renderer_gl: Port over gl_shader_decompiler module from Citra.bunnei2018-03-201-0/+58