Commit graph

280 commits

Author SHA1 Message Date
Henrik Rydgard
7cf05e44a2 Add option to vertexdecoder to expand UVs to floats 2014-09-12 02:00:31 +02:00
Unknown W. Brackets
33ac30218a Bind the alphatest tex after we know vert alpha.
Before we sometimes thought alpha test was trivially true when it wasn't.
2014-09-10 23:43:48 -07:00
Unknown W. Brackets
94c1271761 Add an experiment with using a texture for tests.
Using an option for now so it's easy to test, if it works well we can
maybe remove the option.
2014-09-07 10:04:57 -07:00
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
32a11dc28d Minor optimization for prescale/not, fix switch. 2014-06-29 15:47:00 -07:00
Unknown W. Brackets
596abeca06 Use the same vertex decoders for splines.
Had the vert type bits at the top.
2014-06-29 15:46:59 -07:00
Unknown W. Brackets
95f4341838 Allow changing prescale uv at runtime. 2014-06-28 21:51:25 -07:00
Unknown W. Brackets
1c3b60a8ee Allow changing software skinning at runtime. 2014-06-28 21:46:43 -07:00
Henrik Rydgard
8b60fe0239 Ridge Racer hack: Flush after every prim if fb addr == tex addr.
Fixes the bloom errors. @unknownbrackets discovered this method.

Not sure if I want to merge this.. It does add yet another check
to a critical path.
2014-06-22 20:37:50 +02:00
Unknown W. Brackets
9b12a4893d Track framebuffer memory dirty more carefully.
Fixes #6296, Grand Knights History slowdown during battle transition.  May
also more correctly identify block transfer downloads.
2014-06-11 22:21:08 -07:00
Unknown W. Brackets
7226aad903 Don't allow the buf name cache to get too full. 2014-06-07 16:28:24 -07:00
Unknown W. Brackets
5f521bcfb0 Reuse buffer objects when possible.
glBufferData() recreates anyway.
2014-06-07 16:20:12 -07:00
Unknown W. Brackets
4971206e92 Allocate vertexcache buffer names in chunks.
Partially implements #6045.
2014-06-07 16:15:37 -07:00
Unknown W. Brackets
8d1b3ae7aa Fix a vertexdec crash from the ge debugger. 2014-06-06 21:06:29 -07:00
Unknown W. Brackets
8f9a2b9882 Unbind the fbo texture when it's not used.
Just in case there are problems with decimating it or etc.
2014-05-27 01:45:20 -07:00
Unknown W. Brackets
ff8f1fa569 Avoid the GE debugger affecting vertexFullAlpha. 2014-05-04 09:54:54 -07:00
Unknown W. Brackets
d91ad87daa Small perf improvements in DecodeVertsStep(). 2014-04-05 12:32:10 -07:00
Unknown W. Brackets
bb2fb12edd Inline SetupVertexDecoder() in SubmitPrim().
Everything SubmitPrim() calls is expensive...
2014-04-05 01:25:04 -07:00
Unknown W. Brackets
e7639f666c Ensure stuff run on every prim are inlined.
These both get a ton of calls and show up on profiles.
2014-03-30 00:42:26 -07:00
Unknown W. Brackets
466a5418d2 Cut time in EstimatePerVertexCost().
From profling, this cuts 4% time while lighting is enabled, and 14% while
disabled (on ARM.)  But maybe should just inline this...
2014-03-30 00:42:26 -07:00
Unknown W. Brackets
a4327702f1 Reduce some includes under GPU/. 2014-03-29 16:51:38 -07:00
Unknown W. Brackets
69c2500dc6 Make sure vai->flags are set while hashing.
Since we decode the verts in this case we have a fresh flag.  Might
be #5718?
2014-03-25 08:19:38 -07:00
Henrik Rydgård
cf3d75975d Merge pull request #5720 from unknownbrackets/texcache
Optimize xxHash for ARM/NEON devices
2014-03-25 09:32:15 +01:00
Unknown W. Brackets
b800762ceb Add a NEON-optimized version of XXH32.
This takes at least 40% less time to hash on NEON/ARM devices.
2014-03-25 00:34:55 -07:00
Henrik Rydgard
dc07d3410a More checks for alpha test elimination 2014-03-24 17:33:20 +01:00
Henrik Rydgard
2c76e6d023 Correctly keep track of "full alpha" in vertices (x86 jit only). 2014-03-24 11:19:44 +01:00
Henrik Rydgard
f2f0355d94 Split up ApplyShader into ApplyVertexShader and ApplyFragmentShader.
Will allow the alphatest avoiding optimization later.
2014-03-24 10:55:07 +01:00
Henrik Rydgard
b174996c1c Add a conservative check that prevents alpha testing in a few cases.
This will become really powerful if we add some code to the vertex decoder
to check for non-full alpha in the vertices, and set gstate_c.vertexFullAlpha if none
is found (probably want to do the reverse, set it to true and clear if any non-255 alpha is found).

