Commit Graph
399 Commits
Author SHA1 Message Date
Henrik Rydgård 5fa331bb56 Merge pull request #6310 from hrydgard/deferred-scaling
Limit the amount of texture scaling done per frame to reduce stutters
2014-06-14 08:59:40 +02:00
Unknown W. Brackets 673e92927a Avoid an infinite loop on small heights. 2014-06-13 23:37:08 -07:00
Henrik Rydgard 4e81eadc88 Minor cleanup in texcache 2014-06-14 00:18:37 +02:00
Henrik Rydgård 2f86e3e021 Clear STATUS_TO_SCALE at a better place 2014-06-13 23:01:40 +02:00
Henrik Rydgård ea9f8d8bf3 Comment out the deferred scaling logs. 2014-06-13 22:11:25 +02: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 f84650b6be Report possible textures at subareas > 32.
For the ones outside the hack 0x04110000 range.
2014-06-13 09:19:51 -07:00
Unknown W. Brackets 025b92593a Just don't use render-to-text format mismatches.
This already excludes CLUTs.
2014-06-12 07:46:56 -07:00
Unknown W. Brackets 1a25456e52 Detach a format mismatch that's not rendering.
Assume we'd be better off reading ram.
2014-06-12 00:48:21 -07:00
Unknown W. Brackets 89206a8a09 Allow render-to-tex with > 16 y offset.
Trying to keep it cautious in case our sizes are wrong.
2014-06-12 00:41:42 -07: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 3884550c7b Remove a few TODOs that aren't relevant anymore. 2014-06-08 22:35:48 -07:00
Henrik Rydgård 89667a870b Merge pull request #6259 from unknownbrackets/fbtex-offset
Apply byte offset when using rendered textures
2014-06-08 23:34:22 +02:00
Unknown W. Brackets 865941a66d Ignore needShaderTexClamp when not texmapping. 2014-06-08 14:27:57 -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
Henrik Rydgard 9c799b773d Don't use glTexStorage2D, see issue #6075
Probably didn't help much anyway.
2014-06-08 18:36:18 +02: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 cc841bbe4c Apply tex wrap/clamp in shader for render-to-tex.
Fixes graphical artifacts in Wild Arms XF (which depends on how you get
there, because it's based on the size of the framebuffer.)
2014-06-07 13:13:58 -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
Henrik Rydgård e6d3a9c1b6 Merge pull request #6211 from unknownbrackets/framebuf-estimate
Another attempt at framebuffer size estimate changes
2014-06-03 10:50:21 +02:00
Unknown W. Brackets 238bdce2b8 Detect if framebuffer clut uses alpha.
It's not a perfect check but it may allow skipping alphatests sometimes.
2014-06-03 01:06:02 -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 a18eceac71 Don't skip alpha in 565/clut framebuffers textures. 2014-06-03 00:45:15 -07:00
Unknown W. Brackets c2ccfd5629 Stop stretching things to the FBO size.
Instead, draw in the top corner.  This way, even if framebuffers get
smaller things stay consistent.
2014-06-01 21:20:04 -07:00
Sacha 319c0efcb2 Remove MAY_HAVE_GLES3 2014-06-02 12:08:49 +10: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 4195eac04f Get rid of depalFBOs when overwriting textures.
Just in case they are not always used as framebuffers.  We set to 0 later
anyway.
2014-06-01 01:03:04 -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. BracketsandHenrik Rydgard 29a9ff369e Make a note when we need to reset the shader.
Hmm, not sure this is the cleanest way.
2014-05-27 22:12:25 +02:00
Unknown W. BracketsandHenrik Rydgard 14c081904c 5650 is also simple alpha. 2014-05-27 22:12:24 +02:00
Unknown W. BracketsandHenrik Rydgard 5f99f663ef Avoid duplicating an FBO when depaletizing it. 2014-05-27 22:12:23 +02:00
Unknown W. BracketsandHenrik Rydgard 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
Unknown W. BracketsandHenrik Rydgard aa32bd6aa4 Also disable the logic op when rendering FB w/clut. 2014-05-27 22:11:18 +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 634add3a46 Depalettize works at other resolutions than 1x. For some strange reason though if you change resolution in game it breaks. 2014-05-27 22:09:26 +02:00
Henrik Rydgard d414327da7 Use a small offset to turn NEAREST into floor() when sampling the clut.
Minor fixes and cleanups.
2014-05-27 22:09:25 +02:00
Henrik Rydgard d0e65054a4 A bit closer to working. Shadow visible 2014-05-27 22:09:22 +02:00
Henrik Rydgard 8fba7fa98e Initial work on depalettization. 2014-05-27 22:07:24 +02:00
Unknown W. Brackets ec0ae44200 Don't force nearest for colortest against black.
Should fix #4217 and be relatively safe.  Probably it's a common colortest
ref color that's safe?
2014-05-15 23:52:16 -07:00
Unknown W. Brackets 99458d7797 Avoid forcing nearest/disabling linear if possible.
If we know that the test is trivially true, we don't need to worry about
the test.  May help #4405.
2014-05-15 22:38:44 -07:00
Unknown W. Brackets 2d12eb3394 Do not specify max LOD for no-mipmap textures.
Fixes #6077, incorrect filtering with no mipmaps in Popolocrois.
This was causing it to use the mag filtering setting, even when minifying.
2014-05-13 22:40:58 -07:00
Unknown W. Brackets f660c04983 Optimize double alpha blending for 1/0 textures.
If the blend is 2*a / 1-a, and the alpha is either 1 or 0, we can still
use color doubling instead.  Fixes #3379 (Persona 2.)
2014-05-11 14:17:19 -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 3fc5ba22f4 Set texture bias in constant mode 2014-04-18 18:07:52 +08:00
Unknown W. Brackets 089fea7185 Ignore uncached/kernel bits in texture cache.
Although I suppose we could respect uncached and never cache...

Possibly #5879.
2014-04-14 07:58:00 -07:00
Unknown W. Brackets a411ec6d08 Don't use BGRA for upscaled textures.
Since they aren't color swapped.  Fixes #5881.
2014-04-14 07:34:04 -07:00
Unknown W. Brackets 419e812c9a Also color swap DXT textures.
Probably #5878.
2014-04-14 01:27:47 -07:00
Unknown W. Brackets 943353faac Use GL_BGRA for 32 bit textures on Windows.
25% improvement in Popolocrois, probably decent gains in other games using
32-bit textures often.  FF2 for example doesn't.
2014-04-14 00:28:31 -07:00