Commit Graph

692 Commits

Author SHA1 Message Date
Themaister 80a12ae1d6 Don't create PBO scaler if not needed. 2014-04-19 17:27:49 +02:00
Themaister c39d27fd8d Add async readback to GLES3.
Have support for PBOs and glMapBufferRange.
2014-04-19 17:22:25 +02:00
Themaister 095718c855 Only bind shared context if necessary. 2014-04-19 16:59:26 +02:00
Themaister 1cbb47229a Make video_shared_context an option.
Might be part of libretro API later if necessary. Must be discussed with
other frontend developers first.
2014-04-19 16:37:39 +02:00
Themaister 105872a42c Add HW context support to X/EGL and KMS/EGL. 2014-04-19 16:06:25 +02:00
Themaister f658112756 Add experimental support for separate HW contexts. 2014-04-19 15:37:00 +02:00
Themaister f8d065eeb6 [HW render] set known blending equation. 2014-04-17 15:32:36 +02:00
Themaister d941f70dff Should fix build on Pi. 2014-03-15 14:16:29 +01:00
Themaister d0302c9800 Begin adding opaque interface to gfx_context. 2014-03-09 16:50:18 +01:00
twinaphex 39c1ec4672 Pass data param to more shader functions 2014-03-07 05:51:56 +01:00
twinaphex 091ae18870 (GL) Fixup params to shader->init 2014-03-07 05:32:17 +01:00
twinaphex ea88399281 (XDK D3D) Refactor initing code completely - make it more inline
with PC D3D driver
2014-03-07 05:31:24 +01:00
twinaphex fcf30143b4 (PS3) Change HAVE_RGL to HAVE_GCMGL 2014-02-25 22:01:46 +01:00
twinaphex fd7f4d45cd Move image files to gfx/image/ 2014-02-25 21:24:15 +01:00
twinaphex c42a00a39f (OSX PPC) Change anonymous unions, define GLint64/GLuint64/GLsync
for Leopard and Snow Leopard, other changes..
2014-02-11 16:07:00 +11:00
Themaister 94a0cef1d4 Fix libretro GL core screenshots. 2014-02-06 23:37:06 +01:00
Themaister 8120198ed8 Make C++ compiler happy. 2014-02-06 22:52:48 +01:00
Themaister 032ba14d3b Properly implement GPU screenshot for GLES.
Have to use GL_RGBA/GL_UNSIGNED_BYTE as well as reading from back buffer
only.
2014-02-06 21:35:57 +01:00
Themaister 8c9e1a5f5c Fix some unused function warnings.
Clang 3.4 is more aggressive on this.
2014-01-22 16:39:39 +01:00
twinaphex f23e41bd17 Safety checks for accessing video_poke function pointers 2014-01-08 19:42:42 +01:00
Themaister 33d50e2010 Check GL_RENDERER for ATI as well. 2014-01-08 18:09:49 +01:00
twinaphex 61218b4a66 (OSX) Get rid of unused variable warning/variable is used before it's initialized 2014-01-06 16:20:20 +01:00
Themaister f2a8a73322 Add workaround for ATI Catalyst's lack of GL_RGB565 support. 2014-01-05 22:29:57 +01:00
Themaister bee70f8318 Fix ifdefs regarding READ_PIXELS. 2014-01-05 22:22:15 +01:00
twinaphex e9ce0aaaa4 (PS3) Custom aspect ratio works now 2014-01-05 18:48:09 +01:00
Themaister 9c218bcf07 Fix unpack row len with 16-bit cores on desktop.
Missed call to UNPACK_ROW_LENGTH :(
2014-01-03 14:42:38 +01:00
Themaister 69b104f9e4 Comment about BGRA8888. 2014-01-01 21:58:02 +01:00
Themaister 08ba1ad14e Use GL_RGB565 internal format when available.
This is a feature from ES2_compat extension.
It fixes the speed issue associated with using 16-bit textures on
desktop GL. Improves performance a bit as well as there's less bandwidth
usage during shading.

On my HD3000 laptop, performance improved with ~10%.
2014-01-01 21:58:02 +01:00
twinaphex 0a15a17d44 Update years on all license headers 2014-01-01 01:50:59 +01:00
Themaister 132c3c46f7 Use struct texture_image instead of video_overlay_image. 2013-12-31 19:05:16 +01:00
Themaister 77a62573a2 Fix crash in GLSL when overlays with many textures are used.
Have to call shader->use() for each set_coords or we overflow
the attribs array cached buffer.
2013-12-26 23:34:40 +01:00
Themaister 1c9895611b Rework performance interface.
Avoids super-ugly macros and retroarch-ifdefs.
2013-12-18 19:21:56 +01:00
twinaphex 9852c5dc4c Rewrite perf interface - exposes callbacks now for RETRO_PERFORMANCE_INIT/RETRO_PERFORMANCE_START/RETRO_PERFORMANCE_STOP calls without messy, hardcoded preprocessor-dependent variables in macros - will update cores accordingly too 2013-12-18 19:03:08 +01:00
twinaphex 69a67b3df2 Change RARCH_PERFORMANCE_ macro calls to RETRO_PERFORMANCE 2013-12-17 19:14:57 +01:00
Themaister 6031590cd3 Add OPENGLES3 context support in libretro GL. 2013-12-13 14:20:49 +01:00
Themaister 46c3dd6d20 Clean up float FBO handling a bit.
Fallback to UNORM if not supported.
2013-12-04 12:55:51 +01:00
twinaphex 6f5b28cd60 (PS3) Get rid of warnings in gl.c 2013-11-29 03:06:04 +01:00
twinaphex 1372df61de (PS3 RGL) Should add float FBO support 2013-11-19 05:18:46 +01:00
Themaister 6d6e964672 Fixup CXX_BUILD.
Cleans lots of sign-related warnings as well.
2013-11-16 17:31:49 +01:00
twinaphex 223448d943 (Apple) Build fix for platforms where we have ARC
enabled - can't use NSAutoreleasePool directly it seems
2013-11-09 01:37:34 +01:00
twinaphex f8c37fc933 (Menu) Simplify menu preprocessor conditionals - there is now
one common catch-all define called HAVE_MENU
2013-11-08 04:36:47 +01:00
twinaphex e3ebfbffa9 Rename frontend_android.h to platform_android.h 2013-11-03 17:02:40 +01:00
twinaphex 9a738278ce (PS3) Expand conditionals of HAVE_LIBDBGFONT 2013-11-02 23:07:27 +01:00
twinaphex c9dc5e62d2 (RGL PS3) Reimplement glpixelStorei 2013-11-02 22:46:56 +01:00
Themaister a61f0dfd61 Fix potential uninitialized variable. 2013-11-02 17:54:52 +01:00
twinaphex f149c387b9 Remove 'start' from video interface 2013-11-01 21:18:38 +01:00
twinaphex 71a23ac18e Slim down global_init_drivers - we can now get rid of the 'start'
function
2013-11-01 21:10:42 +01:00
Themaister dab40b16c0 Pass window width/height to gl_init_font_first. 2013-11-01 17:02:55 +01:00
twinaphex 727dc76db8 (Console/Android) Init input driver from context driver/graphics
driver from now on - just like PC - input driver initing can be
hoisted out of global_drivers_init that way
2013-11-01 16:33:32 +01:00
twinaphex aaa8fc1f37 (GLES2 GL) Query GL_EXT_unpack_subimage and if it's there, use it -
Tegra 4 should support it etc.
2013-10-29 23:21:15 +01:00
Themaister 7aa8b40759 Fixup C89 for loops. 2013-10-22 21:37:56 +02:00
twinaphex d2c87e3039 Convert most C99-style for loop initial declarations to C89-compliant
ones
2013-10-22 15:08:17 +02:00
Themaister 76c92bb0b4 Rework overlay driver interface.
Takes multiple images, each with individual positions, textures, etc.
2013-10-15 16:06:59 +02:00
twinaphex e63639388d (gl.c) Change define to !define(RARCH_CONSOLE) 2013-09-28 21:57:27 +02:00
twinaphex 4f54fd28a0 (PS3) Forcibly disable float FBO textures for now - was creating
all sorts of crashes
2013-09-27 23:04:19 +02:00
Themaister 3e7f101137 Make sure we're reading from backbuffer. 2013-09-12 22:40:11 +02:00
Themaister 178dc692c7 Do proper rounding in set_viewport.
Avoids edge cases where viewport sizes are miscalculated with -1 pixel
due to rounding errors.
2013-09-12 22:23:56 +02:00
Themaister 46c214f964 Small cleanup. 2013-09-07 15:23:09 +02:00
Themaister 870ef37258 Fix libretro GL state bug on frame dupe.
Need to force backbuffer and viewport on duped frames.
2013-09-07 15:04:40 +02:00
Themaister 98c9da9dda Set swap interval correctly in gl_init(). 2013-09-02 09:20:51 +02:00
Themaister b2bf3c12de Add swap_interval support.
Again, mostly useful for 120Hz monitors, and/or playing content which is
a fraction of monitor refresh rate.
2013-09-01 13:20:10 +02:00
Themaister 62c34c7871 Add black_frame_insertion support for 120 Hz monitors. 2013-08-30 09:35:13 +02:00
meancoot a4dfd35ab7 (Apple) Improvements:
Add core gl context support on OSX
	Add support for multiple game pads on OSX
 	Remove block on analog input for Player 2-4's game pads
2013-08-16 13:25:35 -04:00
Themaister 8ebd81edbf Log GL version as well. 2013-08-16 10:18:58 +02:00
Themaister 551fd27204 Add support for wrapping modes.
Not terribly useful atm due to POT, but at least it's there.
Has some use mostly with LUTs ... NPOT + REPEAT requires extension on
GLES2 at least.
2013-08-16 00:30:54 +02:00
Themaister 7236e51af0 Clear out GL error on driver init for robustness.
In case we used cached GL context, we'd error out
if a single GL error has been generated.
2013-08-14 14:58:12 +02:00
Themaister 3b1e65ba08 Add GL_DEBUG ifdef which forces full GL debugging. 2013-08-14 14:13:28 +02:00
Themaister 1389a1e37c Fix compile when GLSL isn't compiled in. 2013-08-11 15:25:04 +02:00
Themaister 7d942adaa3 Should fix build on PS3. 2013-08-11 15:06:42 +02:00
Themaister c19bdc7c2c Kill some stale code. 2013-08-11 01:24:48 +02:00
Themaister 2b28050c15 Build fixups. 2013-08-11 01:16:08 +02:00
Themaister 70de036440 Revert "Add GL sync support to GLES2."
This reverts commit c1bbb6bf89.
2013-08-11 01:09:10 +02:00
Themaister 47c4428d8e Add GL sync support to GLES2. 2013-08-11 01:09:10 +02:00
Themaister 27399deed9 Log vendor/renderer in GL. 2013-08-11 00:57:24 +02:00
Themaister 26d74be8b8 Disable blending per frame with HW render. 2013-08-11 00:56:53 +02:00
Themaister 6b4924c844 Be more conservative about texture memory usage. 2013-08-11 00:56:53 +02:00
Themaister f8eb0c5a62 Query extensions more explicitly. 2013-08-11 00:55:05 +02:00
Themaister 318b26cc0d Fix Android build. 2013-08-11 00:55:05 +02:00
Themaister d64c24248d Use glsym wrapper in libretro-test-gl. 2013-08-11 00:55:05 +02:00
Themaister 2e397b1d6b Win32 fixups. 2013-08-11 00:55:05 +02:00
Themaister e44249b73f Use glsym symbol loader instead of ugly poking. 2013-08-11 00:54:27 +02:00
Themaister 4e5c6b0f9a Fix RGUI when using bottom-left. 2013-08-11 00:53:46 +02:00
Themaister e5abd138ea More fixes to core context. 2013-08-11 00:53:46 +02:00
Themaister 6df083fc0f Add support for bottom-left origin in libretro GL. 2013-08-11 00:53:46 +02:00
Themaister b090f5ab36 Implement WGL core context. 2013-08-11 00:51:05 +02:00
Themaister e28f5d7cc1 Fix incompatibilities with GL core. 2013-08-11 00:50:38 +02:00
Themaister b9fce188ea Initial work on core GL context support. 2013-08-11 00:50:04 +02:00
twinaphex 63aaa7b2b0 (GL) Log vendor/renderer 2013-07-13 01:47:11 +02:00
twinaphex df6dfb4970 (OSX/iOS) Start renaming ios_ namespace -functions we're going to implement for
OSX as well
2013-07-05 04:10:05 +02:00
twinaphex 53df912321 (PS3) Move PS3-specific FPS printing code to ps3_ctx.c 2013-06-14 17:21:44 +02:00
twinaphex 559c4a7964 (RARCH_CONSOLE) Add refresh rate FPS statistics 2013-06-08 01:45:25 +02:00
Themaister 321ffcbca6 Calculate 1:1 PAR from right dimensions.
Frame cache can be stale or have awkward dimensions which
don't really reflect 1:1 PAR semantics.
2013-06-05 21:29:52 +02:00
Themaister 79275b28ff Fallback when initial shader init fails. 2013-06-05 10:44:27 +02:00
Themaister 43a6346d26 Adds video_hard_sync_frames.
Allows to control the maximum amount of frames that can be queued on
GPU.
2013-05-26 13:43:24 +02:00
twinaphex 20fdda8ca9 (RMenu) Move rewind settings to Settings submenu 2013-05-26 00:32:39 +02:00
Themaister 503ce7895c Reset BlendFunc with HW render. 2013-05-22 21:41:10 +02:00
twinaphex 46f29b1178 New define RARCH_MOBILE 2013-05-22 16:02:21 +02:00
Themaister b4b83cdf41 Use VBOs in GLSL.
Future proof a bit as future GL versions
require use of VBOs. Also avoids spamming client-side
data to GL all the time.

VAOs are not used, but that is only relevant if we actually
create a GL3+ context.
2013-05-21 10:44:25 +02:00
Themaister 12288e9b8c Avoid potential performance regressions.
PSGL uses GL_ARGB_SCE, and not GL_RGBA for one ...
2013-05-19 11:25:56 +02:00
Themaister f61cc333e9 Be more explicit about FBO formats.
GLES doesn't support 32-bit FBOs.
They seem to only be exposed via OES_rgb8_rgba8 and ARM_rgba8
extensions.
2013-05-18 21:53:26 +02:00