Commit graph

1730 commits

Author SHA1 Message Date
Stenzek
1073053df9 Merge pull request #6026 from stenzek/d3d-ubershader-logicop
ShaderGen: Output uint when logic op is enabled for D3D ubershaders
2017-09-06 18:33:47 +10:00
Stenzek
2e20cd0ffd Merge pull request #6025 from spxtr/present_queue
Vulkan: Use a separate queue for presenting.
2017-09-06 18:32:43 +10:00
iwubcode
1ccfccdcf0 D3D: Properly handle dual source blending 2017-09-05 23:51:31 -05:00
spxtr
a5be5a3a76 Vulkan: Use a separate queue for presenting.
Before this change, we simply fail if the device does not expose one
queue family that supports both graphics and present. Currently this is
fine, since devices tend to lay out their queues in this way. NV, for
instance, tends to have one queue family for all graphics operations and
one more for transfer only. However, it's not a hard requirement, and it
is cheap to use a separate queue, so we might as well.
2017-09-05 12:00:09 -07: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
Jules Blok
347fd065df D3DBase: Support the "allow tearing" DXGI flags.
This makes sure our framerate is unlocked when we disable V-Sync.
2017-09-04 23:12:52 +02:00
Anthony
ee6930a231 Merge pull request #6013 from stenzek/d3d-logic-op
D3D: Implement logic op support
2017-09-03 19:26:50 -07:00
Anthony
26e777d80b Merge pull request #5337 from stenzek/d3d-common-blending-state
D3D: Use blending state from VideoCommon
2017-09-03 19:25:46 -07:00
Stenzek
90051536bf D3D: Support logic op through integer render target view
This brings D3D to parity with OpenGL and Vulkan.
2017-09-04 10:07:36 +10:00
Markus Wick
9e0df284aa Merge pull request #6018 from lioncash/const
Software/Tev: const correctness
2017-09-03 21:43:10 +02:00
Lioncash
baee3a9c74 Software/Tev: const correctness 2017-09-03 14:15:21 -04:00
Lioncash
36e299ca80 D3DTexture: Remove unused bindflags D3DTexture2D member variable 2017-09-03 13:12:26 -04:00
Lioncash
52099d1b0a D3DTexture: in-class initialize class members where applicable 2017-09-03 13:08:06 -04:00
Jules Blok
8906b26ea5 D3DBase: Use the correct version of CreateDXGIFactory. 2017-09-03 14:33:06 +02:00
Stenzek
99d61906cc Merge pull request #5948 from Armada651/d3d-explicit-stereo
D3DBase: Only use a stereo swapchain if quad-buffering is enabled.
2017-09-03 21:07:24 +10:00
Stenzek
c9d649d27c D3D: Use Direct3D 11.1 where supported 2017-09-03 16:33:47 +10:00
Stenzek
254160691a Revert "Vulkan: Use VK_NV_glsl extension where available, and skip glslang"
This reverts commit d23fd17e1a.

Dynamic sampler indexing is broken in VK_NV_glsl as of 385.41. The
performance gap doesn't seem to be as wide with the updated driver, so
to save maintaining two code paths, it's easier to just drop the
extension support completely.
2017-09-03 15:31:19 +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
5c9bc8b79c D3D11: Use blending state from VideoCommon 2017-09-03 14:14:54 +10:00
Stenzek
c90b0bf532 D3D11: Create debug device when validation layer is enabled in options 2017-09-03 14:14:19 +10:00
Stenzek
ce59121748 Merge pull request #6004 from lioncash/d3d
D3D: Eliminate redundant ID3D11DeviceChild* casts
2017-09-03 14:13:17 +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
Stenzek
7a4348b641 Merge pull request #5649 from JonnyH/WIP/disable-vk-clear-renderpass
Add DriverDetails::BUG to Disable "LoadOp" clear renderpass in vulkan
2017-09-03 13:49:51 +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
Jonathan Hamilton
662abcb2fe Parse IMGTEC's GL_VERSION string format
ImgTec's driver uses a major.minor@changeID versioning system

This is packed into a double so "1.9@4850625" becomes "109.4850625"

