bunnei
7bb226f22d
gl_rasterizer_cache: Always blit on recreate, regardless of format.
...
- Fixes several rendering issues with Super Mario Odyssey.
2018-09-11 22:54:46 -04:00
bunnei
cdddd71d08
gl_shader_cache: Remove cache_width/cache_height.
...
- This was once an optimization, but we no longer need it with the cache reserve.
- This is also inaccurate.
2018-09-11 20:12:29 -04:00
David Marcec
4c3bd33be2
Fixed renderdoc input/output textures not working due to render targets
2018-09-11 13:31:20 +10:00
bunnei
d6e8e16a66
Merge pull request #1286 from bunnei/multi-clear
...
gl_rasterizer: Implement clear for non-zero render targets.
2018-09-10 20:30:14 -04:00
bunnei
12445b476d
Merge pull request #1285 from bunnei/depth-fix
...
gl_rasterizer_cache: Only use depth for applicable texture formats.
2018-09-10 20:28:40 -04:00
bunnei
d884e805c5
Merge pull request #1284 from bunnei/bgra8_srgb
...
gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
2018-09-10 20:28:00 -04:00
Markus Wick
c1b8cd9058
video_core: Refactor command_processor.
...
Inline the WriteReg helper as it is called ~20k times per frame.
2018-09-10 22:06:16 +02:00
Markus Wick
0cfb0bacb2
video_core: Move command buffer loop.
...
This moves the hot loop into video_core. This refactoring shall reduce the CPU overhead of calling ProcessCommandList.
2018-09-10 22:06:13 +02:00
Markus Wick
c560043581
rasterizer: Drop unused handler.
...
This virtual function is called in a very hot spot, and it does nothing.
If this kind of feature is required, please be more specific and add callbacks
in the switch statement within Maxwell3D::WriteReg. There is no point in having
another switch statement within the rasterizer.
2018-09-10 22:03:10 +02:00
bunnei
4c0b1cc1ae
gl_rasterizer_cache: Only use depth for applicable texture formats.
...
- Fixes an issue with Octopath Traveler leaving stale data here.
2018-09-10 00:50:38 -04:00
bunnei
035e6bd407
gl_rasterizer: Implement clear for non-zero render targets.
...
- Several misc. changes to ConfigureFramebuffers in support of this.
2018-09-10 00:41:20 -04:00
bunnei
1c34498368
gl_rasterizer_cache: Implement RenderTargetFormat::BGRA8_SRGB.
...
- Used by Octopath Traveler (with multiple render targets).
2018-09-10 00:37:52 -04:00
bunnei
49b15af054
gl_rasterizer: Implement multiple color attachments.
2018-09-09 22:48:28 -04:00
bunnei
e58855c7a4
Merge pull request #1268 from FernandoS27/tmml
...
shader_decompiler: Implemented TMML
2018-09-09 21:39:39 -04:00
FernandoS27
00131e752d
Implemented TMML
2018-09-09 20:46:31 -04:00
bunnei
223ddb2008
Merge pull request #1272 from Subv/dma_2d
...
GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
2018-09-09 19:53:17 -04:00
bunnei
fcf81147e7
Merge pull request #1280 from zero334/improvements
...
video_core: fixed arithmetic overflow warnings & improved code style
2018-09-09 19:51:46 -04:00
FernandoS27
073a21ac0b
Implemented TXQ dimension query type, used by SMO.
2018-09-09 11:59:01 -04:00
Patrick Elsässer
64e45b04e0
video_core: fixed arithmetic overflow warnings & improved code style
...
- Fixed all warnings, for renderer_opengl items, which were indicating a
possible incorrect behavior from integral promotion rules and types
larger than those in which arithmetic is typically performed.
- Added const for variables where possible and meaningful.
- Added constexpr where possible.
2018-09-09 17:51:43 +02:00
FernandoS27
82a313a14c
Change name of TEXQ to TXQ, in order to match NVIDIA's naming
2018-09-08 18:08:57 -04:00
Subv
fdb199290b
GPU/DMA: Partially implemented the 'enable_2d' bit in the DMA engine.
...
When not set, this tells the GPU to only use the X size when performing a DMA copy.
This is only implemented for linear->linear and tiled->tiled copies. Conversion copies still retain the assert.
This bit is unset by some games for various purposes, and by nouveau when copying the vertex buffers.
2018-09-08 16:02:16 -05:00
bunnei
af074ee422
Merge pull request #1256 from bunnei/tex-target-support
...
Initial support for non-2D textures
2018-09-08 16:14:46 -04:00
bunnei
8b08cb925b
gl_rasterizer: Use baseInstance instead of moving the buffer points.
...
This hopefully helps our cache not to redundant upload the vertex buffer.
# Conflicts:
# src/video_core/renderer_opengl/gl_rasterizer.cpp
2018-09-08 04:05:56 -04:00
Patrick Elsässer
a8974f0556
video_core: Arithmetic overflow warning fix for gl_rasterizer ( #1262 )
...
* video_core: Arithmetic overflow fix for gl_rasterizer
- Fixed warnings, which were indicating incorrect behavior from integral
promotion rules and types larger than those in which arithmetic is
typically performed.
- Added const for variables where possible and meaningful.
* Changed the casts from C to C++ style
Changed the C-style casts to C++ casts as proposed.
Took also care about signed / unsigned behaviour.
2018-09-08 02:59:59 -04:00
bunnei
23ae7cf9db
gl_rasterizer_cache: Improve accuracy of RecreateSurface for non-2D textures.
2018-09-08 02:53:39 -04:00
bunnei
fdd5c97a14
maxwell_3d: Remove assert that no longer applies.
2018-09-08 02:53:39 -04:00
bunnei
f165a85398
gl_rasterizer_cache: Partially implement several non-2D texture types.
2018-09-08 02:53:38 -04:00
bunnei
0731383124
gl_shader_decompiler: Partially implement several non-2D texture types (Subv).
2018-09-08 02:53:38 -04:00
bunnei
05f6f59ffb
gl_rasterizer: Implement texture wrap mode p.
2018-09-08 02:53:38 -04:00
bunnei
ce8291f6c5
gl_rasterizer_cache: Track texture depth.
2018-09-08 02:53:38 -04:00
bunnei
9dccf7e1fa
gl_rasterizer_cache: Remove impl. of FlushGLBuffer.
...
- Will not work for non-2d textures, and was not used anyways.
2018-09-08 02:53:37 -04:00
bunnei
030676b95d
gl_rasterizer_cache: Keep track of texture type per surface.
2018-09-08 02:53:37 -04:00
bunnei
a439f7b6e1
gl_rasterizer_cache: Remove unused DownloadGLTexture.
2018-09-08 02:53:37 -04:00
bunnei
b56e5edafc
gl_state: Keep track of texture target.
2018-09-08 02:53:37 -04:00
bunnei
9947c6ad59
Merge pull request #1252 from lioncash/header
...
video_core/CMakeLists: Add missing gl_buffer_cache.h
2018-09-06 19:19:43 -04:00
bunnei
9b50dca2bb
Merge pull request #1253 from lioncash/explicit
...
video_core/gl_buffer_cache: Minor tidying changes
2018-09-06 19:19:35 -04:00
bunnei
009a2cc9cc
Merge pull request #1255 from bunnei/minor-opt
...
gl_rasterizer: Call state.Apply only once on SetupShaders.
2018-09-06 19:19:16 -04:00
bunnei
820f646458
gl_rasterizer: Call state.Apply only once on SetupShaders.
2018-09-06 17:41:53 -04:00
bunnei
948f6c0738
gl_shader_decompiler: Implement saturate mode for IPA.
2018-09-06 17:40:03 -04:00
Lioncash
ddcdbce067
gl_buffer_cache: Default initialize member variables
...
Ensures that the cache always has a deterministic initial state.
2018-09-06 15:07:15 -04:00
Lioncash
8d685a29bc
gl_buffer_cache: Make GetHandle() a const member function
...
GetHandle() internally calls GetHandle() on the stream_buffer instance,
which is a const member function, so this can be made const as well.
2018-09-06 15:07:15 -04:00
Lioncash
14230fe2af
gl_buffer_cache: Remove unnecessary includes
2018-09-06 15:05:52 -04:00
Lioncash
68296d9474
gl_buffer_cache: Make constructor explicit
...
Implicit conversions during construction isn't desirable here.
2018-09-06 14:54:49 -04:00
Lioncash
8f4e09ba07
video_core/CMakeLists: Add missing gl_buffer_cache.h
...
Without this, the header file won't show up by default within IDEs such
as Visual Studio.
2018-09-06 14:49:51 -04:00
Markus Wick
a781042700
gl_shader_gen: Initialize position.
...
IMO the old code is fine, but nvidia raises shader compiler warnings.
Trivial fix through...
2018-09-06 13:37:50 +02:00
bunnei
77554ac773
Merge pull request #1243 from degasus/VAO_cache
...
gl_rasterizer: Implement a VAO cache.
2018-09-05 22:50:52 -04:00
bunnei
6f09c5b128
Merge pull request #1244 from FernandoS27/ipa
...
shader_decompiler: Implemented IPA Properly (Stage 1)
2018-09-05 21:20:40 -04:00
FernandoS27
e63b229f4a
Implemented IPA Properly
2018-09-05 20:15:47 -04:00
Markus Wick
7f15306f78
gl_rasterizer: Skip TODO log.
...
This is called ~3k times per frame in SMO ingame.
My laptop spends ~3ms per frame on allocating and freeing this string.
Let's just stop printing this kind of redundant information.
2018-09-05 20:20:20 +02:00
Markus Wick
d3ad9469a1
gl_rasterizer: Implement a VAO cache.
...
This patch caches VAO objects instead of re-emiting all pointers per draw call.
Configuring this pointers is known as a fast task, but it yields too many GL
calls. So for better performance, just bind the VAO instead of 16 pointers.
2018-09-05 18:46:35 +02:00