Yuri Kunde Schlesner
960578f4e1
VideoCore/Shader: Extract call lambda up a scope and remove unused param
9 years ago
Yuri Kunde Schlesner
d27cb1dedc
VideoCore/Shader: Move DebugData to a separate file
9 years ago
Yuri Kunde Schlesner
d9a904f9cb
VideoCore: Shader interpreter cleanups
9 years ago
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
ebdae19fd2
Remove empty newlines in #include blocks.
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
9 years ago
Yuri Kunde Schlesner
a3afeb4687
VideoCore: Fix dangling lambda context in shader interpreter
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.
9 years ago
Jannik Vogel
ff0fa86b17
Retrieve shader result from new OutputRegisters-type
10 years ago
Jannik Vogel
1308afe2c2
Use new shader-jit signature for interpreter
10 years ago
Jannik Vogel
7e756faaba
Move program_counter and call_stack from UnitState to interpreter
10 years ago
Emmanuel Gil Peyrot
691a42fe98
VideoCore: Run include-what-you-use and fix most includes.
10 years ago
Lioncash
63e956cc7a
video_core: Don't cast away const
10 years ago
Lioncash
4d89df8df2
shader_interpreter: use std::inner_product for the dot product
Same thing, less code.
10 years ago
Jannik Vogel
9aad2f29bb
PICA: Fix MAD/MADI encoding
10 years ago
Dwayne Slater
6b775034dd
Add immediate mode vertex submission
10 years ago
Yuri Kunde Schlesner
083d2d89a5
Shader: Implement "invert condition" feature of IFU instruction
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.
10 years ago
Lioncash
aec28ed91e
video_core: Reorganize headers
10 years ago
Yuri Kunde Schlesner
082b74fa24
Shaders: Explicitly conform to PICA semantics in MAX/MIN
10 years ago
aroulin
03c5cfead4
Shader: Use std::sqrt for float instead of sqrt
10 years ago
aroulin
fa552f11ef
Shader: RCP and RSQ computes only the 1st component
10 years ago
aroulin
2e7cf2f6cf
Shader: implement DPH/DPHI in interpreter
Tests revealed that the component with w=1 is
SRC1 and not SRC2, it is now fixed on 3dbrew.
11 years ago
aroulin
863730f6a7
Shader: implement SGE, SGEI in interpreter
11 years ago
aroulin
638e47c04d
Shader: implement EX2 and LG2 in interpreter
11 years ago
Tony Wasserka
33ba604fd9
Introduce a shader tracer to allow inspection of input/output values for each processed instruction.
11 years ago
bunnei
db97090cad
Shader: Use a POD struct for registers.
11 years ago
bunnei
3f69c2039d
Shader: Define a common interface for running vertex shader programs.
11 years ago
bunnei
18527b9e21
Shader: Move shader code to its own subdirectory, "shader".
11 years ago
bunnei
642b9b5030
GPU: Refactor "VertexShader" namespace to "Shader".
- Also renames "vertex_shader.*" to "shader_interpreter.*"
11 years ago
Yuri Kunde Schlesner
4909a1486e
Videocore: Simplify variables in vertex shader interpreter
Simplifies the code and gives a tiny speed-up.
11 years ago
Yuri Kunde Schlesner
877d2a0e48
Videocore: Replace std::stack in shader interpreter with static_vector
Shaves off 1/3rd of the vertex shader time in Fire Emblem
11 years ago
Yuri Kunde Schlesner
13347997ba
VideoCore: #ifdef out some debugging routines
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.
11 years ago
Yuri Kunde Schlesner
4e09202226
VideoCore: Saturate vertex colors before interpolating
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.
11 years ago
Yuri Kunde Schlesner
5a75cf8fd2
Pica: Fix DP3 instruction, which wasn't assigning to the w component
11 years ago
zawata
6933a50aeb
Vertex Shader : Undo casting
11 years ago
zawata
716120da3d
Video_Core : Fix Conversion Warnings
11 years ago
Tony Wasserka
33568494af
Pica/Shader: Add geometry shader definitions.
11 years ago
bunnei
1574c44586
vertex_shader: Use address offset on src2 in inverted mode.
11 years ago
bunnei
4ac6c1a3b5
vertex_shader: Implement SLT/SLTI instructions.
11 years ago
bunnei
875bd29766
vertex_shader: Implement MIN instruction.
11 years ago
Emmanuel Gil Peyrot
b1503b2020
Remove every trailing whitespace from the project (but externals).
11 years ago
bunnei
1b42d55a9d
Pica: Create 'State' structure and move state memory there.
11 years ago
Yuri Kunde Schlesner
7ada357b2d
Memmap: Re-organize memory function in two files
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.
11 years ago
Yuri Kunde Schlesner
def5913d19
GPU: Add more fine grained profiling for vertex shader and rasterization
11 years ago
bunnei
692a74c09e
vertex_shader: Implement FLR instruction.
11 years ago
bunnei
f935130a0f
vertex_shader: Implement MADI instruction.
nihstro: Update submodule to latest upstream/master to support MADI instruction decoding.
11 years ago
Subv
0e5ca080a8
GPU: Implemented default vertex shader attributes.
Fixes some games crashing.
11 years ago
Tony Wasserka
e4f5ec6272
Pica/VertexShader: Fix a bug caused due to incorrect assumptions of consecutive output register tables.
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.
11 years ago
archshift
7d43aef4d0
Update nihstro submodule to the initial release version.
Includes more opcodes to implement in the future.
11 years ago
Subv
9a03e9c61d
Pica/VertexShader: Fixed LOOP with more than one iteration.
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.
11 years ago