Stenzek
38e0b6e2ab
AbstractTexture: Move Bind() method to Renderer
...
This makes state tracking simpler, and enables easier porting to command
lists later on.
2018-01-22 13:22:09 +10:00
Jonathan Hamilton
c709f3c2d1
Standardise some enums from ALL_CAPS to CamelCase
2018-01-05 10:03:58 -08:00
Jonathan Hamilton
8d68adcaf3
Workaround qualcomm driver bug
...
It seems it doesn't like modifying inout variables in place - so instead
use a temporary for ocol0/ocol1 and only write them once at the end of
the shader
2018-01-05 09:56:46 -08:00
Jonathan Hamilton
29a9ed043b
Implement dual-source blending in shader
...
For some GLES drivers that don't support dual-source blending, but do
support GL_EXT_shader_framebuffer_fetch, this might be useful.
2018-01-05 09:56:46 -08:00
Stenzek
5f5aca7870
OGL: Fix incorrect usage of glGetTextureSubImage
...
Was causing issues with texture dumping on newer drivers.
2017-12-10 15:31:14 +10:00
degasus
02dd062518
VideoCommon: Drop now unused efb2tex matrix generation.
2017-12-06 09:30:03 +01:00
Lioncash
050440fd5b
OGL/TextureConverter: Remove unnecessary using declaration
2017-12-03 18:51:22 -05:00
Lioncash
93e85f9a7c
OGL/TextureConverter: Resolve -Wmissing-variable-declaration warnings
2017-12-03 18:51:17 -05:00
degasus
e2a9ee384f
VideoCommon: Rename TextureConversionShader namespace.
2017-12-02 15:17:39 +01:00
degasus
e8febd0cef
VideoCommon: Create a namespace for TextureConversionShaderGen.
2017-12-02 15:17:39 +01:00
Markus Wick
491c10ec96
VideoBackends: Use VideoCommon shader generators for efb2tex copies.
...
This will generate one shader per copy format. For now, it is the same
shader with the colmat hard coded. So it should already improve the GPU
performance a bit, but a rewrite of the shader generator is suggested.
Half of the patch is done by linkmauve1:
VideoCommon: Reorganise the shader writes.
2017-12-02 15:17:39 +01:00
Stenzek
cd68b3606c
Merge pull request #6193 from stenzek/readbacks
...
Abstract Staging Textures - VideoCommon interface for texture readbacks/uploads
2017-12-01 14:24:06 +10:00
Stenzek
32125cf181
OGL: Fix headless frame dumping
...
Also skips swapping the window system buffers in headless mode, as there
may not be a surface which can be swapped in the first place. Instead,
we call glFlush() at the end of a frame in this case.
2017-11-23 16:53:55 +10:00
Stenzek
ab44536a3c
OGL: Update the window size after swapping buffers, not before
...
Prevents us from rendering beyond the viewport bounds.
2017-11-23 16:09:59 +10:00
Stenzek
db1d9de933
AbstractTexture: Drop slow map readback path
2017-11-22 18:49:33 +10:00
Stenzek
9da9f26b90
OGL: Use new readback methods for EFB2RAM
2017-11-22 18:47:04 +10:00
Stenzek
c2cc128f1b
AbstractTexture: Implement Save using new common methods
2017-11-22 18:47:04 +10:00
Stenzek
56afebeb44
AbstractTexture: Seperate CopyRectangleFromTexture to two methods
...
ScaleRectangleFromTexture, which does a draw, and
CopyRectangleFromTexture, which where possible, does a bit-for-bit copy.
2017-11-22 18:47:04 +10:00
Stenzek
f43d85921d
VideoBackends: Add AbstractStagingTexture class
...
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
Stenzek
a584ccc7d8
AbstractTexture: Support BGRA8 formats
...
Used for some driver's swap chains, and EFB to RAM.
2017-11-22 18:47:04 +10:00
Stenzek
49a9c33bd7
VideoCommon: Move abstract texture creation function to Renderer
2017-11-22 18:47:04 +10:00
Stenzek
39559f6358
VideoConfig: Remove bSupportsInternalResolutionFrameDumps
...
Field is unused as of Hybrid XFB.
2017-11-21 17:19:43 +10:00
Leo Lam
80bcc0d58d
Merge pull request #6186 from lioncash/enum-class
...
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19 15:08:16 +01:00
Lioncash
364eaadfe5
VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
...
Just some inclusions that weren't removed in the initial Hybrid XFB PR.
2017-11-19 00:53:10 -05:00
Lioncash
5337e58284
VideoConfig: Make StereoMode an enum class
...
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:19:53 -05:00
iwubcode
7248dd47d5
Hybrid XFB: Fix lint errors
2017-11-17 22:11:32 -06:00
iwubcode
4964fc87ae
Video Backends: Remove the right of the xfb region for games where the
...
VI stride does not match the VI width
2017-11-17 22:11:32 -06:00
iwubcode
53684701fa
HybridXFB: Fix lint errors
2017-11-17 22:11:31 -06:00
iwubcode
1090549552
Software Backend: Force EFB/XFB to copy to ram
2017-11-17 22:11:31 -06:00
iwubcode
76b775d5be
Video Common: Add XFB decoding via the GPU
2017-11-17 22:11:30 -06:00
iwubcode
33bc286baa
Remove old XFB logic
2017-11-17 22:11:29 -06:00
iwubcode
b285188de1
Video Backends: Implement vertical scaling for xfb copies. This fixes the
...
display of PAL games that run in 50hz mode.
2017-11-17 22:11:29 -06:00
iwubcode
198d3b69b4
Add ability to dump xfb copies to texture for debugging purposes
2017-11-17 22:11:28 -06:00
iwubcode
a9f0d1783b
Support frame and video dumping from VideoCommon
2017-11-17 22:11:23 -06:00
iwubcode
79387dddb2
Add support for hybrid XFB
2017-11-17 19:47:56 -06:00
JosJuice
a310cbec8e
Fix incorrect handling of auto IR
...
Some lines of code in Dolphin just plainly grabbed the value of
g_ActiveConfig.iEFBScale, which resulted in Auto being treated as
0x rather than the actual automatically selected scale.
2017-11-03 16:04:46 +01:00
Tommaso Checchi
5fb6ceac45
Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient.
2017-10-27 00:45:20 -07:00
Michael M
82129d30c9
TextureCache: don't create texture decoding resources if not enabled
2017-10-21 23:06:44 -07:00
Lioncash
dbd9aeb210
OGL/TextureCache: use std::array for the palette shader array
2017-09-17 02:34:02 -04:00
Lioncash
6d9ed9dc32
OGL/TextureCache: Move file statics to the TextureCache class
...
These rely on instance state, or are used within instance-based class
member functions, so they should belong to the instance itself instead
of being file statics.
2017-09-17 02:33:56 -04:00
Stenzek
24ddea04ce
VideoBackends: Move SamplerState to common
2017-09-11 20:01:54 +10:00
Stenzek
836b9b9acb
Renderer: Move cull mode to a rasterization state object
...
Also moves logic for primitive handling to VideoCommon.
2017-09-11 20:01:45 +10:00
Stenzek
2869c570f1
Renderer: Move depth state to VideoCommon and seperate from bpmem
2017-09-11 19:40:26 +10:00
Stenzek
9e1c09e347
StreamBuffer: Don't wait on fences twice when reserve > commit
...
If we allocate a large amount of memory (A), commit a smaller amount,
then allocate memory smaller than allocation A, we will have already
waited for these fences in A, but not used the space. In this case,
don't set m_free_iterator to a position before that which we know is
safe to use, which would result in waiting on the same fence(s) next
time.
2017-09-09 13:26:30 +10:00
Stenzek
84f8ebd95f
VideoBackends: Clear uid bits that are unused for the current backend
...
Currently, this is only the logic op bit, but this will be extended to
the framebuffer fetch/blend modes. In the future, when/if we move to
VideoCommon pipelines, this state will be part of the pipeline UID
anyway, and we can mask it out in the backend by using a two-level map,
so the shaders/programs are shared.
2017-09-05 23:49:42 +10:00
Stenzek
3dd675e613
Renderer: Change SetBlendState to accept a BlendingState
...
This decouples the state generation (from the emulated GPU) from the
management of internal backend state.
2017-09-03 14:14:54 +10:00
Stenzek
005d0b39f7
Merge pull request #6009 from lioncash/async
...
AsyncShaderCompiler: Make WorkItem-derived class constructors explicit
2017-09-03 14:11:41 +10:00
Lioncash
2237a6a04c
OGL/VertexManager: Make vertex and index buffer handles private
...
These are only ever read, but not written to outside of the VertexManager class.
2017-09-02 20:51:54 -04:00
Lioncash
2d45204f12
VideoBackends: Add the explicit keyword to WorkItem-derived class constructors
...
Prevents implicit conversions
2017-09-02 17:35:20 -04:00
Lioncash
5059332d95
OGL/ProgramShaderCache: Remove unnecessary virtual keyword
...
This is superfluous, considering the override keyword is present.
2017-09-02 17:27:19 -04:00