The next release brnach is expected to be 1.10, hence the need for 2
digits for the branch minor.

The changeID should be unique for each build, but is shared over all
branches, so only makes sense to compare withing a branch.

It's likely branch 'major' versions will be used for major hardware
revisions, and the drivers for both maintained in parallel. Thus it
may not make sense to compare versions between different major
verisons - if/when this happens we can hook up a DriverDetails::Family
as needed.
2017-09-02 14:05:16 -07:00
Lioncash
64de8a9d0b D3D: Eliminate redundant ID3D11DeviceChild* casts 2017-09-02 14:45:14 -04:00
Jonathan Hamilton
62e8d25cd1 Add Bug to Disable "LoadOp" clear renderpass in vulkan
This optimisation doesn't work on PowerVR's Vulkan implementation. We
(incorrectly) disallow Framebuffer objects to be used with a different
load or store op than that which they were created with, despite the
spec allowing such.

This fixes the windwaker intro "smearing"
2017-08-28 18:01:35 -07:00
Stenzek
21b3cd4759 OGL: Fix EFB pokes using incorrect color/depth 2017-08-27 11:55:24 +10:00
Jonathan Hamilton
5b41c5ae0d Fix vulkan crash on drivers without atomic load/store support
This would not allocate a SSBO buffer, but still try to update the
descriptor said with a NULL buffer. Which naturally crashed.
2017-08-23 14:49:22 -07:00
Lioncash
bc57ab3923 Clipper: Copy both color sequences in CopyVertex as opposed to one
This is likely an oversight.
2017-08-22 22:45:28 -04:00
Lioncash
ffaa9a3bea SW NativeVertexFormat: Utilize std::array where applicable
Gets rid of some hardcoded looping bounds, and also simplifies code in
some places, sometimes allowing for removal of a loop altogether.
2017-08-22 22:39:28 -04:00
JosJuice
09f3f9b41a Remove NonCopyable
The class NonCopyable is, like the name says, supposed to disallow
copying. But should it allow moving?

For a long time, NonCopyable used to not allow moving. (It declared
a deleted copy constructor and assigment operator without declaring
a move constructor and assignment operator, making the compiler
implicitly delete the move constructor and assignment operator.)
That's fine if the classes that inherit from NonCopyable don't need
to be movable or if writing the move constructor and assignment
operator by hand is fine, but that's not the case for all classes,
as I discovered when I was working on the DirectoryBlob PR.

Because of that, I decided to make NonCopyable movable in c7602cc,
allowing me to use NonCopyable in DirectoryBlob.h. That was however
an unfortunate decision, because some of the classes that inherit
from NonCopyable have incorrect behavior when moved by default-
generated move constructors and assignment operators, and do not
explicitly delete the move constructors and assignment operators,
relying on NonCopyable being non-movable.

So what can we do about this? There are four solutions that I can
think of:

1. Make NonCopyable non-movable and tell DirectoryBlob to suck it.

2. Keep allowing moving NonCopyable, and expect that classes that
   don't support moving will delete the move constructor and
   assignment operator manually. Not only is this inconsistent
   (having classes disallow copying one way and disallow moving
   another way), but deleting the move constructor and assignment
   operator manually is too easy to forget compared to how tricky
   the resulting problems are.

3. Have one "MovableNonCopyable" and one "NonMovableNonCopyable".
   It works, but it feels rather silly...

4. Don't have a NonCopyable class at all. Considering that deleting
   the copy constructor and assignment operator only takes two lines
   of code, I don't see much of a reason to keep NonCopyable. I
   suppose that there was more of a point in having NonCopyable back
   in the pre-C++11 days, when it wasn't possible to use "= delete".

