summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2409 from ReinUsesLisp/half-floatsbunnei2019-04-201-50/+76
|\ | | | | shader_ir/decode: Miscellaneous fixes to half-float decompilation
| * shader_ir/decode: Fix half float pre-operations and remove MetaHalfArithmeticReinUsesLisp2019-04-161-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 decompilationReinUsesLisp2019-04-161-2/+2
| | | | | | | | GLSL decompilation for HMergeH0 was wrong. This addresses that issue.
| * shader_ir/decode: Implement half float saturationReinUsesLisp2019-04-161-4/+11
| |
| * renderer_opengl: Implement half float NaN comparisonsReinUsesLisp2019-04-161-18/+42
| |
* | shader_ir: Implement STG, keep track of global memory usage and flushReinUsesLisp2019-04-141-11/+25
|/
* Remove bounding in LD_CFernando Sahmkow2019-04-101-2/+1
|
* Merge pull request #2306 from ReinUsesLisp/aoffibunnei2019-04-071-42/+91
|\ | | | | shader_ir: Implement AOFFI for TEX and TLD4
| * gl_shader_decompiler: Hide local definitions inside an anonymous namespaceReinUsesLisp2019-03-311-6/+8
| |
| * gl_shader_decompiler: Add AOFFI backing implementationReinUsesLisp2019-03-301-38/+85
| |
* | Merge pull request #2327 from ReinUsesLisp/crash-safe-visitbunnei2019-04-061-1/+6
|\ \ | | | | | | gl_shader_decompiler: Return early when an operation is invalid
| * | gl_shader_decompiler: Return early when an operation is invalidReinUsesLisp2019-04-031-1/+6
| |/
* | Merge pull request #2337 from lioncash/temporarybunnei2019-04-061-12/+12
|\ \ | | | | | | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()
| * | gl_shader_decompiler: Rename GenerateTemporal() to GenerateTemporary()Lioncash2019-04-051-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 typesReinUsesLisp2019-04-051-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 MetaTextureReinUsesLisp2019-02-261-21/+35
|
* Merge pull request #2118 from FernandoS27/ipa-improvebunnei2019-02-251-27/+17
|\ | | | | shader_decompiler: Improve Accuracy of Attribute Interpolation.
| * shader_decompiler: Improve Accuracy of Attribute Interpolation.Fernando Sahmkow2019-02-141-27/+17
| |
* | gl_shader_decompiler: Re-implement TLDS lodReinUsesLisp2019-02-121-21/+34
|/
* shader_ir: Remove F4 prefix to texture operationsReinUsesLisp2019-02-071-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 codeReinUsesLisp2019-02-071-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-trackingbunnei2019-02-071-3/+3
|\ | | | | shader/track: Add a more permissive global memory tracking
| * shader_ir: Rename BasicBlock to NodeBlockReinUsesLisp2019-02-031-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 fileReinUsesLisp2019-02-071-3/+4
| |
* | gl_shader_decompiler: Remove name entriesReinUsesLisp2019-02-071-5/+3
|/
* shader_ir: Unify constant buffer offset valuesReinUsesLisp2019-01-301-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 bindingsReinUsesLisp2019-01-301-3/+8
|
* shader_decode: Implement LDG and basic cbuf trackingReinUsesLisp2019-01-301-6/+38
|
* gl_shader_decompiler: replace std::get<> with std::get_if<> for macOS compatibilityReinUsesLisp2019-01-151-44/+58
|
* gl_shader_decompiler: Inline textureGather componentReinUsesLisp2019-01-151-15/+16
|
* shader_ir: Remove composite primitives and use temporals insteadReinUsesLisp2019-01-151-66/+37
|
* gl_shader_decompiler: Fixup AssignCompositeHalfReinUsesLisp2019-01-151-1/+1
|
* shader_decode: Use proper primitive namesReinUsesLisp2019-01-151-10/+8
|
* shader_decode: Use BitfieldExtract instead of shift + andReinUsesLisp2019-01-151-0/+7
|
* shader_ir: Remove Ipa primitiveReinUsesLisp2019-01-151-8/+0
|
* gl_shader_decompiler: Use rasterizer's UBO size limitReinUsesLisp2019-01-151-1/+3
|
* gl_shader_gen: Fixup code formattingReinUsesLisp2019-01-151-1/+1
|
* video_core: Rename glsl_decompiler to gl_shader_decompilerReinUsesLisp2019-01-151-0/+1543
|
* video_core: Replace gl_shader_decompilerReinUsesLisp2019-01-151-3950/+0
|
* Add missing uintBitsToFloat to SetRegisterToHalfFloatRodolfo Bogado2018-12-271-2/+2
|
* Merge pull request #1892 from Tinob/masterbunnei2018-12-271-113/+122
|\ | | | | Improve Zero flag implementation
| * Apply CC test to the final value to be stored in the registerRodolfo Bogado2018-12-261-9/+12
| |
| * Includde saturation in the evaluation of the control codeRodolfo Bogado2018-12-221-3/+4
| |
| * Handle RZ cases evaluating the expression instead of the register value.Rodolfo Bogado2018-12-221-14/+22
| |
| * complete emulation of ZeroFlagRodolfo Bogado2018-12-221-100/+97
| |
* | Fixed shader linking error due to TLDS (#1934)David2018-12-261-1/+1
|/ | | | | | | | * Fixed shader linking error due to TLDS coord should be coords * Fix remaining coords
* Merge pull request #1921 from ogniK5377/no-unitbunnei2018-12-211-2/+10
|\ | | | | Fixed uninitialized memory due to missing returns in canary
| * hopefully fix clang format issueDavid Marcec2018-12-191-0/+1
| |
| * Fixed uninitialized memory due to missing returns in canaryDavid Marcec2018-12-191-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_fixesbunnei2018-12-191-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.heapo2018-12-171-16/+14
| |
* | Implement postfactor multiplication/division for fmul instructionsheapo2018-12-171-4/+20
|/
* Merge pull request #1888 from marcosvitali/glFrontFacingbunnei2018-12-111-1/+1
|\ | | | | gl_shader_decompiler: IPA fix FrontFacing.
| * gl_shader_decompiler: IPA FrontFacing: the right value when is the front face is 0xFFFFFFFF.Marcos Vitali2018-12-101-1/+1
| |
* | gl_shader_decompiler: TLDS/TLD4/TLD4S Reworked reflecting the source registers, bugs fixed and modularize.Marcos Vitali2018-12-071-106/+134
|/
* gl_shader_decompiler: Implement TEXS.F16ReinUsesLisp2018-12-051-12/+49
|
* gl_shader_decompiler: Fixup inverted ifReinUsesLisp2018-12-051-6/+5
|
* Rewrited TEX/TEXS (TEX Scalar). (#1826)Marcos2018-12-041-259/+177
| | | | | | | | * Rewrited TEX/TEXS (TEX Scalar). * Style fixes. * Styles issues.
* Merge pull request #1822 from ReinUsesLisp/glsl-scopebunnei2018-12-031-250/+213
|\ | | | | gl_shader_decompiler: Introduce a scoped object and style changes
| * gl_shader_decompiler: Remove texture temporal in TLD4ReinUsesLisp2018-11-291-3/+1
| |
| * gl_shader_decompiler: Flip negated if else statementReinUsesLisp2018-11-291-3/+3
| |
| * gl_shader_decompiler: Use GLSL scope on instructions unrelated to texturesReinUsesLisp2018-11-291-35/+10
| |
| * gl_shader_decompiler: Move texture code generation into lambdasReinUsesLisp2018-11-291-97/+78
| |
| * gl_shader_decompiler: Clean up texture instructionsReinUsesLisp2018-11-291-87/+56
| |
| * gl_shader_decompiler: Scope GLSL variables with a scoped objectReinUsesLisp2018-11-291-32/+72
| |
* | gl_rasterizer: Enable clip distances when set in register and in shaderReinUsesLisp2018-11-291-1/+9
|/
* gl_shader_decompiler: Fixup clip distance indexReinUsesLisp2018-11-271-1/+1
|
* Merge pull request #1713 from FernandoS27/bra-ccbunnei2018-11-271-4/+14
|\ | | | | Implemented BRA CC conditional and FSET CC Setting
| * Implemented BRA CC conditional and FSET CC SettingFernandoS272018-11-241-4/+14
| |
* | Merge pull request #1798 from ReinUsesLisp/y-directionbunnei2018-11-271-1/+7
|\ \ | | | | | | gl_shader_decompiler: Implement S2R's Y_DIRECTION
| * | gl_shader_decompiler: Implement S2R's Y_DIRECTIONReinUsesLisp2018-11-251-1/+7
| |/
* | Merge pull request #1763 from ReinUsesLisp/bfibunnei2018-11-261-0/+20
|\ \ | | | | | | gl_shader_decompiler: Implement BFI_IMM_R
| * | gl_shader_decompiler: Implement BFI_IMM_RReinUsesLisp2018-11-211-0/+20
| | |
* | | Merge pull request #1760 from ReinUsesLisp/r2pbunnei2018-11-261-0/+28
|\ \ \ | | | | | | | | gl_shader_decompiler: Implement R2P_IMM
| * | | gl_shader_decompiler: Implement R2P_IMMReinUsesLisp2018-11-211-0/+28
| |/ /
* | | Merge pull request #1782 from FernandoS27/dcbunnei2018-11-261-116/+188
|\ \ \ | | | | | | | | Fixed Coordinate Encodings in TEX and TEXS instructions
| * | | Fix Texture OverlappingFernandoS272018-11-241-43/+70
| | | |
| * | | Fix TEXS Instruction encodingsFernandoS272018-11-241-22/+48
| | | |
| * | | Fix one encoding in TEX InstructionFernandoS272018-11-241-3/+3
| | | |
| * | | Corrected inputs indexing in TEX instructionFernandoS272018-11-241-66/+85
| | | |
* | | | Merge pull request #1783 from ReinUsesLisp/clip-distancesbunnei2018-11-261-20/+46
|\ \ \ \ | |_|_|/ |/| | | gl_shader_decompiler: Implement clip distances
| * | | gl_shader_decompiler: Implement clip distancesReinUsesLisp2018-11-231-20/+46
| | | |
* | | | Merge pull request #1769 from ReinUsesLisp/ccbunnei2018-11-241-66/+78
|\ \ \ \ | |_|/ / |/| | | gl_shader_decompiler: Rename cc to condition code and name internal flags
| * | | gl_shader_decompiler: Add a message for unimplemented cc generationReinUsesLisp2018-11-221-23/+46
| | | |
| * | | gl_shader_decompiler: Rename internal flag stringsReinUsesLisp2018-11-221-15/+20
| | | |
| * | | gl_shader_decompiler: Rename control codes to condition codesReinUsesLisp2018-11-221-63/+47
| |/ /
* | | Merge pull request #1744 from degasus/shader_cachebunnei2018-11-241-7/+20
|\ \ \ | | | | | | | | shader_cache: Only lock covered instructions.
| * | | shader_cache: Only lock covered instructions.Markus Wick2018-11-201-7/+20
| | |/ | |/|
* | | Added predicate comparison LessEqualWithNan (#1736)Hexagon122018-11-231-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | * Added predicate comparison LessEqualWithNan * oops * Clang fix
* | | Merge pull request #1756 from ReinUsesLisp/fix-texturesbunnei2018-11-231-60/+78
|\ \ \ | | | | | | | | gl_shader_decompiler: Fix register overwriting on texture calls
| * | | gl_shader_decompiler: Fix register overwriting on texture callsReinUsesLisp2018-11-221-60/+78
| | |/ | |/|
* | | Merge pull request #1766 from FernandoS27/fix-txqbunnei2018-11-231-2/+12
|\ \ \ | |/ / |/| | Properly Implemented TXQ Instruction
| * | Properly Implemented TXQ InstructionFernandoS272018-11-211-2/+12
| |/
* | Merge pull request #1752 from ReinUsesLisp/unimpl-decompilerbunnei2018-11-211-371/+258
|\ \ | | | | | | gl_shader_decompiler: Use UNIMPLEMENTED when applicable
| * | gl_shader_decompiler: Use UNIMPLEMENTED instead of LOG+UNREACHABLE when applicableReinUsesLisp2018-11-211-371/+258
| |/
* / gl_shader_decompiler: Remove UNREACHABLE when setting RZReinUsesLisp2018-11-211-2/+1
|/
* Merge pull request #1669 from ReinUsesLisp/fixup-gsbunnei2018-11-111-5/+9
|\ | | | | gl_shader_decompiler: Guard out of bound geometry shader input reads
| * gl_shader_decompiler: Guard out of bound geometry shader input readsReinUsesLisp2018-11-101-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 2darrayshadowFernandoS272018-11-081-1/+5
| |
* | Implement 3 coordinate array in TEXS instructionFernandoS272018-11-071-6/+6
|/
* Merge pull request #1527 from FernandoS27/assert-flowbunnei2018-11-011-2/+26
|\ | | | | Assert Control Flow Instructions using Control Codes
| * Assert Control Flow Instructions using Control CodesFernandoS272018-10-291-2/+26
| |
* | Merge pull request #1528 from FernandoS27/assert-control-codesbunnei2018-11-011-0/+98
|\ \ | | | | | | Assert Control Codes Generation on Shader Instructions
| * | Assert Control Codes GenerationFernandoS272018-10-301-0/+98
| |/
* / global: Use std::optional instead of boost::optional (#1578)Frederic L2018-10-301-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 FADD332FernandoS272018-10-281-68/+34
|
* Improved Shader accuracy on Vertex and Geometry Shaders with FFMA, FMUL and FADDFernandoS272018-10-281-3/+52
|
* Implemented LD_L and ST_LFernandoS272018-10-241-12/+76
|
* Implement Shader Local MemoryFernandoS272018-10-241-0/+37
|
* Implement PointSizeFernandoS272018-10-231-2/+27
|
* Merge pull request #1519 from ReinUsesLisp/vsetpbunnei2018-10-231-72/+93
|\ | | | | gl_shader_decompiler: Implement VSETP
| * gl_shader_decompiler: Implement VSETPReinUsesLisp2018-10-231-0/+24
| |
| * gl_shader_decompiler: Abstract VMAD into a video subsetReinUsesLisp2018-10-231-72/+69
| |
* | Merge pull request #1470 from FernandoS27/alpha_testingbunnei2018-10-231-2/+22
|\ \ | | | | | | Implemented Alpha Test using Shader Emulation
| * | Assert that multiple render targets are not set while alpha testingFernandoS272018-10-221-3/+2
| | |
| * | Use standard UBO and fix/stylize the codeFernandoS272018-10-221-41/+5
| | |
| * | Remove SyncAlphaTest and clang formatFernandoS272018-10-221-2/+3
| | |
| * | Added Alpha FuncFernandoS272018-10-221-2/+34
| | |
| * | Implemented Alpha TestingFernandoS272018-10-221-2/+26
| | |
* | | Merge pull request #1512 from ReinUsesLisp/brkbunnei2018-10-231-19/+36
|\ \ \ | |_|/ |/| | gl_shader_decompiler: Implement PBK and BRK
| * | gl_shader_decompiler: Implement PBK and BRKReinUsesLisp2018-10-181-19/+36
| | |
* | | Merge pull request #1550 from FernandoS27/fmul32bunnei2018-10-231-3/+4
|\ \ \ | | | | | | | | Added Saturation to FMUL32I
| * | | Added Saturation to FMUL32IFernandoS272018-10-231-3/+4
| | |/ | |/|
* | | Merge pull request #1537 from lioncash/shaderbunnei2018-10-231-6/+7
|\ \ \ | |/ / |/| | gl_shader_decompiler: Minor changes
| * | gl_shader_decompiler: Allow std::move to function in SetPredicateLioncash2018-10-201-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 warningsLioncash2018-10-201-2/+2
| | | | | | | | | | | | A variable with the same name was previously declared in an outer scope.
| * | gl_shader_decompiler: Fix a few comment typosLioncash2018-10-201-3/+4
| | |
* | | Fixed FSETP and FSETFernandoS272018-10-221-28/+12
|/ /
* | gl_shader_decompiler: Move position varying declaration back to gl_shader_genReinUsesLisp2018-10-201-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-floatbunnei2018-10-201-0/+313
|\ \ | | | | | | gl_shader_decompiler: Implement H* instructions
| * | gl_shader_decompiler: Implement HSET2_RReinUsesLisp2018-10-151-0/+44
| | |
| * | gl_shader_decompiler: Implement HSETP2_RReinUsesLisp2018-10-151-0/+45
| | |
| * | gl_shader_decompiler: Implement HFMA2 instructionsReinUsesLisp2018-10-151-0/+53
| | |
| * | gl_shader_decompiler: Implement HADD2_IMM and HMUL2_IMMReinUsesLisp2018-10-151-0/+43
| | |
| * | gl_shader_decompiler: Implement non-immediate HADD2 and HMUL2 instructionsReinUsesLisp2018-10-151-0/+50
| | |
| * | gl_shader_decompiler: Setup base for half float unpacking and settingReinUsesLisp2018-10-151-0/+78
| | |
* | | Merge pull request #1505 from FernandoS27/tex-3dbunnei2018-10-181-0/+1
|\ \ \ | | | | | | | | Implemented 3D Textures
| * | | Implement 3D TexturesFernandoS272018-10-181-0/+1
| | | |
* | | | Merge pull request #1489 from FernandoS27/fix-tldsbunnei2018-10-181-1/+5
|\ \ \ \ | |/ / / |/| | | shader_decompiler: Fix TLDS
| * | | Fix TLDSFernandoS272018-10-141-1/+5
| |/ /
* | | Merge pull request #1496 from FernandoS27/tex-arraybunnei2018-10-181-14/+55
|\ \ \ | |_|/ |/| | Implement Arrays on Tex Instruction
| * | Implement Arrays on Tex InstructionFernandoS272018-10-141-14/+55
| |/
* / gl_shader_decompiler: Fixup style inconsistenciesReinUsesLisp2018-10-151-5/+3
|/
* gl_shader_decompiler: Implement VMADReinUsesLisp2018-10-111-0/+82
|
* Merge pull request #1425 from ReinUsesLisp/geometry-shadersbunnei2018-10-101-60/+236
|\ | | | | gl_shader_decompiler: Implement geometry shaders
| * gl_shader_decompiler: Move position varying location from 15 to 0 and apply an offsetReinUsesLisp2018-10-071-6/+10
| |
| * gl_shader_decompiler: Implement geometry shadersReinUsesLisp2018-10-071-57/+229
| |
* | gl_shader_decompiler: Remove unused variables in TMML's implementationLioncash2018-10-091-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 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