Project

General

Profile

Actions

Emulator Issues #5314

closed

OpenGL ES 3.0 back-end

Added by Xsacha about 12 years ago. Updated over 4 years ago.

Status:
Fixed
Priority:
Low
Assignee:
Category:
GFX
% Done:

0%

Operating system:
N/A
Issue type:
Feature request
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

I will begin work on an OpenGL ES 2.0 backend. All who wish to help are welcome to throw in commits (please!).

There are numerous reasons/advantages. The main ones:
1) To improve state of OpenGL back-end (see http://code.google.com/p/dolphin-emu/issues/detail?id=2444#c40 ).
2) To provide a video back-end with a simplistic approach.
3) To work better with arm-support. Video back-end to match current/future ARM hardware that has hardware GL ES 2.0. This will ease arm-support development which needs to pick up to be ready for capable devices.
4) Allow future improvements (eg. OpenGL ES 3.0 'Haiti' when it becomes available).


Related issues 1 (0 open1 closed)

Blocks Emulator - Emulator Issues #4143: ARMv7 Dolphin SupportFixedSonicadvance1

Actions
Actions #1

Updated by Xsacha about 12 years ago

So should development begin in a new branch? The target will be x86 devices first. Most manufacturers (AMD/Nvidia) already support OpenGL ES 2.0 as it is used for WebGL.

There's a tutorial for porting here if anyone is interested: http://pandorawiki.org/Porting_to_GLES_from_GL
While porting, please keep in mind that everything you're ported might not necessarily be the best method or may be redundant.

Actions #2

Updated by NeoBrainX about 12 years ago

I'm not really sure if we really need a new video backend or if you time would be better spent if you cleaned up the existing opengl backend.

Actions #3

Updated by Xsacha about 12 years ago

ARM devices will probably need it in future and it'll help people (at least me) code for the arm-support branch.
Any improvements that can be put through to OpenGL will be done simultaneously as they are found.

Actions #4

Updated by NeoBrainX about 12 years ago

I see. Guess the backend can be within its own branch until it's in a usable state. Any cross-platform improvements should probably go to master.

Actions #5

Updated by gawmir7 about 12 years ago

btw Xsacha, iirc you were working on OpenCL, are there any imporvements planned for it? AFAIK OCL 1.2 introduced some stuff that could be used to further speed up dolphin.

Actions #6

Updated by Xsacha about 12 years ago

There could be improvements for OpenCL with context sharing for OpenGL & DX. Again, this would be particularly relevant for mobile platforms.

Unfortunately, there are no new improvements in the spec to speed up OpenCL itself. For example, I rewrote OpenCL to use 'shuffle' and 'shuffle2' but the profiler says it would make no difference to speed. The new instructions just make the code look neater and makes everyone upgrade their old GPU to use it.

Actions #7

Updated by NeoBrainX about 12 years ago

Doesn't context sharing mean that you can basically decode textures on the gpu and store the result in a ogl/d3d texture instead of transferring them back to RAM? I haven't run a profiler, but I imagine that would GREATLY speed up the opencl texdecoder.

Actions #8

Updated by Xsacha about 12 years ago

Neobrain: Yeah, context sharing was available in 1.1. Problem is my GPU doesn't support it so I'm unable to even attempt to test it.
I can't profile that stuff without writing the code of course (It's C++ stuff, not OCL) :P I'd imagine it pretty much eliminates latency issue though.

Actions #9

Updated by parlane about 12 years ago

Only if you promise to get rid of DirectX9 and 11.

Actions #10

Updated by dtittle about 12 years ago

I really like where this is going. It's been a while since I've done OpenGL, and I've never done it for embedded systems before. Maybe I could write some test cases?

Does Dolphin have unit tests, or some type of benchmark? If not, this might be a good place to start.

Actions #11

Updated by skidau about 12 years ago

dtittle, you could write test dol's for us to compare the results with the real hardware.

Actions #12

Updated by parlane about 12 years ago

What we really need is a dff player for the Wii.

Actions #13

Updated by NeoBrainX about 12 years ago

^ this

No need to waste hours of coding unit tests if you can just go ahead and run game X, go to scene Y, record a list of all graphics commands being sent to the GPU and being able to generate some homebrew app from that for easier testing.

Actions #14

Updated by dtittle about 12 years ago

That sounds great. You could also use it for benchmarking performance on various systems, and let Dolphin select "ideal" video settings.

I'll take a crack at this, but I'm still a novice at Wii dev. I wrote my own shell for the PS2, so it'll just take some time.

NeoBrainX has a good idea, but where to start?

Actions #15

Updated by NeoBrainX about 12 years ago

Take a look at FifoPlayer code in Source/Core/Core/Src/FifoPlayer and figure out how it works ;)
(basically everything but the homebrew app generation is already done)

Actions #16

Updated by parlane about 12 years ago

"NeoBrainX has a good idea, but where to start?"

Yea.. good idea Neo :(

Actions #17

Updated by beastlifeisgood over 11 years ago

Hello,

I am currently experimenting with OpenGL ES and had a startling realization. It should be possible to implement the "Hollywood"/"Flipper" GPU with a stack-like state machine based upon OpenGL ES.

The reasoning is that since the "gpu" interprets opcodes, it should be possible to implement both a stack based VM and optimization passes with an increase in speed, whereas the drawing is done by the OpenGL ES API.

I had become interested in doing this since my laptop's gpu (9400M G) should be more than ample to run games at full speed, however I barely get above 30fps at the lowest of settings of the OpenGL Plugin.

If anyone has any insight into the graphics/gpu emulation code and documentation on the gpu's instruction set, please message me. I am indeed interested in making a proof-of-concept in the coming weeks.

Actions #18

Updated by fagoatse over 11 years ago

btw, OpenGL ES 3.0 specs have been released and it appears to be backwards compatible with 2.0 while borrowing features and improvements from OpenGL 3.3 and OpenGL 4.2.

Actions #19

Updated by Sonicadvance1 over 11 years ago

The backend is being worked on to get ES 3 compatible, just changing the title here.

Actions #21

Updated by degasus over 10 years ago

  • Status changed from New to Fixed

OpenGL ES 3 support should be merged in the OpenGL backend. There are still some bugs remaining and also some unimplemented features, but in the end, it's working now :-)

Important missing features are:

  • dual source blend as it isn't support by gles3 by default
  • BaseVertex for better buffer streaming (could be workaround by 32bit indices)

Everything else should work normally.

Actions

Also available in: Atom PDF