Commit graph

418 commits

Author SHA1 Message Date
Unknown W. Brackets
4a8d52ab1a Add a config option for the slow framebuf effects.
Like cluts, blitting, etc.  At higher render resolutions these are
expensive, and on some mobile devices they may be too much.

Of course, they're only used when needed so this is a speedhack.
2014-07-08 23:57:27 -07:00
Unknown W. Brackets
b829be1bfe Require 25% of texture to overlap framebuffer.
Because it's probably wrong if only a small amount overlaps.
2014-06-26 00:48:48 -07:00
Unknown W. Brackets
4c62a17f72 Allow exact render-to-tex format mismatches more.
If the right format was used recently, it's still okay.  Also check the
x/y offset to try to find the best match.
2014-06-22 21:02:43 -07:00
Unknown W. Brackets
e9224e9eaa Actually set the offset framebuffer.
Oops.
2014-06-21 09:04:39 -07:00
Unknown W. Brackets
4319d5eb28 Take the closest offset framebuffer.
There could be multiple, or even an exact match too.  Make sure to take
the closest one.
2014-06-21 08:23:10 -07:00
Unknown W. Brackets
5f4a0d8174 Fix a few minor warnings. 2014-06-19 00:47:58 -07: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
Unknown W. Brackets
f6649794df Respect max texture level in GE debugger preview. 2014-06-15 10:31:16 -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
Henrik Rydgård
59bef47035 Merge pull request #6321 from unknownbrackets/texscaling
Reduce some texture scaling limits to rely on texels instead
2014-06-14 20:08:39 +02:00
Unknown W. Brackets
b1396d51b2 Log more info about skipped subarea renders. 2014-06-14 11:04:17 -07:00
Unknown W. Brackets
ec7942fc8a Report decoding a texture from a VRAM mirror.
Might mainly be depth textures?
2014-06-14 11:04:16 -07: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
Unknown W. Brackets
822f936b05 Validate stride when using clut, more reporting. 2014-06-14 11:04:15 -07:00
Unknown W. Brackets
d8eaeab663 Reduce change frequency limit for texscaling.
Since we have the texels limit now, this should allow more textures to be
scaled safely.  Also, it may detect alpha optimizations in more textures,
since we currently skip them for frequently changed textures.
2014-06-14 10:49:13 -07:00
Unknown W. Brackets
0620c6edc7 Forgive freq. changed tex if they mend their ways. 2014-06-14 10:43:22 -07:00
Unknown W. Brackets
99c8319f15 Don't count unscaled frequently changing texels.
May cause more things to be scaled per frame (especially if first textures
on a frame are frequently changing.)
2014-06-14 10:40:23 -07:00
Henrik Rydgård
036cde7768 Merge pull request #6313 from unknownbrackets/gpu-minor
Implement in-shader blending on gles2 / gl2
2014-06-14 09:21:30 +02:00
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
1d9f7b04fc Implement in-shader blending on gles2 / gl2.
I'm sure it'll be slow, though...
2014-06-13 23:42:59 -07: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. Brackets
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. Brackets
14c081904c 5650 is also simple alpha. 2014-05-27 22:12:24 +02:00