Commit graph

195 commits

Author SHA1 Message Date
Henrik Rydgard
d9acd27126 Rename GLES files to match the convention the other backends use. 2017-01-23 17:08:58 +01:00
xebra
5aeaa95f2c [spline/bezier]Implement hardware tessellation on OpenGL. 2017-01-23 14:12:02 +01:00
xebra
38293adc78 [spline/bezier]Expand shader dirty flags to 64 bit, and add some flags for hardware tessellation. 2017-01-23 14:12:02 +01:00
Henrik Rydgard
0fa2f2c7ae Remove more now-unused code 2016-12-20 13:50:07 +01:00
Henrik Rydgard
9d7983eee8 Remove the ability to turn off prescaleUV entirely. It's simply better to do it in the vertex decoder. 2016-12-20 13:27:44 +01:00
Florent Castelli
70593d1004 android: Change preprocessor define to standard __ANDROID__
ANDROID is only standard to the old Makefile buildsystem, not the platform.
2016-10-12 11:14:09 +02:00
Unknown W. Brackets
a1fbcc3d93 Avoid directly calling osm from Core/GPU code.
This allows UI to handle the message however it wants to, and reduces
cross linkage issues.
2016-05-27 22:05:30 -07:00
Henrik Rydgard
7cb6192005 Rename the TransformPipeline files to DrawEngine, and GLES_GPU to GPU_GLES 2016-04-10 10:31:42 +02:00
Unknown W. Brackets
7dfe8b58dc Clear attrMask on bad shader compile.
This prevents various crashes when incorrect attributes are enabled.
2016-03-05 13:14:25 -08:00
Unknown W. Brackets
0e85225e29 Bring back the depth range hack. 2016-02-06 20:28:45 -08:00
Unknown W. Brackets
f1c06d25ea Switch to old-style depth in OpenGL.
Some devices really aren't handling the new method well.  There seem to be
accuracy problems when specifying the values to OpenGL.
2016-02-06 20:21:14 -08:00
Unknown W. Brackets
9354e253bd Fix some warnings in shader cache read.
In case something gets truncated.
2016-01-21 00:24:45 -08:00
Unknown W. Brackets
597596884e Add a smart C FILE * helper.
When all you want is for it to close by itself on error.
2016-01-20 23:33:56 -08:00
Unknown W. Brackets
b80c02c272 Simulate depth clamping.
We'll allow extra space in both directions.  It's not exactly right, but
it's a fast approximation.
2016-01-19 07:12:58 -08:00
Unknown W. Brackets
0920f6c6eb Use minz/maxz as the depth range.
This allows values that fall outside the viewport, but still within the
depth range, to be drawn.
2016-01-19 07:12:57 -08:00
Unknown W. Brackets
0828721bc2 Simplify depth calculation a bit.
This way we keep the original range better, so we should lose less
precision.
2016-01-17 18:30:58 -08:00
Henrik Rydgard
6df8573583 Minor fixes 2016-01-17 22:53:06 +01:00
Henrik Rydgard
b39206f922 Use the app cache directory on Android for the shader cache. 2016-01-17 22:15:23 +01:00
Henrik Rydgard
dfcfb530d7 Log how long it takes to compile shaders at the start. 2016-01-17 20:53:58 +01:00
Henrik Rydgard
5cd5812239 Handle shader compile errors gracefully when loading shader cache. 2016-01-17 20:44:52 +01:00
Henrik Rydgard
b246442374 Hook up GL shader cache. Cache linked shader programs. 2016-01-17 20:44:51 +01:00
Henrik Rydgard
790210f6ef Minor fixes 2016-01-17 20:33:22 +01:00
Henrik Rydgard
36e1840ea0 More parameter removal 2016-01-17 20:33:22 +01:00
Henrik Rydgard
c8b1064d20 GL Cleanup: No longer redundantly store the shader ID inside the shader objects 2016-01-17 20:33:14 +01:00
Unknown W. Brackets
00b57f6a16 Correct clamped depth offset.
Oops, forgot to fix this when I fixed the scale.  It's already for a
[-1, 1] range, and needs to be corrected for accordingly.

