Commit Graph

30 Commits

Author SHA1 Message Date
Henrik Rydgard
54217deb16 Speed up UpdateUniforms a little 2013-11-12 17:06:03 +01:00
Henrik Rydgård
ae94e5c078 Must reset lastShader after swtiching shaders outside the "framework". 2013-10-10 20:11:57 +02:00
Henrik Rydgård
0a4750909e Try to avoid unnecessary calls to glEnable/DisableVertexAttribArray 2013-10-08 17:47:47 +02:00
Henrik Rydgård
0ecac31abd Use glBindAttribLocation to simplify shader usage a little. 2013-10-08 17:18:59 +02:00
Henrik Rydgard
9dc9c89918 Possible fix to bezier texture coordinate problem reported by CPkmn 2013-09-23 22:02:58 +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
Henrik Rydgard
4d4b2990ec GPU ShaderManager: Naming convention, inline a function 2013-08-10 18:39:27 +02:00
Unknown W. Brackets
386d51081c Optimize linked shader lookup in ApplyShader().
We already iterate all (skipping that with an if helps, though), and the
list of shaders in most games is pretty small.  Using a map is not gaining
much, and actually makes the whole thing slower.

Cuts from 9.84% time in Tales of Phantasia X (lots of flushes) to 1.85%.
2013-06-30 20:33:50 -07:00
Henrik Rydgard
e7097ca95a Fall back to software transform when hardware transform fails. Should help Mali devices.
This is done per shader so the speed hit should not be as bad as turning hw transform off entirely.
Displays a red error at the top of the screen so that we don't trigger this accidentally.
2013-06-06 10:09:37 +02:00
Henrik Rydgard
cdef31f9fc Turn off the use of uniform arrays in shaders as some devices don't like them, and the speedup seems to be very small if any. 2013-05-26 14:03:02 +02:00
Henrik Rydgard
1b210fab14 Use arrays and for loops in GLSL shaders for bone processing, to shrink the shaders which are becoming too big for some mobile GPUs. Might fix #1816. 2013-05-18 20:45:52 +02:00
BeaR
fa3a1fbd52 Add support for spotlights 2013-04-09 18:26:06 +02:00
Henrik Rydgard
5427f20b90 Don't "DirtyShader" at the end of frame, instead just "stop". Fixes issues caused by vertex arrays left enabled still hanging around. 2013-04-07 23:31:04 +02:00
raven02
d99ca71a47 Add u_colormask and use it in enableColorTest 2013-02-25 05:45:35 +08:00
Henrik Rydgard
bf51291527 Don't translate bone weights to floats unnecessarily. Minor optimization to ApplyShader, pushing it down the profile from 2% to 0.5% in Wipeout. 2013-02-04 23:10:40 +01:00
Henrik Rydgard
03eacd1af3 Save 16K. 2013-01-07 13:00:28 +01:00
KentuckyCompass
a1f35ebe7e Fix crash from lastShader pointer = 0xcdcdcdcd 2013-01-07 00:21:07 -08:00
Henrik Rydgard
a1bf5a2a10 Save on gl[Enable/Disable]VertexAttribArray calls. 2013-01-06 23:50:05 +01:00
Henrik Rydgard
d663e28bde More work and optimization. Still not quite there. 2012-12-21 21:49:09 +01:00
Henrik Rydgard
4c23d668e1 Cleanup and reorganize gpu code a little 2012-12-21 16:50:14 +01:00
Henrik Rydgard
c3b778daab More work on hw transform. 2012-12-20 18:31:21 +01:00
Henrik Rydgard
4f376a2c34 Hardware vertex transform, preliminary and optional. No lighting yet. Disabled until it works right... 2012-12-20 15:07:58 +01:00
Henrik Rydgard
b8d596cbec Add some infrastructure for flexible vertex formats 2012-12-19 18:35:37 +01:00
Henrik Rydgård
a0d8017c22 Fix for previous commit 2012-12-05 11:13:36 +07:00
Henrik Rydgård
700921deb3 Fix rendering on MacOSX (shader compiler very fussy...). Minor prep for hw transform. 2012-12-05 10:55:06 +07:00
Henrik Rydgard
980d13fe50 Assorted GPU fixes: Advance vertex pointer, fixes missing triangles in SPT. More logging. Separate proj matrices for through and normal mode (through matrix don't need to get updated as often). Some cleanup. 2012-11-28 13:45:22 +01:00
Henrik Rydgard
870ea6628b Reasonably correct viewport handling. Optional debug stats overlay (not always 100% working). 2012-11-26 17:35:08 +01:00
Henrik Rydgard
e37a1fb1d3 Add internal 2D drawing library that goes through the Ge emulation for portability.
To be used for things like sceUtility* and other overlays like FPS and stats.
2012-11-18 13:04:49 +01:00
Henrik Rydgard
64cc573703 Switch to "GPL 2.0 or later" for various reasons. I wrote most of the code I imported from Dolphin (which is GPL2-but-not-later), so it should be OK. 2012-11-04 23:24:00 +01:00
Henrik Rydgard
4f7ad15758 Add snapshot of the whole source code. 2012-11-01 16:19:01 +01:00