Henrik Rydgard
aae254254b
Fix bad cleanup change, thanks to tapcio for pointing it out in 07b17560f
2015-07-28 01:09:48 +02:00
Henrik Rydgård
07b17560f4
Add some useful accessors to GPUState (backported from a work-in-progress branch)
2015-07-26 12:24:16 +02:00
Henrik Rydgård
0726912f09
sceDisplay, GPUState cleanup and comments
2015-07-25 09:46:11 +02:00
Unknown W. Brackets
425ff3d78f
Track bone matrix updates for future morph usage.
...
This makes them upload later, if/when they're needed.
Fixes #7746 , Shadow of Destiny artifacts when software skinning is
enabled.
2015-05-16 21:49:25 -07:00
Unknown W. Brackets
5822faabf9
Make sure to wrap clut indexes at 1024 bytes.
...
So that's 256 for 32-bit and 512 for 16-bit.
2015-04-26 00:42:58 -07:00
Unknown W. Brackets
5b61c03b7f
Avoid accidental sign ext for > 24 bit clut shift.
2015-04-26 00:26:24 -07:00
Unknown W. Brackets
67662ee23f
Force clut address to align to 16.
...
Hardware seems to ignore the lower bits when loading.
2015-04-12 22:39:49 -07:00
Unknown W. Brackets
0fc311a319
dx9: Compensate for viewport w/h adjustments.
...
Fixes text in Final Fantasy 4, world map in Star Ocean, etc.
2014-12-18 22:24:47 -08:00
Lioncash
a962bc5a6c
Mark some functions as const
2014-12-07 17:08:13 -05:00
Henrik Rydgard
01a1438dce
Improve depth buffering in D3D by computing a depth-flipped proj matrix but only when needed.
2014-09-08 23:10:23 +02:00
Unknown W. Brackets
1f51fe7843
d3d: Avoid rewriting textures, just swizzle.
...
Luckily A is in the same place and the same width, so we can do this for
all but framebuffers easily.
Technically we could do it in OpenGL as well.
Small (1-2%) performance improvement in FF2.
2014-08-28 01:20:21 -07:00
Unknown W. Brackets
a43c3771a3
More correctly blend when hitting the frame cap.
...
If we hit too many blits per frame, fall back correctly in the shader.
2014-08-18 23:20:48 -07:00
The Dax
8a78f5e814
Pause rendering when minimized, when appropriate (hopefully? This is sort of hard to test.).
2014-07-21 10:30:51 +02:00
Unknown W. Brackets
2883988f22
Ignore the high bits of the framebuffer address.
...
And depth buffer. On a PSP, these bits don't affect where it renders to
even slightly.
2014-06-21 08:29:38 -07:00
Unknown W. Brackets
2038bc5527
Support alpha / color test masks on desktop/gles3.
...
Won't work on GLES 2, though...
2014-06-16 00:33:48 -07:00
Unknown W. Brackets
f6649794df
Respect max texture level in GE debugger preview.
2014-06-15 10:31:16 -07:00
Unknown W. Brackets
030b562eb9
Support render-to-offset within a framebuffer.
...
Fixes #6324 .
2014-06-14 17:08:41 -07: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
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
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
580143e5e2
Disable vertex arrays before depal as well.
2014-05-31 22:07:42 -07: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
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
Henrik Rydgard
16f4622ac7
Remove cached light variables to reduce work when parsing DLs.
...
Also removes some duplication between GL and the inactive D3D code.
2014-04-21 12:51:19 +02:00
raven02
abc5c86339
Split out texture level
2014-04-19 06:45:17 +08:00
Unknown W. Brackets
6cfc61665d
Switch to a bitmask instead.
2014-04-13 14:45:55 -07:00
Unknown W. Brackets
4c1c694d4b
Use flags to avoid hashing textures when unchanged.
...
If only parameters change (like wrapping or clut, etc.) we don't need to
rehash the data - we know it hasn't changed.
Should reduce the distance between lazy texture hashing on and off.
2014-04-13 14:22:39 -07: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
Unknown W. Brackets
678237aa6c
Improve SSE usage in software transform.
...
It's actually already pretty decent (unlike the softgpu), but there were a
few places it could use a bit of help. Speeds up things with hardware
transform off, or areas that need to use software transform.
2014-03-17 23:05:48 -07:00
raven02
04f31c5e8e
Add gstate.isSkinningEnabled()
2013-12-16 20:42:45 +08:00
Unknown W. Brackets
a2d91ee26d
softgpu: Don't mask out so much of fb stride.
...
Seems like anything from 4 is supported in 8888, most likely it just needs
to align to 16 bytes. Values above 1024 work, but e.g. 2044 seems buggy.
Fixes the map on Hexyz Force (rendered at 80 stride.)
2013-12-15 11:59:24 -08:00
raven02
2e7609b084
Cleanup ClearmodeDepthMask
2013-12-10 20:48:20 +08:00
Henrik Rydgård
e14f17b430
isClutSharedForMipmaps: This was presumably inverted by accident?
2013-12-09 12:46:13 +01:00
Unknown W. Brackets
c6a441965e
Move shared clut check to gstate.
2013-12-08 23:11:56 -08:00
Unknown W. Brackets
435115441d
Reinitialize the GE on sceKernelLoadExec().
...
Mostly, reset the lists and draw completion, etc.
May be required for Capcom Classic Collection Reloaded to work.
2013-11-28 15:35:12 -08:00
Unknown W. Brackets
7a86ca2890
Mask block transfer stride correctly per tests.
...
1024 is valid, but nothing higher.
May help graphics in some games.
2013-11-25 01:53:33 -08:00
Henrik Rydgard
8c562a615f
Bone matrix loading speedup. Bit of a hack but seems reliable enough.
2013-11-14 14:02:31 +01:00
Henrik Rydgard
7e67476b00
Simple unoptimized software skinning.
...
Does not take advantage of the possible reduction in state changes yet.
2013-11-13 18:10:57 +01:00
Henrik Rydgard
4b98e0d6d6
Optimize LoadClut a little
2013-11-12 17:06:03 +01:00
Unknown W. Brackets
21deaef35a
Invert gstate.getClearModeColorMask().
...
It makes more sense matching gstate.getColorMask().
2013-11-10 03:20:58 -08:00
Henrik Rydgard
80702109f5
Move gpu vendor detection to native with the rest of the gl init.
...
Also disable vertical layout for mainscreen entirely.
2013-10-16 00:48:44 +02:00
Unknown W. Brackets
d49ad5f114
Use an accessor for depth/frame addresses.
2013-10-06 22:17:53 -07:00
Unknown W. Brackets
3787471791
Add some initial methods to GPUDebugInterface.
2013-09-22 10:22:33 -07:00
Henrik Rydgard
d7ae3f88a1
Do Beziers more correctly (although still not tesselating properly).
...
Snow now visible in SSX.
2013-09-22 09:52:46 +02:00
Henrik Rydgard
01def3b6cc
Missed these
2013-09-21 23:44:11 +02:00
Henrik Rydgard
82e5787bbe
Preparation for proper spline/bez: Convert control points to a simple format.
...
The bezier/spline code will no longer need to handle morph and splines,
when it's finally written. This is done by pre-skinning in software and
pre-decoding to get rid of the morph.
2013-09-21 23:37:14 +02:00
Unknown W. Brackets
a1f3591960
Android buildfix.
2013-09-20 09:51:43 -07:00
Unknown W. Brackets
7906de26f7
Try to match especially the size of ge contexts.
...
But also some of the actual data, most of it matches like this.
2013-09-20 00:33:32 -07:00
Unknown W. Brackets
ad4bd8ed74
softgpu: small optimization, precompute tex info.
2013-09-15 21:39:28 -07:00
Unknown W. Brackets
68f61e5071
Remove some unused gstate_c values.
2013-09-14 14:36:06 -07:00