Commit Graph
244 Commits
Author SHA1 Message Date
Henrik Rydgard 6b2862284b Minor cleanups 2015-11-02 20:09:59 +01:00
Henrik Rydgard f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
Henrik Rydgard edafa9bc17 Centralize the GPU state conversion functions 2015-10-24 23:49:05 +02:00
Henrik Rydgard 92389a4966 Use a common ShaderId class. Start moving shader ID code to GPU/Common 2015-10-24 23:24:06 +02:00
Henrik Rydgard 67cd018aca Rename shader bits to not clash (this is preparation for other changes) 2015-10-24 23:09:28 +02:00
Henrik Rydgard 285480f992 More shader bit organization, viewer 2015-10-14 20:23:51 +02:00
Henrik Rydgard 4e26561d78 Fix bug in hardware skinning, improve shader viewer 2015-10-14 20:17:12 +02:00
Henrik Rydgard 1308a90fd1 More shader viewer improvements 2015-10-14 20:04:44 +02:00
Henrik Rydgard 9d2589bc6e Use previous improvement to find a bug that created lots of unnecessary fragment shaders 2015-10-14 19:52:41 +02:00
Henrik Rydgard 0b46b6b43a Improvements to shader viewer 2015-10-14 19:50:39 +02:00
Henrik Rydgård 953f712e3a Merge pull request #8065 from hrydgard/shader-view
Add new shader viewing tool
2015-10-14 19:05:24 +02:00
Henrik Rydgård f7b3e5e693 Merge pull request #7922 from hrydgard/fragshader-depth-round
WIP: Alternative to #7920: Round depth in the fragment shader.
2015-10-14 18:36:05 +02:00
Henrik Rydgard 7f4e473e8c Add new shader viewing tool 2015-10-14 18:10:21 +02:00
Henrik Rydgård d12f74d49b Slightly more elegant error handling 2015-10-14 17:44:50 +02:00
Henrik Rydgård cdf61ad21a Fix bug in fragment shader ID reading 2015-10-14 11:17:13 +02:00
Henrik Rydgård 39f04ab5d6 OpenGL: Generate fragment shaders directly from the ID. 2015-10-14 10:50:08 +02:00
Henrik Rydgard 65b78b18ea Only enable fragment shader depth rounding for Heroes Phantasia, should reduce flicker.
Doens't fix but helps #6485
2015-10-11 20:52:00 +02:00
Henrik Rydgard fecc825e66 Round depth in the fragment shader. Simpler alternative to #7920 but will not work on ES 2.0, and will in many cases be slower.
So possibly this could be an option for modern devices, and possibly for games that #7920 can't fix.
2015-10-11 19:35:26 +02:00
Unknown W. Brackets e1df8fc45f Centralize sampling params and test optimizations. 2015-09-13 06:38:07 -07:00
Unknown W. Brackets 764539f814 Clean up GLES logic used in shader gen. 2015-09-05 16:44:17 -07:00
Henrik Rydgard 0237b84efd Reduce use of #ifdef USING_GLES2 some more 2015-09-05 23:09:06 +02:00
Henrik Rydgard f524049277 Move more GPU feature checks upfront. Re-check when exiting settings menu. 2015-09-05 21:23:58 +02:00
Henrik Rydgard a71be3f75f Start moving GPU feature compatibility decisions to startup
(and a single, cache-friendly flag field)
2015-09-05 19:58:47 +02:00
Henrik Rydgard b5f7d9346f Minor cleanups in GPU 2015-07-29 13:08:02 +02:00
Unknown W. Brackets e45daac41c Fix a dumb mistake for shader framebuf fetch. 2015-03-14 00:14:59 -07:00
Henrik Rydgård 33b291a36e Merge pull request #7567 from unknownbrackets/gpu-blend
Use framebuffer fetch more and on more devices
2015-03-09 22:24:23 +01:00
Henrik Rydgård 9db4c5f34d Merge pull request #7573 from unknownbrackets/gpu-minor
Small optimizations to software transform
2015-03-09 09:59:45 +01:00
Unknown W. Brackets f0676b0c85 Optimize color tests against zero.
They seem to be somewhat common.  Speeds up Tales of Phantasia X a bit.
2015-03-08 19:08:21 -07:00
Unknown W. Brackets cf7a4ab2cf Avoid shader id data that doesn't change shader.
This may reduce shader switches, or more likely at least total # of
shaders, when alpha test settings are changed but alpha test is not
enabled.
2015-03-08 18:28:59 -07:00
Unknown W. Brackets 39cb74a8d3 Simplify transform in throughmode/sw (rectangles.)
This should make it a bit faster, a bit less work.
2015-03-08 13:12:13 -07:00
Unknown W. Brackets 39347efda4 Fix shader blending on ARM devices, oops. 2015-03-08 00:12:29 -08:00
Unknown W. Brackets eb349a1978 Make sure not to try multiple shader fetch exts. 2015-03-07 22:31:55 -08:00
Unknown W. Brackets 08a1bb8796 Add support for ARM_shader_framebuffer_fetch. 2015-03-07 16:11:43 -08:00
Unknown W. Brackets 2344760018 Use framebuffer fetch for more accurate blending.
On devices which support it, framebuffer fetch should give us more correct
blending than copying fbos or using a fallback (such as doubling which may
clamp.)