Alpha testing is a performance killer on many mobile GPUs so big efforts to
avoid it can be worth it.
2014-03-23 16:32:38 +01:00
Henrik Rydgard
20d480a374 Minor GPU code cleanups 2014-03-23 16:32:38 +01:00
Henrik Rydgard
8b92dcea47 Transform: Compute the "DCID" (draw call ID) incrementally instead of an extra pass. 2014-03-23 01:51:51 +01:00
Henrik Rydgard
b4d99b1981 Revert "Avoid caching when HW T&L with morph enabled."
This reverts commit 557eae7ca9.
2014-03-15 10:46:04 +01:00
raven02
557eae7ca9 Avoid caching when HW T&L with morph enabled. 2014-03-14 21:04:32 +08:00
Henrik Rydgard
9e6d7abf4e Minor cleanup 2014-02-12 11:10:44 +01:00
Unknown W. Brackets
7380c5b664 Stop showing z = 1.0 for non through in debugger.
Oops.
2014-02-09 00:33:15 -08:00
Unknown W. Brackets
e7eca477b0 Add a tab to show vertex values to the GE debugger.
Should be pretty useful, especially for depth issues.
2014-02-08 22:03:29 -08:00
Unknown W. Brackets
d2108a962e Switch from USING_GLES2 to MOBILE_DEVICE.
Still using USING_GLES2 for, well, GLES2.  But for things that are really
about mobile, we need a new define.  Devices are coming that don't use
GLES2.
2014-02-08 16:37:58 -08:00
Unknown W. Brackets
79864a5ee0 Fix some initialization order warnings. 2014-01-10 22:21:24 -08:00
Unknown W. Brackets
473fb866e6 softgpu: Implement vertex preview.
And move ConvertMatrix4x3To4x4() into a common place since there were
differing implementations, which was only confusing.
2013-12-29 13:45:10 -08:00
Henrik Rydgård
9e42086e21 Logspam reduction 2013-12-09 13:45:17 +01:00
Sacha
756f651eb2 Buildfix for older compilers, such as GCC 4.6.3 2013-11-22 16:22:41 +10:00
Unknown W. Brackets
70b6a4a796 Small optimization to vertex preview. 2013-11-20 22:36:48 -08:00
Henrik Rydgard
e3d471f590 Fix issues with texturing from render targets with prescaled UV (texcoord speed hack) 2013-11-19 23:38:36 +01:00
Unknown W. Brackets
ed16e42ca8 Cleanup, don't even need z here. 2013-11-17 14:49:51 -08:00
Unknown W. Brackets
018d95180a Fix 3d vertex preview. 2013-11-17 14:31:21 -08:00
Unknown W. Brackets
a3bd2f1365 Fix Vec3ByMatrix44() and use it for matrix math. 2013-11-17 14:10:57 -08:00
Unknown W. Brackets
b541c81ba3 Clean up Mat3x3 etc. constness. 2013-11-17 13:27:51 -08:00
Unknown W. Brackets
fcc77f525f Implement some basic vertex previews on prim.
3D doesn't work correctly (sometimes it does...)  2D should be working.
2013-11-17 13:27:50 -08:00
Henrik Rydgard
b0ccf5981c Don't bother with glDrawRangeElements, seems to not improve perf. 2013-11-14 17:33:43 +01:00
Henrik Rydgard
3b63ef7005 Remove the SubmitPrim param forceIndexType, optimize BBOX more. 2013-11-14 14:03:03 +01:00
Henrik Rydgard
35ae239eb9 Optimize bbox some more 2013-11-14 12:25:53 +01:00