Commit graph

84 commits

Author SHA1 Message Date
Stenzek
828aac7890 VideoBackends: Make TextureCache::CompileShaders return a bool 2016-10-01 01:09:12 +10:00
Lioncash
5b3c74a31a OGL: Remove unnecessary c_str calls 2016-09-09 06:30:34 -04:00
Pierre Bourdon
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
mimimi085181
bb4d636f34 Copy all layers of textures with CopyRectangleFromTexture 2016-02-14 21:17:06 +01:00
Scott Mansell
d8e5d8659e TextureCache, fix an incorrect assert. 2015-12-29 14:25:31 +13:00
Lioncash
8ce3a4aa70 ShaderGeneration: Get rid of static buffers 2015-12-26 17:01:54 -05:00
Lioncash
d20ba76ab3 StreamBuffer: Make factory function return a std::unique_ptr 2015-12-21 10:21:38 -05:00
Ryan Houdek
21b708106c Make sure not to use a GL texture buffer past the max size.
The spec says that vendors can set the max texture size to be 65KB and we want 1MB.
Check the maximum supported and drop to the max if it is less than 1MB
2015-11-30 01:18:03 -06:00
degasus
087ba5268a TextureCache: Rewrite EFB Copy control flow 2015-11-15 12:02:41 +01:00
degasus
dcdf8fd3ce TextureCache: Split efb2ram from efb2tex 2015-11-15 11:59:52 +01:00
degasus
71b22702a1 OGL-TextureConverter: Keep care about the global state ifself 2015-11-15 11:59:52 +01:00
degasus
495902787c OGL: Remove TCache::Entry usage in TextureConverter 2015-11-15 11:59:52 +01:00
Rohit Nirmal
3b75f45cf6 Fix building with PCH disabled. 2015-09-28 11:51:08 -05:00
Scott Mansell
95f3c956a8 Move GL interface code out of the OpenGL video backend. 2015-09-22 00:36:45 +12:00
Scott Mansell
ee649c6d9f Make efb2tex behave more like efb2ram.
Instead of having special case code for efb2tex that ignores hashes,
the only diffence between efb2tex and efb2ram now is that efb2tex
writes zeros to the memory instead of actual texture data.