I decided to go with the fourth one (like the commit title says).
The implementation of the commit is fairly straight-forward, though
I would like to point out that I skipped adding "= delete" lines
for classes whose only reason for being uncopyable is that they
contain uncopyable classes like File::IOFile and std::unique_ptr,
because the compiler makes such classes uncopyable automatically.
2017-08-22 16:40:34 +02:00
Jules Blok
f4f6782ae6 D3DBase: Only use a stereo swapchain if quad-buffering is enabled. 2017-08-20 18:25:49 +02:00
Anthony
6a272f22de Merge pull request #5478 from stenzek/vulkan-nvidia
Vulkan: Don't use vkCmdClearAttachments on NVIDIA with MSAA
2017-08-14 13:12:41 -07:00
Anthony
a7bdd2ee1c Merge pull request #5868 from stenzek/d3d-require-new-compiler
D3DBase: Raise error if d3dcompiler_47.dll cannot be loaded
2017-08-14 09:55:31 -07:00
JosJuice
f090a94319 Remove non-integer IRs 2017-08-08 12:09:50 +02:00
Lioncash
745f92b4e5 TransformUnit: Get rid of pointer casting in TransformColor() where applicable
The casts to u32* are technically undefined behavior. The u8* cast is
left, as char/unsigned char is exempted from this rule to allow for
bvtewise inspection of objects (and this is what s8/u8 are typedefs of
on platforms we support).
2017-08-06 19:04:31 -04:00
Lioncash
4d35a3105e TransformUnit: Make LightColor()'s chan parameter const
Also marks references/pointers const where applicable
2017-08-06 18:15:05 -04:00
degasus
cc4b3b180b VideoSW: Drop log level of missing anti aliasing support.
We don't want to emit such a high priority warning here, else fifoci will die.
2017-08-05 19:20:19 +02:00
Stenzek
6d91c1b079 ProgramShaderCache: Call glTexImage3D after glTexParameter
Was missed before merge.
2017-08-05 18:18:30 +10:00
Anthony
3c5112bb21 Merge pull request #5856 from stenzek/optimus-crash
Fix ubershader crashes with primus/bumblebee
2017-08-05 00:54:28 -07:00
N.E.C
c3a57bbad5 Video: Clearly separate Texture and EFB Copy formats
Improve bookkeeping around formats. Hopefully make code less confusing.

- Rename TlutFormat -> TLUTFormat to follow conventions.
- Use enum classes to prevent using a Texture format where an EFB Copy format
  is expected or vice-versa.
