summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_decompiler.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2018-06-07gl_shader_decompiler: Implement LD_C instruction.bunnei1-0/+27
2018-06-07gl_shader_gen: Add uniform handling for indirect const buffer access.bunnei1-0/+15
2018-06-06gl_shader_decompiler: Refactor uniform handling to allow different decodings.bunnei1-20/+19
2018-06-06gl_shader_decompiler: Fix un/signed mismatch with SHL.bunnei1-1/+1
2018-06-05GPU: Implemented the F2I_R shader instruction.Subv1-3/+44
2018-06-05gl_shader_decompiler: Fix typo with ISCADD instruction.bunnei1-1/+1
2018-06-05gl_shader_decompiler: Implement SHL instruction.bunnei1-1/+30
2018-06-05gl_shader_decompiler: Implement PredCondition::NotEqual.bunnei1-3/+3
2018-06-05GPU: Implement the ISCADD shader instructions.Subv1-0/+24
2018-06-05GPU: Implement predicated exit instructions in the shader programs.Subv1-4/+6
2018-06-05GPU: Take into account predicated exits when performing shader control flow analysis.Subv1-1/+10
2018-06-04GPU: Use the bf bit in FSET to determine whether to write 0xFFFFFFFF or 1.0f.Subv1-1/+6
2018-06-04GPU: Corrected the I2F_R implementation.Subv1-2/+12
2018-06-04GPU: Implemented the LOP32I instruction.Subv1-0/+43
2018-06-04GPU: Use explicit types when retrieving the uniform values for fsetp/fset and isetp instead of the type of an invalid output register.Subv1-9/+18
2018-06-04GPU: Implemented the ISETP_R and ISETP_C shader instructions.Subv1-0/+38
2018-06-04GPU: Partially implemented the shader BRA instruction.Subv1-1/+30
2018-06-03gl_shader_decompiler: Implement TEXS component mask.bunnei1-7/+10
2018-06-03gl_shader_decompiler: Implement RRO as a register move.bunnei1-6/+11
2018-06-01gl_shader_decompiler: Implement TEX instruction.bunnei1-1/+26
2018-06-01gl_shader_decompiler: Support multi-destination for TEXS.bunnei1-2/+18
2018-05-30Shaders: Implemented reading the gl_InstanceID and gl_VertexID variables in the vertex shader.Subv1-1/+7
2018-05-30gl_shader_decompiler: F2F_R instruction: Implement abs.bunnei1-1/+7
2018-05-30gl_shader_decompiler: Partially implement F2F_R instruction.bunnei1-1/+6
2018-05-26gl_shader_decompiler: Implement GetPredicateComparison GreaterEqual.bunnei1-4/+3
2018-05-26shader_bytecode: Implement other variants of FMNMX.bunnei1-1/+3
2018-05-25Shader: Implemented compound predicates in fset.Subv1-28/+12
You can specify a predicate in the fset instruction: Result = ((Value1 Comp Value2) OP P0) ? 1.0 : 0.0;
2018-05-25Shader: Implemented compound predicates in fsetp.Subv1-19/+55
You can specify three predicates in an fsetp instruction: P1 = (Value1 Comp Value2) OP P0; P2 = !(Value1 Comp Value2) OP P0;
2018-05-21Shaders: Implemented the FMNMX shader instruction.Subv1-6/+21
2018-04-29gl_shader_decompiler: Implement MOV_R.bunnei1-1/+2
2018-04-29Shaders: Implemented predicate condition 3 (LessEqual) in the fset and fsetp instructions.Subv1-0/+7
2018-04-29gl_shader_decompiler: Implement MOV_C.bunnei1-0/+5
2018-04-29gl_shader_decompiler: Partially implement I2I_R, and I2F_R.bunnei1-0/+26
2018-04-29gl_shader_decompiler: More cleanups, etc. with how we handle register types.bunnei1-44/+120
2018-04-29GLSLRegister: Simplify register declarations, etc.bunnei1-63/+31
2018-04-29gl_shader_decompiler: Implement MOV32_IMM instruction.bunnei1-0/+5
2018-04-27gl_shader_decompiler: Add GLSLRegisterManager class to track register state.bunnei1-154/+262
2018-04-26gl_shader_decompiler: Boilerplate for handling integer instructions.bunnei1-5/+102
2018-04-26gl_shader_decompiler: Move color output to EXIT instruction.bunnei1-6/+12
2018-04-25Shaders: Implemented the FSET instruction.Subv1-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.
2018-04-25Shaders: Added decodings for the FSET instructions.Subv1-1/+1
2018-04-21gl_shader_decompiler: Skip RRO instruction.bunnei1-0/+4
2018-04-21gl_shader_decompiler: Cleanup error logging.bunnei1-14/+6
2018-04-21shader_bytecode: Decode instructions based on bit strings.bunnei1-20/+29
2018-04-21ShaderGen: Implemented the KIL instruction, which is equivalent to 'discard'.Subv1-1/+7
2018-04-21ShaderGen: Implemented predicated instruction execution.Subv1-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.
2018-04-21ShaderGen: Implemented the fsetp instruction.Subv1-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.
2018-04-20ShaderGen: Register id 255 is special and is hardcoded to return 0 (SR_ZERO).Subv1-0/+2
2018-04-20ShaderGen: Ignore the 'sched' instruction when generating shaders.Subv1-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).
2018-04-20glsl_shader_decompiler: Use std::string_view instead of std::string for AddLine()Lioncash1-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.
2018-04-20glsl_shader_decompiler: Add AddNewLine() function to ShaderWriterLioncash1-6/+12
Avoids constructing a std::string just to append a newline character
2018-04-20glsl_shader_decompiler: Add char overload for ShaderWriter's AddLine()Lioncash1-4/+11
Avoids constructing a std::string just to append a character.
2018-04-20glsl_shader_decompiler: Append indentation without constructing a separate std::stringLioncash1-1/+5
The interface of std::string already lets us append N copies of a character to an existing string.
2018-04-19ShaderGen: Implemented the fmul32i shader instruction.Subv1-6/+16
2018-04-19ShaderGen: Fixed a case where the TEXS instruction would use the same registers for the input and the output.Subv1-2/+9
It will now save the coords before writing the outputs in a subscope.
2018-04-17gl_shader_decompiler: Fix warnings with MarkAsUsed.bunnei1-1/+2
2018-04-17gl_shader_decompiler: Cleanup logging, updating to NGLOG_*.bunnei1-24/+22
2018-04-17gl_shader_decompiler: Implement several MUFU subops and abs_d.bunnei1-7/+21
2018-04-17gl_shader_decompiler: Fix swizzle in GetRegister.bunnei1-1/+1
2018-04-17gl_shader_decompiler: Implement FMUL/FADD/FFMA immediate instructions.bunnei1-12/+39
2018-04-17gl_shader_decompiler: Allow vertex position to be used in fragment shader.bunnei1-15/+13
2018-04-17gl_shader_decompiler: Implement IPA instruction.bunnei1-0/+11
2018-04-17gl_shader_decompiler: Add support for TEXS instruction.bunnei1-7/+29
2018-04-17gl_shader_decompiler: Use fragment output color for GPR 0-3.bunnei1-0/+5
2018-04-17gl_shader_decompiler: Partially implement MUFU.bunnei1-2/+11
2018-04-15GPU: Use the same buffer names in the generated GLSL and the buffer uploading code.Subv1-3/+2
2018-04-15shaders: Expose hints about used const buffers.bunnei1-8/+32
2018-04-14shaders: Address PR review feedback.bunnei1-6/+8
2018-04-14gl_shader_decompiler: Cleanup log statements.bunnei1-15/+15
2018-04-14shaders: Fix GCC and clang build issues.bunnei1-1/+1
2018-04-14gl_shader_decompiler: Implement negate, abs, etc. and lots of cleanup.bunnei1-20/+57
2018-04-14gl_shader_decompiler: Add shader stage hint.bunnei1-4/+7
2018-04-14gl_shader_decompiler: Basic impl. for very simple vertex shaders.bunnei1-8/+307
- Tested with Puyo Puyo Tetris and Cave Story+
2018-04-14gl_shader_decompiler: Add skeleton code from Citra for shader analysis.bunnei1-33/+134
2018-03-27renderer_opengl: Logging, etc. cleanup.bunnei1-1/+1
2018-03-20renderer_gl: Port over gl_shader_decompiler module from Citra.bunnei1-0/+58