Not actually tested on any supported device.
2015-03-07 12:09:27 -08:00
Unknown W. Brackets 9c3ccc97a2 Support EXT_shader_framebuffer_fetch.
We only supported NV_ before.  Not tested on any supporting device, but
this is primarily found on PowerVR devices.  This may allow them to
perform effects (like min/max/etc.) more accurately and quicker.
2015-03-07 12:07:53 -08:00
Henrik Rydgard d9e543fdd2 Reduce PowerVR blockiness problems on older GPU revisions. #7153 #7150 2014-12-15 01:16:07 +01:00
Henrik Rydgard f424bf73ae GLES: Implement a custom modulo function for PowerVR. Fixes blockiness, see #7153 and #7150 2014-12-14 20:59:21 +01:00
Henrik Rydgard b4b7cd0722 GLES: Merge the two ShaderID classes as they are identical.
I don't expect the number of bits required to grow or shrink massively for either type of shader in this backend.
2014-12-14 19:24:11 +01:00
Henrik Rydgard ff68e32f88 Try to fix flat/smooth shade mode issue (caused shader mismatches) 2014-12-02 01:13:26 +01:00
Henrik Rydgard da1352c924 Don't bother specifying smooth shading, it's the default. 2014-12-02 00:57:51 +01:00
xebra f032936575 Fix flat shading for unsupported hardware. 2014-12-01 19:16:20 +09:00
xebra 34fe8300ab Support flat shading. 2014-11-28 18:59:14 +09:00
Unknown W. Brackets c88b66b308 d3d9: Emulate some logic ops with blending.
This makes Brave Story's intro visible.  Also add for GLES2/GLES3, but
doesn't seem to work on GLES2.
2014-09-23 21:13:47 -07:00
Unknown W. Brackets 6e34fe1c4b d3d9: Fix fbo tex clamp (usually shadows.) 2014-09-21 11:07:02 -07:00
Unknown W. Brackets 9af40cb14f d3d: Update the texture cache to mostly match.
Now we can reduce the differences down.
2014-09-09 00:53:01 -07:00
Unknown W. Brackets 04147827ee Account for texel offsets in the frag test lookup.
Darn, thought this wouldn't be necessary but it is is for 1/255 and other
values.

Without cache:
PowerVR: temp, add, mul, fract, mul, compare
Other: mul, add, floor, compare

With cache: mul, add, texture lookup, compare
2014-09-08 19:04:44 -07:00
Unknown W. Brackets 76d5f67796 Arg, fix color testing from frag test cache. 2014-09-07 23:21:22 -07:00
Henrik Rydgård 1985e6db9a Merge pull request #6853 from unknownbrackets/testcache
Cache fragment test results using a texture
2014-09-07 23:55:53 +02:00
Unknown W. Brackets c0908421ba Skip binding when the test won't be used. 2014-09-07 10:06:57 -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