aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader
AgeCommit message (Collapse)Author
2017-09-17Improved performance of FromAttributeBufferHuw Pascoe
Ternary operator is optimized by the compiler whereas std::min() is meant to return a value. I've noticed a 5%-10% emulation speed increase.
2017-08-19pica/shader/jit: implement SETEMIT and EMITwwylele
2017-08-19correct constnesswwylele
2017-08-19pica/shader/interpreter: implement SETEMIT and EMITwwylele
2017-08-19pica/shader: extend UnitState for GSwwylele
Among four shader units in pica, a special unit can be configured to run both VS and GS program. GSUnitState represents this unit, which extends UnitState (which represents the other three normal units) with extra state for primitive emitting. It uses lots of raw pointers to represent internal structure in order to keep it standard layout type for JIT to access. This unit doesn't handle triangle winding (inverting) itself; instead, it calls a WindingSetter handler. This will be explained in the following commits
2017-07-27pica/shader_interpreter: fix off-by-one in LOOPwwylele
2017-06-17Stop using reserved operator names (and/or/xor) with XbyakYuri Kunde Schlesner
Also has the Dynarmic upgrade with the same change
2017-05-11Pica: Set program code / swizzle data limit to 4096Jannik Vogel
One of the later commits will enable writing to GS regs. It turns out that on startup, most games will write 4096 GS program words. The current limit of 1024 would hence result in 3072 (4096 - 1024) error messages: ``` HW.GPU <Error> video_core/shader/shader.cpp:WriteProgramCode:229: Invalid GS program offset 1024 ``` New constants have been introduced to represent these limits. The swizzle data size has also been raised. This matches the given field sizes of [GPUREG_SH_OPDESCS_INDEX](https://3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_OPDESCS_INDEX) and [GPUREG_SH_CODETRANSFER_INDEX](https://www.3dbrew.org/wiki/GPU/Internal_Registers#GPUREG_SH_CODETRANSFER_INDEX) (12 bit = [0; 4095]).
2017-02-26Doxygen: Amend minor issues (#2593)Mat M
Corrects a few issues with regards to Doxygen documentation, for example: - Incorrect parameter referencing. - Missing @param tags. - Typos in @param tags. and a few minor other issues.
2017-02-12video_core/shader: Document sanitized MUL operationYuri Kunde Schlesner
2017-02-12Merge pull request #2550 from yuriks/pica-refactor2Yuri Kunde Schlesner
Small VideoCore cleanups
2017-02-10video_core: Fix benign out-of-bounds indexing of array (#2553)Yuri Kunde Schlesner
The resulting pointer wasn't written to unless the index was verified as valid, but that's still UB and triggered debug checks in MSVC. Reported by garrettboast on IRC
2017-02-09VideoCore: Split regs.h inclusionsYuri Kunde Schlesner
2017-02-04VideoCore: Move Regs to its own fileYuri Kunde Schlesner
2017-02-04VideoCore: Split shader regs from Regs structYuri Kunde Schlesner
2017-02-04VideoCore: Split rasterizer regs from Regs structYuri Kunde Schlesner
2017-02-04Merge pull request #2476 from yuriks/shader-refactor3Yuri Kunde Schlesner
Oh No! More shader changes!
2017-02-03ShaderJIT: add 16 dummy bytes at the bottom of the stackwwylele
2017-01-31Common/x64: remove legacy emitter and abi (#2504)Weiyi Wang
These are not used any more since we moved shader JIT to xbyak.
2017-01-31shader_jit_x64_compiler: esi and edi should be persistent (#2500)Merry
2017-01-29VideoCore: Extract swrast-specific data from OutputVertexYuri Kunde Schlesner
2017-01-29VideoCore/Shader: Clean up OutputVertex::FromAttributeBufferYuri Kunde Schlesner
This also fixes a long-standing but neverthless harmless memory corruption bug, whech the padding of the OutputVertex struct would get corrupted by unused attributes.
2017-01-29VideoCore: Split shader output writing from semantic loadingYuri Kunde Schlesner
2017-01-29VideoCore: Consistently use shader configuration to load attributesYuri Kunde Schlesner
2017-01-29VideoCore: Rename some types to more accurate namesYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Move entry_point to SetupBatchYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetupYuri Kunde Schlesner
2017-01-25Shader: Remove OutputRegisters structYuri Kunde Schlesner
2017-01-25Shader: Initialize conditional_code in interpreterYuri Kunde Schlesner
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-25Shader: Don't read ShaderSetup from global stateYuri Kunde Schlesner
2017-01-25shader_jit_x64: Don't read program from global stateYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Move ProduceDebugInfo to InterpreterEngineYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Split interpreter and JIT into separate ShaderEnginesYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Rename shader_jit_x64{ => _compiler}.{cpp,h}Yuri Kunde Schlesner
2017-01-25VideoCore/Shader: Split shader uniform state and shader engineYuri Kunde Schlesner
Currently there's only a single dummy implementation, which will be split in a following commit.
2017-01-25VideoCore/Shader: Add constness to methodsYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Use only entry_point as ShaderSetup paramYuri Kunde Schlesner
This removes all implicit dependency of ShaderState on global PICA state.
2017-01-25VideoCore/Shader: Use self instead of g_state.vs in ShaderSetupYuri Kunde Schlesner
2017-01-25VideoCore/Shader: Extract input vertex loading code into functionYuri Kunde Schlesner
2017-01-23video_core: fix shader.cpp signed / unsigned warningKloen
2017-01-04Fix some warnings (#2399)Jonathan Hao
2016-12-16VideoCore/Shader: Extract DebugData out from UnitStateYuri Kunde Schlesner
2016-12-16Remove unnecessary castYuri Kunde Schlesner
2016-12-16VideoCore/Shader: Extract evaluate_condition lambda to function scopeYuri Kunde Schlesner
2016-12-15VideoCore/Shader: Extract call lambda up a scope and remove unused paramYuri Kunde Schlesner
2016-12-15VideoCore/Shader: Remove dynamic control flow in (Get)UniformOffsetYuri Kunde Schlesner
2016-12-15VideoCore/Shader: Move DebugData to a separate fileYuri Kunde Schlesner
2016-12-15shader_jit_x64: Use LOOPCOUNT_REG as a 64-bit reg when indexingYuri Kunde Schlesner
2016-12-14VideoCore: Eliminate an unnecessary copy in the drawcall loopYuri Kunde Schlesner
2016-12-14shader_jit_x64: Use Reg32 for LOOP* registers, eliminating castsYuri Kunde Schlesner