Commit graph

113 commits

Author SHA1 Message Date
Unknown W. Brackets
e3e8fbf7ce Correct bufw handling when texture is unscaled. 2015-12-30 16:26:39 -08:00
Unknown W. Brackets
164594b044 Use a VAO for all drawing, and VBOs throughout. 2015-12-19 09:18:34 -08:00
Unknown W. Brackets
1339f6b1f3 Report formats on usage of rendered clut. 2015-11-26 14:31:46 -08:00
Unknown W. Brackets
400b8886e6 Use the framebuf->height for offset calculation.
This way if we shrunk the framebuffer, it'll still work.
2015-09-23 23:59:39 -07:00
Unknown W. Brackets
c7e6f051e4 Split the texture application into two stages.
The latter simply applies the texture.

This makes our IsAlphaTestTriviallyTrue() check correct.
2015-09-13 09:30:39 -07:00
Unknown W. Brackets
7d63a10fdd Centralize texture cache entry structures. 2015-09-13 06:43:37 -07:00
Unknown W. Brackets
e1df8fc45f Centralize sampling params and test optimizations. 2015-09-13 06:38:07 -07:00
Henrik Rydgard
d822cbf60b Move fbo.cpp/h from native into PPSSPP 2015-09-06 13:13:37 +02:00
Henrik Rydgard
53f062b7b2 refactor: Remove some uses of gstate from SplineCommon and a fex texcache functions 2015-07-29 11:40:45 +02:00
Henrik Rydgard
e857bd9a1c Minor code simplification in texcache 2015-07-29 10:59:02 +02:00
Henrik Rydgard
a19ea78b4b Consolidate the texture scaler code. 2015-04-08 22:52:49 +02:00
Henrik Rydgard
cae58cafee Revert "Merge pull request #7361 from hrydgard/color-conv-centralize"
This reverts commit f1b57dabf5, reversing
changes made to 41001637ce.
2015-01-22 19:53:32 +01:00
Henrik Rydgard
7faddd6100 Consolidate the two TextureScaler copies into one.
Also lets us clean up ColorConv slightly.
2015-01-20 17:32:55 +01:00
Unknown W. Brackets
795088001c Avoid passing a GPUstate by value.
Only used by Qt GE debugger thing anyway.
2015-01-17 18:21:04 -08:00
Unknown W. Brackets
d097999fad Avoid killing textures unless we have several mb. 2014-12-21 17:00:55 -08:00
Henrik Rydgard
e22fed8b9f Use unordered_map where it makes sense. Very tiny speed boost?
Also some microoptimizations.
2014-10-19 21:12:25 +02:00
Unknown W. Brackets
d48fb04a18 d3d: Declare a couple overrides. 2014-09-14 00:34:52 -07:00
Henrik Rydgard
4212bbb51e Cleanup SoftwareTransform a bit more 2014-09-13 13:15:18 +02:00
Unknown W. Brackets
b45711ba94 d3d: Centralize parts of the texture cache.
Should merge these.
2014-09-08 20:55:56 -07:00
Henrik Rydgard
6011255e6f D3D: Don't display buffered rendering upside down. Support screen scaling filter setting 2014-08-24 14:04:55 +02:00
Unknown W. Brackets
1e057a76b5 Convert all CLUT entries ever loaded.
Some games reuse previously loaded bytes, like World Neverland.  We
displayed bad colors in these cases when we don't convert all the entries.

Technically, this means we're hashing less than used in these cases, but if
we hash more we will get lots of false cache misses.

Fixes #6752.
2014-08-19 22:31:09 -07:00
Luna
62a1023615 Add "Screen Scaling Filter" option 2014-08-08 20:51:15 +02:00
Unknown W. Brackets
40f13d51e7 Separate framebuffer sampling params from tex.
This way we don't need to reset params on the texture or worry about
things like that.  We always force on the framebuffer anyway, so this is
simpler.

Also don't enable mipmaps when using a framebuffer, since they don't make
sense currently.
2014-06-15 13:34:58 -07:00
Henrik Rydgard
ab61255018 Allow only a small number of "InvalidateAll" operations per frame on the texture cache.
Reduces stutter in FF:Type0 tutorial end scene a bit more.
2014-06-15 00:40:08 +02:00
Unknown W. Brackets
0b9db176e9 Centralize render-to-tex logic, support mirrors.
Now everything is decided in AttachFramebuffer().
2014-06-14 11:04:16 -07:00
Henrik Rydgård
c0c058937f Limit the amount of texture scaling done per frame, to reduce stutters
Scaling causes really bad stutters in some games on some hardware.

