Yuri Kunde Schlesner
fccb28d2e9
VideoCore: Use correct register for immediate mode attribute count
2017-01-29 21:31:36 -08:00
Yuri Kunde Schlesner
ab6954e942
VideoCore: Rename some types to more accurate names
2017-01-29 21:31:36 -08:00
Yuri Kunde Schlesner
bbc7844021
VideoCore: Change misleading register names
...
A few registers had names such as "count" or "number" when they actually
contained the maximum (that is, count - 1). This can easily lead to hard
to notice off by one errors.
2017-01-29 21:31:36 -08:00
Kloen
eee37b857b
video_core: gl_rasterizer_cache.cpp removed unused type alias
2017-01-30 05:18:28 +01:00
Kloen
6a3a3964b0
video_core: gl_rasterizer.cpp removed unused type alias
2017-01-30 05:16:48 +01:00
Kloen
4652d70572
video_core: silence unused-local-typedef boost related warning on GCC
2017-01-29 21:24:24 +01:00
Yuri Kunde Schlesner
0e9081b973
VideoCore/Shader: Move entry_point to SetupBatch
2017-01-25 18:53:25 -08:00
Yuri Kunde Schlesner
0f64274145
VideoCore/Shader: Move per-batch ShaderEngine state into ShaderSetup
2017-01-25 18:53:25 -08:00
Yuri Kunde Schlesner
6fa3687afc
Shader: Remove OutputRegisters struct
2017-01-25 18:53:25 -08:00
Yuri Kunde Schlesner
9ea5eacf91
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
1a2acc3baa
Shader: Don't read ShaderSetup from global state
2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
fa4ac279a7
shader_jit_x64: Don't read program from global state
2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
ade7ed7c5f
VideoCore/Shader: Move ProduceDebugInfo to InterpreterEngine
2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
114d6b2f97
VideoCore/Shader: Split interpreter and JIT into separate ShaderEngines
2017-01-25 18:53:24 -08:00
Yuri Kunde Schlesner
8eefc62833
VideoCore/Shader: Rename shader_jit_x64{ => _compiler}.{cpp,h}
2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
dd4a1672a7
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
bd82cffd0b
VideoCore/Shader: Add constness to methods
2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
1e1f939817
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
e3caf669b0
VideoCore/Shader: Use self instead of g_state.vs in ShaderSetup
2017-01-25 18:53:23 -08:00
Yuri Kunde Schlesner
34d581f2dc
VideoCore/Shader: Extract input vertex loading code into function
2017-01-25 18:53:20 -08:00
Kloen
5cc94c17f6
video_core: fix shader.cpp signed / unsigned warning
2017-01-23 16:53:31 +01:00
Kloen
753fea5d65
video_core: gl_rasterizer float to int warning
2017-01-23 16:53:30 +01:00
Kloen
b6063d9a93
video_core: fix gl_rasterizer warning on MSVC
2017-01-23 16:53:30 +01:00
bunnei
22ad9094e6
config: Add option for specifying screen resolution scale factor.
2017-01-07 03:23:22 -05:00
Jonathan Hao
c18cb1b192
Fix some warnings ( #2399 )
2017-01-04 13:48:29 -03:00
bunnei
2f746e9946
Merge pull request #2367 from JayFoxRox/lighting-lut-quickfix
...
Lighting LUT Quickfix
2016-12-29 13:41:51 -05:00
Jannik Vogel
6ed4206f87
Minor cleanup in GLSL code
2016-12-25 21:38:10 +01:00
Jannik Vogel
88f409aec9
Offset lighting LUT samples correctly
2016-12-25 21:37:26 +01:00
MerryMage
64f98f4d0f
core: Move emu_window and key_map into core
...
* Removes circular dependences (common should not depend on core)
2016-12-23 13:42:39 +00:00
bunnei
29564d73bd
Merge pull request #2319 from yuriks/profile-scopes
...
VideoCore: Make profiling scope more representative
2016-12-21 13:33:49 -05:00
Albin Bernhardsson
ddec9cb369
Use GL_TRUE when setting color_mask
2016-12-19 19:06:35 +01:00
bunnei
3a1eaf2efc
Merge pull request #2318 from yuriks/trace-opt
...
VideoCore: Inline IsPicaTracing
2016-12-18 21:15:24 -05:00
Yuri Kunde Schlesner
c135317de1
VideoCore/Shader: Extract DebugData out from UnitState
2016-12-16 00:16:25 -08:00
Yuri Kunde Schlesner
6e7e767645
Remove unnecessary cast
2016-12-16 00:15:55 -08:00
Yuri Kunde Schlesner
b5e3599704
VideoCore/Shader: Extract evaluate_condition lambda to function scope
2016-12-16 00:15:51 -08:00
Yuri Kunde Schlesner
960578f4e1
VideoCore/Shader: Extract call lambda up a scope and remove unused param
2016-12-15 23:08:05 -08:00
Yuri Kunde Schlesner
e4e962bc7c
VideoCore/Shader: Remove dynamic control flow in (Get)UniformOffset
2016-12-15 23:08:05 -08:00
Yuri Kunde Schlesner
d27cb1dedc
VideoCore/Shader: Move DebugData to a separate file
2016-12-15 23:08:05 -08:00
Yuri Kunde Schlesner
fb9e856b91
shader_jit_x64: Use LOOPCOUNT_REG as a 64-bit reg when indexing
2016-12-15 10:02:42 -08:00
Yuri Kunde Schlesner
ac9f937477
VideoCore: Make profiling scope more representative
2016-12-14 22:52:09 -08:00
Yuri Kunde Schlesner
945f554b84
VideoCore: Inline IsPicaTracing
...
Speeds up ALBW main menu slightly (~3%)
2016-12-14 22:06:40 -08:00
Yuri Kunde Schlesner
f00ada3363
VideoCore: Eliminate an unnecessary copy in the drawcall loop
2016-12-14 21:00:29 -08:00
Yuri Kunde Schlesner
5ff3206207
shader_jit_x64: Use Reg32 for LOOP* registers, eliminating casts
2016-12-14 20:06:09 -08:00
Yuri Kunde Schlesner
f4e98ecf3f
VideoCore: Convert x64 shader JIT to use Xbyak for assembly
2016-12-14 20:06:08 -08:00
Lioncash
963aedd8cc
Add all services to the Service namespace
...
Previously there was a split where some of the services were in the
Service namespace and others were not.
2016-12-11 00:07:27 +00:00
Markus Wick
d0d49bb951
OpenGL: Drop framebuffer completeness check.
...
This OpenGL call synchronize the worker thread of the nvidia blob.
It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable.
Those errors should not happen on tested drivers.
It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-07 22:09:13 +01:00
emmauss
c4e4fa53d9
Implement Frame rate limiter ( #2223 )
...
* implement frame limiter
* fixes
2016-12-06 14:33:19 -05:00
Jannik Vogel
fc4591fa49
ASSERT that shader was linked successfully
2016-12-05 21:11:24 +01:00
Jannik Vogel
4088afe23c
Report shader uniform block size in case of mismatch
2016-12-05 21:11:24 +01:00
Jannik Vogel
0edc986861
Print broken shader code to log
2016-12-05 21:11:24 +01:00
Yuri Kunde Schlesner
8a1f96011d
OpenGL: Non-zero stride only makes sense for linear buffers
2016-12-04 06:14:27 -08:00
Yuri Kunde Schlesner
2600633b89
OpenGL: Ensure framebuffer binding is restored if completion check fails
2016-12-04 06:14:27 -08:00
Yuri Kunde Schlesner
ba7f213655
OpenGL: Fix DisplayTransfer accel when input width != output width
...
Fixes #2246 , #2261
2016-12-04 05:21:57 -08:00
Yuri Kunde Schlesner
4f0f88bc6a
Merge pull request #2259 from JayFoxRox/fix-fallback
...
shader_jit: Fix non-SSE4.1 path where FLR would not truncate
2016-12-03 22:11:39 -08:00
Jannik Vogel
2d8097eecc
shader_jit: Fix non-SSE4.1 path where FLR would not truncate
2016-12-04 04:26:33 +01:00
Yuri Kunde Schlesner
4d5e42240c
clang-format: Fix coding style
2016-12-03 01:32:46 -08:00
Jannik Vogel
e2cb7d7833
shader_jit: Load LOOPCOUNT_REG and LOOPINC 4 bit left-shifted
2016-12-02 04:33:15 +01:00
Subv
e3e4f27447
ClangFormat: Fixed the clang-format errors
2016-11-30 09:37:37 -05:00
Subv
aea9a91100
Build: Fixed a few warnings.
2016-11-29 16:51:53 -05:00
Yuri Kunde Schlesner
e279a6955e
Merge pull request #2222 from linkmauve/die-frameskip-die
...
Remove the broken frame_skip option
2016-11-27 16:01:45 -08:00
Emmanuel Gil Peyrot
0820c99462
GPU: Remove the broken frame_skip option.
...
Fixes #1960 .
2016-11-27 21:19:56 +00:00
Subv
4623415026
RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1
2016-11-27 13:09:11 -05:00
Subv
743b0e71d9
Rasterizer/Memfill: Set the correct stencil write mask when clearing the stencil buffer.
2016-11-27 12:16:10 -05:00
jphalimi
82210ab480
Cache Vertices instead of Output registers ( #2165 )
...
This patch brings +3% performance improvement on average. It removes
ToVertex() as an important hotspot of the emulator.
2016-11-23 23:10:34 -05:00
wwylele
75affa13f7
Fix format error from #2195
2016-11-22 20:17:28 +02:00
bunnei
2de470c9b2
Merge pull request #2195 from Subv/factor_check
...
GPU/CiTrace: Avoid calling GetTextures() when not necessary.
2016-11-19 22:21:11 -05:00
Subv
050e9be15b
GPU/CiTrace: Avoid calling GetTextures() when not necessary.
2016-11-19 19:27:00 -05:00
James Rowe
f68f37b520
Merge pull request #2194 from jroweboy/extremely-minor-clangformat-change
...
Minor formatting change
2016-11-19 13:51:14 -07:00
James Rowe
19acec351c
Minor formatting change
2016-11-19 13:35:07 -07:00
James Rowe
d9305b0a07
Add default hotkey to swap primary screens.
...
Also minor style changes
2016-11-05 03:46:43 -06:00
James Rowe
2b1654ad9b
Support additional screen layouts.
...
Allows users to choose a single screen layout or a large screen layout.
Adds a configuration option to change the prominent screen.
2016-11-05 02:55:41 -06:00
Ricardo de Almeida Gonzaga
13d46f6820
Fix typos
2016-10-20 12:26:59 -02:00
bunnei
d989102c9c
Merge pull request #2082 from yuriks/shader-interp-crash
...
Fix/mask crash in shader debugger in Mii Maker
2016-10-06 19:35:37 -04:00
bunnei
49b10339bf
Merge pull request #2103 from wwylele/gpu-reg-cleanup
...
GPU: DisplayTransfer & MemoryFill cleanup and param check
2016-10-03 20:21:55 -04:00
Yuri Kunde Schlesner
d9a904f9cb
VideoCore: Shader interpreter cleanups
2016-09-29 21:15:49 -07:00
Yuri Kunde Schlesner
26b68313b9
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
01667d9a35
OpenGL: Take cached viewport sub-rect into account for scissor
...
Fixes #1938
2016-09-29 20:55:24 -07:00
wwylele
d2419570b9
rasterizer: separate TextureCopy from DisplayTransfer
2016-09-29 10:01:34 +08:00
Yuri Kunde Schlesner
f120e78b56
Remove special rules for Windows.h and library includes
2016-09-21 00:16:33 -07:00
Yuri Kunde Schlesner
84fbbe2629
Use negative priorities to avoid special-casing the self-include
2016-09-21 00:15:56 -07:00
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.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
396a8d91a4
Manually tweak source formatting and then re-run clang-format
2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
dc8479928c
Sources: Run clang-format on everything.
2016-09-18 09:38:01 +09:00
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.
2016-09-15 22:15:11 -07:00
bunnei
09063dc5bb
Merge pull request #2032 from bunnei/qt-graphics
...
Qt graphics configure & V-Sync option
2016-08-31 22:20:54 -04:00
Jannik Vogel
7a79fa7a90
OpenGL: Avoid error on unsupported lighting LUT
2016-08-30 19:30:26 +02:00
bunnei
08ad9b36d4
config: Add a setting for graphics V-Sync.
2016-08-29 21:42:30 -04:00
Yuri Kunde Schlesner
ecf6ecf325
OpenGL: Add scaled resolution support to scissor
2016-06-27 22:16:04 -07:00
Yuri Kunde Schlesner
f0b9bc14b6
PICA: Scissor fixes and cleanups
2016-06-27 21:14:39 -07:00
Subv
f9be06b15f
PICA: Implement scissor test
2016-06-27 21:14:13 -07:00
scurest
0f9274fe24
Remove superfluous std::move in return std::move(local_var)
2016-06-25 13:26:21 -05:00
Jannik Vogel
a12571c709
OpenGL: Implement fog
2016-06-07 00:06:28 +02:00
Jannik Vogel
ebee2513a9
Rasterizer: Implement fog
2016-06-07 00:06:28 +02:00
Jannik Vogel
57855a1701
Pica: Add fog state
2016-06-07 00:06:28 +02:00
Jannik Vogel
c900c092e3
OpenGL: Avoid undefined behaviour for UNIFORM_BLOCK_DATA_SIZE
2016-06-07 00:06:28 +02:00
mailwl
07cc781163
gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueue
2016-06-01 09:40:15 +03:00
bunnei
552018c50a
Merge pull request #1812 from JayFoxRox/refactor-shader
...
Retrieve shader result from new OutputRegisters-type
2016-05-31 18:12:56 -04:00
bunnei
201a7af92a
Merge pull request #1846 from JayFoxRox/missing-dirty-lighting
...
OpenGL: Set shader_dirty on lighting changes
2016-05-26 17:35:12 -04:00
bunnei
a316fbb15a
Merge pull request #1733 from lioncash/vert_loader
...
VertexLoader: Minor changes
2016-05-23 21:13:34 -04:00
Jannik Vogel
6a28f46844
OpenGL: Set shader_dirty on lighting changes
2016-05-23 23:28:13 +02:00