Though keep in mind, all efb2tex copies will have hashes of zero as
their hash.
2015-09-07 02:32:01 +12:00
Scott Mansell
137856bd00 Fix palette conversions for 4 bit efb copies.
Fixes purple shadow in THPS4 and many other things.
2015-09-06 21:16:52 +12:00
Scott Mansell
b9be3245e1 Move common EFB copy code into VideoCommon
Addded a few duplicated depth copy texture formats to the enum
in TextureDecoder.h. These texture formats were already implemented
in TextureCacheBase and the ogl/dx11 texture cache implementations.
2015-09-06 21:16:51 +12:00
Scott Mansell
52948bb3ef Cleanup and unify handling of efb copy stride. 2015-09-05 23:37:24 +12:00
Jules Blok
7e266b080f TextureCache: Remove redundant floor(). 2015-08-15 15:30:50 +02:00
Jules Blok
b01ca1794a Revert "VideoCommon: Clamp integer conversions."
This reverts commit 0f2c72f0f8.
2015-08-15 13:50:43 +02:00
degasus
e2f42f8fd0 OGL: Move copy_image variable into backend. 2015-08-06 19:41:36 +02:00
booto
2e28ed3291 Video: respect stride of efb copies to xfb 2015-07-25 01:52:12 +08:00
Rodolfo Bogado
d8cd2c3252 Implement scaled partial texture updates 2015-07-02 08:53:40 -03:00
mimimi085181
0ed6b5623f Support partial texture updates via efb copies 2015-06-21 14:02:44 +02:00
degasus
c4fc141ced OGL: Always use sampler objects.
We are used to use the texture parameter for all util draw calls,
but AMD seems to have a bug where they use the sampler parameter
of stage 0 if no sampler is bound to the used stage.
So as workaround (and a bit as nicer code), we now use sampler
objects everywhere.
2015-05-29 14:03:03 +02:00
Tillmann Karras
285ac34bf3 OGL: use GL_TEXTURE* constants 2015-05-27 15:05:49 +02:00
Tillmann Karras
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Jules Blok
0f2c72f0f8 VideoCommon: Clamp integer conversions. 2015-05-08 14:32:16 +02:00
Jules Blok
b0770e2a0c VideoBackends: Floor depth values in depth copy shaders. 2015-05-08 14:29:30 +02:00
Jules Blok
c4f85a38e6 VideoBackends: Use proper floating point depth precision. 2015-05-08 14:29:29 +02:00
Jules Blok
7a1252f7e5 VideoBackends: Implement depth copy shaders with integer math. 2015-05-05 00:40:25 +02:00
Jules Blok
54f4443971 VideoCommon: Implement EFB dumping for both backends. 2015-05-02 13:23:33 +02:00
Pierre Bourdon
f06b1106db Merge pull request #2089 from degasus/remove_disable_efb_copy
Remove disable efb copy
2015-02-24 23:31:05 +01:00
degasus
967eaad8df VideoCommon: rename efb2tex and efb2ram 2015-02-24 23:10:13 +01:00
degasus
ac7102918d OGL: support palette texture decoding 2015-02-24 22:51:55 +01:00
Tillmann Karras
f298f00e1b Clean up the intrinsics #ifdef mess 2015-02-24 01:02:36 +01:00
magumagu
c0a4760f0e Decode EFB copies used as paletted textures.
A number of games make an EFB copy in I4/I8 format, then use it as a
texture in C4/C8 format.  Detect when this happens, and decode the copy on
the GPU using the specified palette.

This has a few advantages: it allows using EFB2Tex for a few more games,
it, it preserves the resolution of scaled EFB copies, and it's probably a
bit faster.

D3D only at the moment, but porting to OpenGL should be straightforward..
2015-02-19 15:09:27 -08:00
magumagu
6659c15bed Remove EFB to RAM cache, and simplify code. 2015-01-23 10:48:15 -08:00
degasus
6cd6e6546f TexCache: merge texture and rendertarget factory function 2015-01-18 19:47:48 +01:00
degasus
615ae9f106 TexCache: remove PC_TexFormat
We only support rgba32 for a while now, so there is no need to have everything in common configureable.
2015-01-18 19:47:48 +01:00
degasus
7284312568 OGL: Warn about wrong texture sizes 2015-01-11 22:47:40 +01:00
degasus
d95e5e2b6f TexCache: create a const Config struct 2015-01-11 22:23:35 +01:00
Markus Wick
6c46f27709 Merge pull request #1501 from degasus/texture_creation
D3D: remove load texture on creation optimization
2015-01-11 01:01:18 +01:00
mimimi085181
56e93f8fdd Update size_in_bytes of texture cache entries when copying efb to ram 2015-01-10 13:47:52 +01:00
degasus
38f42da55a TexCache: remove expanded_width
This variable isn't use any more.
2015-01-10 12:22:03 +01:00
degasus
614d058db1 TexCache: don't load tex level 0 on creation
This reverts an optimization which isn't worth imo. Every texture uploads have to alloc vram and a staging buffer, so there is no need to do both in the same call.
2015-01-10 12:21:33 +01:00
Jules Blok
29e05c5ff8 Stereo3D: Don't rely on GetEFBLayers() when dealing with shaders.
Shaders may be compiled before the FramebufferManager is initialized.
2014-12-29 11:19:55 +01:00
Jules Blok
31a55384b3 VideoConfig: Rename "StereoMonoEFBDepth" to "StereoEFBMonoDepth"
Makes a little bit more sense.
2014-12-24 23:30:40 +01:00
Jules Blok
b2efbdaf44 Cosmetics. 2014-12-23 13:16:09 +01:00