This should also reduce the impact of pathological cases like the first
boss of FF Type-0 to be more bearable.
2014-06-13 22:07:26 +02:00
Unknown W. Brackets
ef12694c4b Don't update render tex x/y offset unless matched.
Sometimes we have false matches, they should be skipped.  Fixes some bloom
that is off in some games.
2014-06-09 22:45:14 -07:00
Unknown W. Brackets
acab898be0 Keep track of x/y offset for render-to-tex.
Fixes intro in Valkyrie Profile now that we're wrapping correctly.
2014-06-08 14:27:05 -07:00
Unknown W. Brackets
0896c3412d Allocate textures names in blocks.
May improve performance slightly when loading or recycling textures.
Probably uploading the texture is bigger anyway.
2014-06-07 16:13:53 -07:00
Unknown W. Brackets
3d8f078b6c Try to workaround Breath of Fire 3's render-to-tex.
It renders to two areas but textures with a high V to reach the second
texture.  We've been wrapping the V around but this may show the right
buffer.
2014-06-06 00:28:12 -07:00
Unknown W. Brackets
bf788e278d Change CheckAlpha() to apply to any pixel data.
For example, cluts.  But not yet, just changing it here.
2014-06-03 00:59:34 -07:00
Unknown W. Brackets
0846673dc3 Track temporary-use FBOs all in FramebufferManager.
This way it's easier to manage their lifecycle.
2014-06-01 01:03:43 -07:00
Unknown W. Brackets
580143e5e2 Disable vertex arrays before depal as well. 2014-05-31 22:07:42 -07:00
Henrik Rydgard
44d9af9222 Hopefully fix the Manhunt red/green swap 2014-05-27 22:22:56 +02:00
Unknown W. Brackets
5ac6fae8bb Validate framebuffer clut shaders on use.
When their parameters are actually the ones we are going to use.
2014-05-27 22:11:20 +02:00
Henrik Rydgard
7062da0483 Fix some more issues. The snow scene in FF Type 0 now looks B/W instead of broken. 2014-05-27 22:10:36 +02:00
Henrik Rydgard
8fba7fa98e Initial work on depalettization. 2014-05-27 22:07:24 +02:00
Unknown W. Brackets
ba2cf4f1d9 Make sure to rebind a texture after changing it. 2014-05-27 02:04:02 -07:00
Unknown W. Brackets
779a52e08a Don't forget tex alpha if only a mip has none.
Mip levels should only move toward unknown.
2014-05-04 09:54:53 -07:00
raven02
abc5c86339 Split out texture level 2014-04-19 06:45:17 +08:00
raven02
95d2848f07 Define texture level mode 2014-04-18 18:06:38 +08:00
Unknown W. Brackets
dc0eea0522 Propagate texcache hash fails through cluts.
In games that use palette swapping (hi, FF2), if we detect a change in
a texture, another texture with the same address but new clut might not be
rehashed.

This just marks all other textures as dangerous when a hashfail occurs.

Fixes FF2 from recent optimizations.  It's slower, but still much faster
than before.
2014-04-13 16:20:58 -07:00
Unknown W. Brackets
b6dc7eba8b Simplify texture status checks a bit. 2014-04-13 13:19:35 -07:00
Henrik Rydgard
d83a5da6bd Fix glTextureStorage2D issue by scaling w/h. Fixes #5625 2014-04-02 00:15:41 +02:00
Unknown W. Brackets
b626daca59 Correct CheckAlpha() for un-rearranged textures.
Fixes #4403.  It was just not seeing the alpha when a texture had a large
bufw and a small w, and transparent only near the bottom - as in FF1's case.
2014-01-26 19:39:34 -08:00
Unknown W. Brackets
b48de952fd Duplicate framebuffers textured onto themselves.
This fixes #2917.

I verified that, at least for my card, blitting is much faster than
glReadPixels (by quite a margin.)
2014-01-20 07:54:39 -08:00
Unknown W. Brackets
09f1c795e5 Pass around texture pointers, not addresses.
This makes it possible to override it easier, rather than needing it in
PSP RAM.
2014-01-20 07:52:09 -08:00
Unknown W. Brackets
9680a7ccc7 Allow texture scaling on changed textures.
But only if they don't change very frequently.  Should fix #1934.
2014-01-19 20:54:48 -08:00
Henrik Rydgard
5de7bb2e2d Use GL_EXT_unpack_subimage to speed up non-pow-2 texture loads when available 2013-11-01 19:38:52 +01:00
Henrik Rydgård
df29da0b13 GLES3: Use glTexStorage2D for (possibly) more efficient texture uploading 2013-10-08 15:00:48 +02:00