- Use common EFBCopyFormat names regardless of depth and YUV configurations.
2017-08-03 18:35:29 -07:00
Stenzek
7f88711186 Vulkan: Add a driver bug for NV when MSAA is enabled
This causes the card to lock up when vkCmdClearAttachments is called,
when multisampling is enabled. Seems to be restricted to Maxwell and
newer?
2017-08-03 17:40:15 +10:00
Stenzek
fee08cf63d Vulkan: Use optimal tiling for dummy texture
Fixes a crash on some NVIDIA drivers. Apparently calling
vkCmdClearColorImage on an image with linear tiling causes the
GPU/driver to lock up.
2017-08-02 21:33:10 +10:00
Stenzek
67997529b8 ProgramShaderCache: Create a FBO for shared contexts to draw into
This way it allows us to use surfaceless contexts in EGL/GLX. It also
ensures that the shared context shares a similar setup to the main
context's framebuffer, potentially reducing the number of variants a
driver needs to generate.
2017-08-02 20:12:28 +10:00
Stenzek
57f34d748b D3DBase: Raise error if d3dcompiler_47.dll cannot be loaded
Previously we were falling back to an earlier version of the compiler.
The older version cannot compile our ubershaders without various
graphical issues.
2017-08-02 19:54:55 +10:00
Stenzek
fe65b26d53 Merge pull request #5834 from stenzek/bc7
Support loading BC7 (BPTC) textures from DDS files
2017-08-01 12:39:19 +10:00
Stenzek
63305e9173 HiresTextures: Support loading BC7 (BPTC) from DDS files 2017-08-01 11:59:38 +10:00
Stenzek
d62dcd397d VideoConfig: Drop force vertex/pixel ubershader settings
This was mainly included for debugging, but could end up being confusing
for users, as well as polluting the GL program cache with a mix of uber
and specialized shaders if the option was changed.
2017-07-31 23:21:38 +10:00
Lioncash
f6c21e002b General: Remove unnecessary semicolons 2017-07-30 16:39:53 -04:00
Stenzek
e968c191ff Ubershaders: Support per-pixel lighting 2017-07-30 17:43:59 +10:00
Stenzek
c8f31656cb VideoBackends: Support a different number of threads for precompiling
At runtime, we only really want a single shader compiler thread.
However, for initial boots, we can use a higher number to speed things
up.
2017-07-30 17:43:59 +10:00
Stenzek
e17efb1d8d ShaderGen: Use consistent variable names for texture coordinates 2017-07-30 17:43:59 +10:00
Stenzek
25338c53e0 NativeVertexFormat: Drop unused virtual method SetupVertexPointers 2017-07-30 17:43:59 +10:00
Stenzek
33f6668544 Vulkan: Multithreaded creation of UID pipeline caches
Should give a decent speedup to boot time.
2017-07-30 17:43:59 +10:00
Stenzek
81b4ed2a81 Vulkan: Uber shader support 2017-07-30 17:43:59 +10:00
Stenzek
4bf5625895 D3D: Uber shader support 2017-07-30 17:43:59 +10:00
Stenzek
cd502990fa OGL: Uber shader support 2017-07-30 17:43:59 +10:00
Stenzek
7d78cf0f6f ShaderGen: Implement pixel ubershaders 2017-07-30 17:43:59 +10:00
Stenzek
f48ef65bec XFMemory: Convert several registers to bitfields 2017-07-30 17:43:59 +10:00
Scott Mansell
479abde9f4 BPMemory: Convert a number of unions to BitFields 2017-07-30 17:43:59 +10:00
Stenzek
357c55442f Vulkan: Clear decoding texture before usage
Fixes a validation layer warning.
2017-07-30 12:38:50 +10:00
Stenzek
aff44684a4 Vulkan: Move shader/pipeline-related methods to ShaderCache 2017-07-30 12:38:49 +10:00
Stenzek
d23fd17e1a Vulkan: Use VK_NV_glsl extension where available, and skip glslang
Seems to produce faster ubershaders, at least.
2017-07-30 12:38:49 +10:00
Stenzek
3ea9d86faa ShaderGen: Pass host config to shader generation functions
Also moves the host config checks to common.
2017-07-20 17:54:33 +10:00
Stenzek
d01b0bf60f VideoCommon: Move shader cache filename generation to common 2017-07-20 17:46:59 +10:00
Stenzek
7c5bbafdd1 Vulkan: Don't save/load pipeline UID cache when shader cache is disabled 2017-07-20 17:46:59 +10:00
Stenzek
b380f292b4 Vulkan: Reload pipeline cache when relevant host config changes 2017-07-20 17:46:59 +10:00
Stenzek
a8343cc19a Vulkan: Don't save pipeline cache if shader cache is disabled
We still create a pipeline cache object, since that speeds up driver's
creation of pipelines at runtime. However, we should not save it.
2017-07-20 17:46:59 +10:00
Stenzek
d9a3b29a07 Vulkan: Emit input/output locations for EFB poke geometry shader 2017-07-20 17:46:59 +10:00
Stenzek
228ddb8aba D3D11: Reload shader cache when relevant config changes 2017-07-20 17:46:59 +10:00
Stenzek
62a901508b OGL: Reload shader cache when relevant video config changes 2017-07-20 17:46:59 +10:00
Jules Blok
3fc9a48da0 D3DBase: Use the swapchain discard mode when possible. 2017-07-10 14:25:28 +02:00
Jules Blok
65495a1297 D3D: Resize the swapchain when the fullscreen state is changed 2017-07-10 14:24:11 +02:00
Jules Blok
07c5dcd739 D3DBase: Set the fullscreen state in Create() 2017-07-10 14:03:04 +02:00
Jules Blok
0f13c61daa D3DBase: Only create a stereo swapchain when needed. 2017-07-10 01:24:43 +02:00
Jules Blok
77a318789a D3DBase: Implement Windows 7 swapchain fallback. 2017-07-10 01:02:29 +02:00
Jules Blok
938939136e D3DBase: Only use temporary mono when supported by the swapchain. 2017-07-10 01:02:05 +02:00
Jules Blok
b485329353 D3DBase: Set the monoscopic flag when we don't use stereoscopy. 2017-07-05 22:43:39 +02:00
Jules Blok
1f2d43c870 Vulkan: Implement Quad-Buffered stereoscopy support. 2017-07-05 22:43:39 +02:00
Jules Blok
f3508742ac OGL: Support Quad-Buffered stereoscopy. 2017-07-05 22:43:39 +02:00
Jules Blok
2ab068d3f2 D3DBase: Always create a stereo swapchain. 2017-07-05 22:43:39 +02:00
Jules Blok
179602e921 D3D: Add quad-buffer stereoscopy support. 2017-07-05 22:43:39 +02:00
Jules Blok
6863abb31d D3DBase: Switch to a flip-model swap chain. 2017-07-05 22:43:39 +02:00
Jules Blok
c399e2bc40 D3DBase: Upgrade to DXGI 1.2.
This effectively drops for Vista and Windows 7 without the Platform Update in this backend.
2017-07-05 22:43:39 +02:00
Jules Blok
4a7b96c93a FramebufferManager: Fix EFB layers being attached to the wrong FBO.
Fixes typo in commit 56fe938366.
2017-06-27 23:42:42 +02:00
Lioncash
07cddf6f7f AbstractTexture: Add missing includes (and remove unnecessary ones) 2017-06-18 23:29:22 -04:00
shuffle2
e63c337830 Merge pull request #5305 from iwubcode/abstract_texture
Abstract Texture
2017-06-18 12:57:05 -07:00
Leo Lam
bc9c9b9fe4 Merge pull request #5594 from MerryMage/phack
Cleanup Projection Hack
2017-06-16 18:36:39 +02:00
Florent Castelli
0b504fa046 d3d: Add missing include 2017-06-16 05:52:01 +02:00
Leo Lam
8f460a1cda Merge pull request #5611 from JosJuice/reorganize-file-namespace
Reorganize File namespace
2017-06-15 23:28:36 +02:00
JosJuice
cf94ce6305 Add a namespace to OpenFStream
For consistency with the other functions in FileUtil.h.
2017-06-15 21:34:04 +02:00
JosJuice
f09ceaa735 Move IOFile to a separate file
Reduces the number of files that need to be recompiled
when making changes to FileUtil.h.
2017-06-15 21:33:50 +02:00
MerryMage
f8a99ca192 VertexShaderManager: Rename projection hack variables 2017-06-15 16:38:10 +01:00
iwubcode
e4896d39bd Video Backends: Move and rename HostTextureFormat to AbstractTextureFormat 2017-06-13 00:41:56 -05:00
iwubcode
2cdc93f4ab Video Backends: Split texture cache code out into separate files, introduce 'AbstractTexture' 2017-06-13 00:41:51 -05:00
Stenzek
8a56ef42dc Vulkan: Fix image layout assertion failing for palette textures 2017-06-13 14:47:09 +10:00
shuffle2
2b86cf02a8 Merge pull request #5589 from stenzek/vulkan-validation-fixes
Vulkan: Don't transition image layouts inside render passes
2017-06-11 16:59:02 -07:00
MerryMage
a0b41c83e7 VideoConfig: Remove bRunning
Value was set but not used.
2017-06-11 15:06:12 +01:00
Stenzek
ca55ba6c1d Vulkan: Transition texture cache entries before usage 2017-06-10 23:52:39 +10:00
Stenzek
8bb6abacf8 Vulkan: Transition EFB/XFB buffers before beginning swap render pass
Image layouts shouldn't be changed within a render pass.
2017-06-10 23:52:32 +10:00
Shawn Hoffman
5480efdff2 video: change multisample/AA setting to u32 2017-06-07 20:20:25 -07:00
Shawn Hoffman
ab4a785f1b d3d: silence variable shadowing warning 2017-06-07 20:09:43 -07:00
Shawn Hoffman
e1a3e41bf3 fix various instances of -1 being assigned to unsigned types 2017-06-07 19:52:07 -07:00
shuffle2
c8166951a0 Merge pull request #5418 from MerryMage/config-again-and-again
VideoConfig: Port to layered configuration system
2017-06-05 21:11:04 -07:00
Shawn Hoffman
7431dd3dce msbuild: make Externals inclusion methods uniform 2017-06-03 18:20:41 -07:00
Shawn Hoffman
a3caa14ade remove duplicate code in msbuild files 2017-06-03 18:20:40 -07:00
Shawn Hoffman
397720a9fe might as well update yet some more pointless version numbers.. 2017-06-03 18:20:40 -07:00
MerryMage
f5f45855f0 GameConfigLoader: Add GFX Game INI translations 2017-06-03 18:13:02 +01:00
iwubcode
1b685bcde9 Fix for loop in D3D Renderer ApplyState function 2017-05-29 23:32:32 -05:00
Leo Lam
c76335eaf1 Merge pull request #5484 from BhaaLseN/permissive
Windows: Enable MSVC Standards Conformance (/permissive-)
2017-05-29 22:29:44 +02:00
Lioncash
d6b6b070bc D3D/Render: Get rid of undefined behavior in Create3DVisionTexture
pSysMem is of the type const void* -- because of this, it makes the
original delete[] call undefined behavior, as deleting a void pointer is
undefined behavior.

