summaryrefslogtreecommitdiffstats
path: root/src/video_core/shader/shader_interpreter.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-01-30VideoCore: Consistently use shader configuration to load attributesYuri Kunde Schlesner1-2/+2
2017-01-30VideoCore: Rename some types to more accurate namesYuri Kunde Schlesner1-2/+2
2017-01-26VideoCore/Shader: Move entry_point to SetupBatchYuri Kunde Schlesner1-10/+9
2017-01-26VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetupYuri Kunde Schlesner1-9/+7
2017-01-26Shader: Remove OutputRegisters structYuri Kunde Schlesner1-2/+2
2017-01-26Shader: Initialize conditional_code in interpreterYuri Kunde Schlesner1-0/+3
This doesn't belong in LoadInputVertex because it also happens for non-VS invocations. Since it's not used by the JIT it seems adequate to initialize it in the interpreter which is the only thing that cares about them.
2017-01-26Shader: Don't read ShaderSetup from global stateYuri Kunde Schlesner1-3/+3
2017-01-26VideoCore/Shader: Split interpreter and JIT into separate ShaderEnginesYuri Kunde Schlesner1-5/+34
2017-01-04Fix some warnings (#2399)Jonathan Hao1-2/+0
2016-12-16VideoCore/Shader: Extract DebugData out from UnitStateYuri Kunde Schlesner1-74/+72
2016-12-16VideoCore/Shader: Extract evaluate_condition lambda to function scopeYuri Kunde Schlesner1-26/+24
2016-12-16VideoCore/Shader: Extract call lambda up a scope and remove unused paramYuri Kunde Schlesner1-21/+17
2016-12-16VideoCore/Shader: Move DebugData to a separate fileYuri Kunde Schlesner1-0/+1
2016-09-30VideoCore: Shader interpreter cleanupsYuri Kunde Schlesner1-32/+42
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-4/+1
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-3/+2
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-143/+147
2016-09-16VideoCore: Fix dangling lambda context in shader interpreterYuri Kunde Schlesner1-1/+1
The static meant that after the first execution, these lambda context would be pointing to a random location on the stack. Fixes a random crash when using the interpreter.
2016-05-16Retrieve shader result from new OutputRegisters-typeJannik Vogel1-2/+2
2016-05-13Use new shader-jit signature for interpreterJannik Vogel1-4/+4
2016-05-12Move program_counter and call_stack from UnitState to interpreterJannik Vogel1-26/+42
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot1-2/+10
2016-03-17video_core: Don't cast away constLioncash1-1/+1
2016-03-17shader_interpreter: use std::inner_product for the dot productLioncash1-5/+3
Same thing, less code.
2016-03-15PICA: Fix MAD/MADI encodingJannik Vogel1-2/+5
2016-03-03Add immediate mode vertex submissionDwayne Slater1-0/+1
2016-01-25Shader: Implement "invert condition" feature of IFU instructionYuri Kunde Schlesner1-1/+2
If the bit 0 of the JMPU instruction is set, then the jump condition will be inverted. That is, a jump will happen when the boolean is false instead of when it is true.
2015-09-11video_core: Reorganize headersLioncash1-3/+2
2015-08-24Shaders: Explicitly conform to PICA semantics in MAX/MINYuri Kunde Schlesner1-2/+8
2015-08-23Shader: Use std::sqrt for float instead of sqrtaroulin1-1/+1
2015-08-23Shader: RCP and RSQ computes only the 1st componentaroulin1-6/+4
2015-08-22Shader: implement DPH/DPHI in interpreteraroulin1-1/+8
Tests revealed that the component with w=1 is SRC1 and not SRC2, it is now fixed on 3dbrew.
2015-08-19Shader: implement SGE, SGEI in interpreteraroulin1-0/+14
2015-08-16Shader: implement EX2 and LG2 in interpreteraroulin1-0/+36
2015-08-16Introduce a shader tracer to allow inspection of input/output values for each processed instruction.Tony Wasserka1-22/+82
2015-08-16Shader: Use a POD struct for registers.bunnei1-6/+6
2015-08-15Shader: Define a common interface for running vertex shader programs.bunnei1-128/+7
2015-08-15Shader: Move shader code to its own subdirectory, "shader".bunnei1-3/+3
2015-08-15GPU: Refactor "VertexShader" namespace to "Shader".bunnei1-7/+7
- Also renames "vertex_shader.*" to "shader_interpreter.*"
2015-07-26Videocore: Simplify variables in vertex shader interpreterYuri Kunde Schlesner1-24/+21
Simplifies the code and gives a tiny speed-up.
2015-07-26Videocore: Replace std::stack in shader interpreter with static_vectorYuri Kunde Schlesner1-6/+6
Shaves off 1/3rd of the vertex shader time in Fire Emblem
2015-07-26VideoCore: #ifdef out some debugging routinesYuri Kunde Schlesner1-0/+2
Some disabled debugging functionality was being called from rendering routines in VideoCore. Although disabled, many of them still allocated memory or did some extra work that was enough to show up in a profiler. Gives a slight (~2ms) speedup.
2015-07-23VideoCore: Saturate vertex colors before interpolatingYuri Kunde Schlesner1-0/+6
During testing, it was discovered that hardware does not interpolate colors output by the vertex shader as-is. Rather, it drops the sign and saturates the value to 1.0. This is done before interpolation, such that (e.g.) interpolating outputs 1.5 and -0.5 is equivalent to as if the shader had output the values 1.0 and 0.5 instead, with the interpolated value never crossing 0.0. This change has been tested against hardware.
2015-07-20Pica: Fix DP3 instruction, which wasn't assigning to the w componentYuri Kunde Schlesner1-1/+1
2015-07-19Vertex Shader : Undo castingzawata1-1/+1
2015-07-19Video_Core : Fix Conversion Warningszawata1-1/+1
2015-07-15Pica/Shader: Add geometry shader definitions.Tony Wasserka1-9/+7
2015-05-31vertex_shader: Use address offset on src2 in inverted mode.bunnei1-3/+3
2015-05-31vertex_shader: Implement SLT/SLTI instructions.bunnei1-4/+10
2015-05-31vertex_shader: Implement MIN instruction.bunnei1-0/+9
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-2/+2
2015-05-23Pica: Create 'State' structure and move state memory there.bunnei1-69/+27
2015-05-15Memmap: Re-organize memory function in two filesYuri Kunde Schlesner1-2/+0
memory.cpp/h contains definitions related to acessing memory and configuring the address space mem_map.cpp/h contains higher-level definitions related to configuring the address space accoording to the kernel and allocating memory.
2015-05-12GPU: Add more fine grained profiling for vertex shader and rasterizationYuri Kunde Schlesner1-0/+5
2015-05-10vertex_shader: Implement FLR instruction.bunnei1-0/+9
2015-05-10vertex_shader: Implement MADI instruction.bunnei1-4/+7
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
2015-05-07GPU: Implemented default vertex shader attributes.Subv1-16/+23
Fixes some games crashing.
2015-03-12Pica/VertexShader: Fix a bug caused due to incorrect assumptions of consecutive output register tables.Tony Wasserka1-20/+24
We now write create a temporary buffer for output registers and copy all of them to the actual output vertex structure after the shader has run. This is technically not necessary, but it's easier to vectorize in the future.
2015-03-08Update nihstro submodule to the initial release version.archshift1-37/+38
Includes more opcodes to implement in the future.
2015-02-21Pica/VertexShader: Fixed LOOP with more than one iteration.Subv1-1/+4
Previously it wouldn't jump back to the start of the loop code once it reached the end of the block. Fixes the texture problems in a lot of games.
2015-02-18Pica/VertexShader: Implement the LOOP instruction.Tony Wasserka1-14/+36
2015-02-12Build: Fixed some warningsSubv1-2/+2
2015-02-11Asserts: break/crash program, fit to style guide; log.h->assert.harchshift1-8/+5
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-01-13Pica/VertexShader: Implement JMPC/JMPU/CALLC/CALLU.Tony Wasserka1-23/+52
2015-01-13Pica/VertexShader: Implement the MAD instruction.Tony Wasserka1-0/+69
2014-12-31Pica/VertexShader: Coding style fixes.Tony Wasserka1-16/+8
2014-12-31Pica/CommandProcessor: Add support for integer uniforms.Tony Wasserka1-0/+7
2014-12-29Vertex Shader: Zero OutputVertex to avoid denormalsYuri Kunde Schlesner1-0/+4
Unused OutputVertex attributes were being left un-initialized. The leftover garbage sometimes decoded as floating-point denormalized values, causing fallbacks to microcode and massive slowdowns in the rest of the rasterization pipeline even though the results were unused. By zeroing the structure we ensure these attributes only contain harmless zeros.
2014-12-21Fix visual studio ambiguous symbol errorApology111-4/+4
2014-12-21License changepurpasmart961-1/+1
2014-12-20Pica/VertexShader: Promote a log message to critical status.Tony Wasserka1-1/+1
2014-12-20Pica/VertexShader: Small optimization.Tony Wasserka1-7/+7
2014-12-20Pica/VertexShader: Be robust against invalid inputs.Tony Wasserka1-2/+9
More specifically, this also fixes crashes by Citra trying to load a src2 register even if the current instruction does not use that.
2014-12-20Pica/VertexShader: Clarify a comment.Tony Wasserka1-1/+3
2014-12-20Pica/VertexShader: Cleanup flow control logic and implement CMP/IFU instructions.Tony Wasserka1-50/+56
2014-12-20Pica/VertexShader: Run instruction handlers according to the effective opcode.Tony Wasserka1-1/+1
This allows for proper emulation of the different CMP/LRP/MAD instructions.
2014-12-20Pica/VertexShader: Implement MAX instructions.Tony Wasserka1-0/+9
2014-12-20Pica: Add support for boolean uniforms.Tony Wasserka1-1/+7
2014-12-20Pica/VertexShader: Add support for MOVA, CMP and IFC.Tony Wasserka1-7/+130
2014-12-20Pica/VertexShader: Move code around a bit.Tony Wasserka1-42/+58
2014-12-20Pica/VertexShader: Some cleanups using std::array.Tony Wasserka1-5/+16
2014-12-20Pica/VertexShader: Support negating src2.Tony Wasserka1-2/+9
2014-12-20Pica/VertexShader: Remove (now) duplicated shader bytecode definitions in favor of nihstro's ones.Tony Wasserka1-13/+30
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-3/+3
2014-12-07Integrate Boost into build system and perform a trivial cleanup in vertex_shader.cpp.Tony Wasserka1-6/+10
2014-10-08Fix warnings in video_coreLioncash1-1/+1
2014-08-25Pica/VertexShader: Fix a bug in the call stack handling.Tony Wasserka1-2/+3
2014-08-25Pica/VertexShader: Fix a bug in the bitfield definitions and add the "negate" field for swizzlers.Tony Wasserka1-11/+17
2014-08-25Pica: Add debug utilities for dumping shaders.Tony Wasserka1-0/+18
2014-08-12Pica: Add vertex shader implementation.Tony Wasserka1-0/+270