Commit graph

55 commits

Author SHA1 Message Date
Yuri Kunde Schlesner
08df8f7d7a VideoCore: Split shader regs from Regs struct 2017-02-04 13:59:11 -08:00
Yuri Kunde Schlesner
d3928b7f9a VideoCore: Split rasterizer regs from Regs struct 2017-02-04 13:08:47 -08:00
Yuri Kunde Schlesner
1a3c583a0f VideoCore: Extract swrast-specific data from OutputVertex 2017-01-29 21:31:38 -08:00
Yuri Kunde Schlesner
bf1614c693 VideoCore/Shader: Clean up OutputVertex::FromAttributeBuffer
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-29 21:31:38 -08:00
Yuri Kunde Schlesner
dcdaff5ecc VideoCore: Split shader output writing from semantic loading 2017-01-29 21:31:37 -08:00
Yuri Kunde Schlesner
067b9b54bd VideoCore: Consistently use shader configuration to load attributes 2017-01-29 21:31:37 -08:00
Yuri Kunde Schlesner
a4a4b6408c VideoCore: Rename some types to more accurate names 2017-01-29 21:31:36 -08:00
Yuri Kunde Schlesner
c863fc36ce Shader: Remove OutputRegisters struct 2017-01-25 18:53:25 -08:00
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.
2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
931a2b0ca4 VideoCore/Shader: Split interpreter and JIT into separate ShaderEngines 2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
88b533871e VideoCore/Shader: Rename shader_jit_x64{ => _compiler}.{cpp,h} 2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
73e7bc2592 VideoCore/Shader: Split shader uniform state and shader engine
Currently there's only a single dummy implementation, which will be
split in a following commit.
2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
f887eccd74 VideoCore/Shader: Add constness to methods 2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
03d2b6aa89 VideoCore/Shader: Use only entry_point as ShaderSetup param
This removes all implicit dependency of ShaderState on global PICA
state.
2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
d6533112fe VideoCore/Shader: Use self instead of g_state.vs in ShaderSetup 2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
2771bde17a VideoCore/Shader: Extract input vertex loading code into function 2017-01-25 18:53:20 -08:00
Kloen
55c137a3ab video_core: fix shader.cpp signed / unsigned warning 2017-01-23 16:53:31 +01:00
Yuri Kunde Schlesner
7d4827f520 VideoCore/Shader: Extract DebugData out from UnitState 2016-12-16 00:16:25 -08:00
Yuri Kunde Schlesner
d8fc6ee91b VideoCore: Eliminate an unnecessary copy in the drawcall loop 2016-12-14 21:00:29 -08:00
Yuri Kunde Schlesner
7872ec7cc3 VideoCore: Fix out-of-bounds read in ShaderSetup::ProduceDebugInfo
As far as I can tell, memset was replaced by a fill without correcting
the parameter type, causing an out-of-bounds array read in the Vec4
constructor.
2016-09-29 21:11:36 -07:00
Yuri Kunde Schlesner
fa5d9d8266 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
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.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
1e4a5da9f4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Jannik Vogel
df3eeea302 Retrieve shader result from new OutputRegisters-type 2016-05-16 18:55:51 +02:00
Jannik Vogel
208a74a882 Use new shader-jit signature for interpreter 2016-05-13 09:41:55 +02:00
Jannik Vogel
b3e96d8e29 Refactor access to state in shader-jit 2016-05-13 09:20:14 +02:00
Jannik Vogel
ad0acfea14 Move program_counter and call_stack from UnitState to interpreter 2016-05-12 19:05:42 +02:00
Jannik Vogel
acfb5257dd Turn ShaderSetup into struct 2016-05-11 23:48:24 +02:00
Jannik Vogel
22426f3e89 Pica: Replace logic in shader.cpp with loop 2016-05-03 01:40:47 +02:00
Emmanuel Gil Peyrot
c39a267974 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
Yuri Kunde Schlesner
2396b01d5d Common: Remove section measurement from profiler (#1731)
This has been entirely superseded by MicroProfile. The rest of the code
can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-29 00:07:10 -07:00
bunnei
73c082b647 shader_jit_x64.cpp: Rename JitCompiler to JitShader. 2016-04-13 23:04:53 -04:00
bunnei
110725828a shader: Remove unused 'state' argument from 'Setup' function. 2016-04-13 23:04:48 -04:00
bunnei
885208150d shader_jit_x64: Specify shader main offset at runtime. 2016-04-13 23:04:47 -04:00
bunnei
13385606c3 shader_jit_x64: Allocate each program independently and persist for emu session. 2016-04-13 23:04:47 -04:00
Mathew Maidment
3cf5e4d51c Merge pull request #1643 from MerryMage/make_unique
Common: Remove Common::make_unique, use std::make_unique
2016-04-05 20:10:11 -04:00
MerryMage
9f9c987924 Common: Remove Common::make_unique, use std::make_unique 2016-04-05 13:31:17 +01:00
bunnei
60b5818dde Merge pull request #1508 from JayFoxRox/vs-output-map
Respect vs output map
2016-03-22 11:59:12 -04:00
Jannik Vogel
3941f74688 Respect vs output map 2016-03-14 13:03:34 +01:00
bunnei
fcbcf16024 shader_jit_x64: Clear cache after code space fills up. 2016-03-12 12:15:49 -05:00
bunnei
a5d41a373e shader: Update log message to use proper log class. 2016-03-12 12:03:32 -05:00
Dwayne Slater
141fe87a0f Add immediate mode vertex submission 2016-03-02 22:16:38 -05:00
bunnei
3c3e328340 pica: Implement decoding of basic fragment lighting components.
- Diffuse
- Distance attenuation
- float16/float20 types
- Vertex Shader 'view' output
2016-02-05 17:17:28 -05:00
Lioncash
1d7a9c8752 video_core: Remove unused variables 2015-09-10 10:26:21 -04:00
archshift
89241b3e89 Shader JIT: ifdef out reference to ifdef'd out shader_map
shader_map was only defined on x86 architectures, but was cleared on shutdown
with no ifdef protection. Ifdef this out so non-x86 architectures can be built.
2015-08-26 22:28:19 +00:00
Yuri Kunde Schlesner
424b0fa646 Integrate the MicroProfile profiling library
This brings goodies such as a configurable user interface and
multi-threaded timeline view.
2015-08-24 22:16:28 -03:00
Tony Wasserka
1c1a9ab09b Introduce a shader tracer to allow inspection of input/output values for each processed instruction. 2015-08-16 14:12:11 +02:00
Tony Wasserka
41dda548cd citra-qt: Improve shader debugger.
Now supports dumping the current shader and recognizes a larger number of output semantics.
2015-08-16 13:22:00 +02:00
bunnei
5c7e9ffce7 Shader: Use a POD struct for registers. 2015-08-15 18:03:27 -04:00