Yuri Kunde Schlesner
a4a4b6408c
VideoCore: Rename some types to more accurate names
9 years ago
Yuri Kunde Schlesner
ab0b74b0f3
VideoCore/Shader: Move entry_point to SetupBatch
9 years ago
Yuri Kunde Schlesner
1994f1a6f2
VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetup
9 years ago
Yuri Kunde Schlesner
c863fc36ce
Shader: Remove OutputRegisters struct
9 years ago
Yuri Kunde Schlesner
b0ec4da3b0
Shader: Initialize conditional_code in interpreter
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.
9 years ago
Yuri Kunde Schlesner
e500250c97
Shader: Don't read ShaderSetup from global state
9 years ago
Yuri Kunde Schlesner
931a2b0ca4
VideoCore/Shader: Split interpreter and JIT into separate ShaderEngines
9 years ago
Jonathan Hao
1df720ed08
Fix some warnings ( #2399 )
9 years ago
Yuri Kunde Schlesner
7d4827f520
VideoCore/Shader: Extract DebugData out from UnitState
9 years ago
Yuri Kunde Schlesner
d94a04ced7
VideoCore/Shader: Extract evaluate_condition lambda to function scope
9 years ago
Yuri Kunde Schlesner
fc3d8c77c8
VideoCore/Shader: Extract call lambda up a scope and remove unused param
9 years ago
Yuri Kunde Schlesner
ec7b3940b0
VideoCore/Shader: Move DebugData to a separate file
9 years ago
Yuri Kunde Schlesner
d4bcba2ca1
VideoCore: Shader interpreter cleanups
9 years ago
Yuri Kunde Schlesner
fa5d9d8266
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
1138ec0d49
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
1e4a5da9f4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
9 years ago
Yuri Kunde Schlesner
300e68c5df
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
df3eeea302
Retrieve shader result from new OutputRegisters-type
10 years ago
Jannik Vogel
208a74a882
Use new shader-jit signature for interpreter
10 years ago
Jannik Vogel
ad0acfea14
Move program_counter and call_stack from UnitState to interpreter
10 years ago
Emmanuel Gil Peyrot
c39a267974
VideoCore: Run include-what-you-use and fix most includes.
10 years ago
Lioncash
7b2af63608
video_core: Don't cast away const
10 years ago
Lioncash
6d9e7e962b
shader_interpreter: use std::inner_product for the dot product
Same thing, less code.
10 years ago
Jannik Vogel
9e29ed3f66
PICA: Fix MAD/MADI encoding
10 years ago
Dwayne Slater
141fe87a0f
Add immediate mode vertex submission
10 years ago
Yuri Kunde Schlesner
b4c68589f6
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
2cd98a45cb
video_core: Reorganize headers
10 years ago
Yuri Kunde Schlesner
8b0a7e7afe
Shaders: Explicitly conform to PICA semantics in MAX/MIN
11 years ago
aroulin
8367db5dcd
Shader: Use std::sqrt for float instead of sqrt
11 years ago
aroulin
2bcee80587
Shader: RCP and RSQ computes only the 1st component
11 years ago
aroulin
677a97c8bf
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
76afa48b0c
Shader: implement SGE, SGEI in interpreter
11 years ago
aroulin
7ca01b779f
Shader: implement EX2 and LG2 in interpreter
11 years ago
Tony Wasserka
1c1a9ab09b
Introduce a shader tracer to allow inspection of input/output values for each processed instruction.
11 years ago
bunnei
5c7e9ffce7
Shader: Use a POD struct for registers.
11 years ago
bunnei
5794310781
Shader: Define a common interface for running vertex shader programs.
11 years ago
bunnei
2d100ebae3
Shader: Move shader code to its own subdirectory, "shader".
11 years ago
bunnei
f622a78544
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