Fixes #8425, other depth issues in Phantasy Star Portable 2.
2016-01-16 00:18:25 -08:00
Unknown W. Brackets
7e54368998 Correct depth offset when clamped.
Of course, the scale is already half, so we just need to double for d3d9,
and not double for OpenGL of course.

Our offset is already in [0, 1] so we keep it.
2016-01-03 19:59:35 -08:00
Unknown W. Brackets
529abd7db4 Correct clamped depth range from [0, 65535].
This changes a few things:
 * All backends clamp the depth range and keep it positive.
 * The depth rounding uniform is now properly dirtied.
 * Projection is updated to translate and scale appropriately.
 * Depth rounding is halved on OpenGL to account for [-1, 1] range.

Fixes Phantasy Star Portable 2 without the need for a game-specific hack.
2016-01-03 12:29:43 -08:00
Unknown W. Brackets
18cdf9f352 Remove the depth range hack.
Ths removes the game-specific hack to workaround depth issues.
2016-01-03 12:05:59 -08:00
Unknown W. Brackets
941988cde4 Correct prescale issues with render-to-texture.
Still need to apply the scaling of the texture coordinates here (or
somewhere, maybe we prescale that as well?  Except it's figured later on
in the process...)
2015-12-20 21:13:43 -08:00
Unknown W. Brackets
1fb271a607 Enable EXT_blend_func_extended.
Not really tested.
2015-11-27 16:01:25 -08:00
Henrik Rydgard
4b360a571c Remove the depth range hack option, turning it into an ugly game specific compatibility hack.
I hate doing this, but it's not really better off as an option.

See #8171
2015-11-15 23:00:25 +01:00
Henrik Rydgard
45da00d381 Fix viewport offset in gl non-buffered 2015-11-12 15:22:20 +01:00
Henrik Rydgard
aac0cd3227 Minor consistency improvement between d3d and opengl code 2015-11-05 00:08:48 +01:00
Henrik Rydgård
452ed71e68 Couple of LLVM compiler warnings 2015-11-04 12:46:38 +01:00
Henrik Rydgard
1ce6801d42 Shifted projection matrices need a few more parts flipped. This could fix bugs in games, too.
Fixes the strange camera issues in FF:CC.
2015-11-02 20:08:21 +01:00
Henrik Rydgard
c1db771056 Fix non-through rectangles 2015-11-02 20:08:11 +01:00
Henrik Rydgard
e9770b3679 Fix non-buffered rendering 2015-11-02 20:07:50 +01:00
Henrik Rydgard
f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01: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
6bd1a43e20 Minor cleanups 2015-10-14 11:18:45 +02:00
Henrik Rydgård
87f45ed307 OpenGL: Generate vertex shaders directly from the shader ID. 2015-10-14 10:50:29 +02:00
Henrik Rydgård
39f04ab5d6 OpenGL: Generate fragment shaders directly from the ID. 2015-10-14 10:50:08 +02:00
Henrik Rydgard
4d18d478a0 Sample renderWidth/pixelWidth/height once per frame for the framebuffer manager. 2015-09-19 16:19:03 +02:00
Unknown W. Brackets
c7e6f051e4 Split the texture application into two stages.
The latter simply applies the texture.

This makes our IsAlphaTestTriviallyTrue() check correct.
2015-09-13 09:30:39 -07:00
Henrik Rydgard
ab3468ea02 Move native/gfx_es2/gl_state.cpp/h into GPU/GLES/GLStateCache.cpp/h 2015-09-06 13:45:17 +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
7b0a31ade5 Adjust D3D depth calculations to get them to match OpenGL as close as I can get it. 2015-08-29 17:43:09 +02:00
Henrik Rydgard
76eacf32f4 Change the offset to 0.0 2015-08-27 18:02:45 +02:00
Henrik Rydgard
fd18f14508 Fix GT and hopefully other games that got a black screen 2015-08-27 17:58:41 +02:00