Also punning types into existence, like what was done for the stereo
image header is undefined behavior as well. The proper way to do this is
to either manually add all individual bytes manually, or memcpy the
struct into memory.

As we want to deallocate the memory before returning, and because
pSysMem is a const void*, we keep a unique_ptr to the data and just pass
pSysMem a raw pointer to the data.
2017-05-28 23:28:00 -04:00
Lioncash
278e406f0b D3D/Render: Use std::array where applicable 2017-05-28 23:28:00 -04:00
Lioncash
0c3958bbe5 D3D/Render: Join variable with declaration 2017-05-28 23:27:59 -04:00
Lioncash
3ee447e5f7 D3D/Render: Get rid of unnecessary casts 2017-05-28 23:27:59 -04:00
Lioncash
ba5b215c42 D3D/Render: Mark translation unit local variables as static 2017-05-28 23:27:59 -04:00
BhaaL
072c161445 upgrade to Windows SDK 10.0.15063.0
this is required for /permissive- to work, because some headers in the
Windows SDK use Microsoft extensions that are not allowed in standards mode
2017-05-28 13:37:31 +02:00
Michael Maltese
e041602416 CMake: remove references to D3D12
It's gone!
2017-05-26 01:16:04 -07:00
Pierre Bourdon
d592bdd4d4 Migrate to Visual Studio 2017.
Auto-generated by the IDE, I'll trust it knows what it's doing.
2017-05-25 15:58:59 -07:00
Helios747
a465c483f3 Remove D3D12 2017-05-18 17:01:12 -07:00
lcsondes
94be591606 VS2017 build fix after upgrading project 2017-05-13 20:34:27 +01:00
degasus
afb0beb9ab OpenGL: Mute nvidia performance warning about stalling the GPU.
They are right, our perf query implementation is terrible.
But raising a warning makes it just even slower.
2017-05-03 23:48:14 +02:00
Stenzek
cc851c41c1 TextureCache: Move host texture utility functions to VideoCommon
The appropriate place for these would be AbstractTexture, once it is
finished.
2017-04-29 13:46:43 +10:00
Stenzek
c53a60f3c3 Vulkan: Support native compressed textures 2017-04-29 13:46:42 +10:00
Stenzek
3f18c5e0f1 D3D12: Support native compressed textures 2017-04-29 13:46:42 +10:00
Stenzek
2d75c2ab10 D3D11: Support native compressed textures 2017-04-29 13:46:42 +10:00
Stenzek
f5d95dcc86 OGL: Use native compressed textures on supported drivers 2017-04-29 00:44:34 +10:00
Stenzek
f4b848949c TextureCache: Support compressed textures and pass pitch/size to upload
This also removes an extra copy of the image for custom textures.
2017-04-29 00:14:23 +10:00
Stenzek
bc8a96d713 HiresTextures: Support parsing DDS files directly
This leaves DDS textures using DXT1/3/5 compressed in-memory, which can
be passed directly to the backend.
2017-04-29 00:14:23 +10:00
Stenzek
27ae5b8d34 VideoConfigDiag: Move post-processing shader list to post processor
The backends don't use this list at all, and since more than one
backend supports post-processing now, it's duplicate code.
2017-04-25 14:27:05 +10:00
Stenzek
417a4ca206 Vulkan: Implement post-processing backend
No new features, just parity with OpenGL.
2017-04-25 14:27:02 +10:00
Stenzek
a10e8b1ef5 VideoCommon: Move the blit methods to the backend class
The parameter types will be different for each backend currently,
anyway (e.g. textures/render passes/etc).
2017-04-25 14:25:41 +10:00
Stenzek
d1dc9d5a0c Merge pull request #5284 from stenzek/vulkan-videocommon-blending-state
Vulkan: Use BlendingState from VideoCommon
2017-04-18 22:16:32 +10:00
Stenzek
16a947a88b Merge pull request #5270 from stenzek/vulkan-aa
Vulkan: MSAA and frame dumping fixes
2017-04-18 21:58:14 +10:00
Stenzek
fd896bd9e0 OGL: Drop BlendingState.dither
How GL_DITHER works is implementation-defined, and we handle the
non-blended case in the pixel shader.
2017-04-18 21:55:23 +10:00
Stenzek
ddc5275071 VideoCommon: Drop SetDitherMode()
It was a no-op on all backends apart from GL anyhow.
2017-04-18 21:55:22 +10:00
Stenzek
9dc7358395 Vulkan: Use BlendingState from VideoCommon
Remove the internal BlendState union. Also fixes Kirby's Return to
Dreamland shadows.
2017-04-18 21:55:22 +10:00
Stenzek
34ad5b457d VideoCommon: Add usedualsrc field to BlendingState
This is because we re-use BlendingState for our internal drawing (e.g.
RasterFont) and for these shaders, we can't assume the presence of a
second color output.
2017-04-18 21:33:40 +10:00
Stenzek
e370f6a82a OGL: Use struct for post-processing shader options
This removes the need for token pasting, which isn't supported in GLSL
ES. Shouldn't cause any issues unless people are using reserved keywords
as option names.
2017-04-16 14:00:02 +10:00
Stenzek
3fd1e6c2f6 Vulkan: Ensure all frames are written before resizing framedump buffer
Prevents destroying a framebuffer that may still be in use by a previous
frame dump.
2017-04-15 20:00:40 +10:00
Stenzek
48da42b49f Vulkan: Ensure framedump texture is incorrect layout for render/readback 2017-04-15 19:57:25 +10:00
Stenzek
69b0a31938 Vulkan: Clamp framebuffer resolve rectangle to texture size
This is invalid and was causing the NVIDIA driver to throw an error.
2017-04-15 19:55:32 +10:00
Stenzek
eef7b6cf7a Vulkan: Fix invalid resolve at swap time when MSAA is enabled 2017-04-15 18:35:58 +10:00
Stenzek
c8b98dca1a Vulkan: Raise the number of texel buffer/storage image descriptors
Running with GPU texture decoding enabled could cause us to run out of
descriptors within a single frame.
2017-04-14 18:29:53 +10:00
Stenzek
f4bdfe3e0c Vulkan: Fix incorrect render pass area for out-of-range clears
This occured when a game set an out-of-range EFB clear region.
2017-04-14 18:29:48 +10:00
Stenzek
5e7bd03d0b Vulkan: Linear filter >1xIR EFB copies, matching the other backends 2017-04-12 00:11:22 +10:00
Stenzek
e9850aa0f2 VideoBackends: Support updated texture encoding shader generators 2017-04-12 00:11:22 +10:00
Markus Wick
4e90c5da8b Merge pull request #5234 from lioncash/tuple
RenderBase: Return tuples from CalculateTargetScale and ConvertStereoRectangle instead of using out parameters
2017-04-11 10:27:16 +02:00