Spirantho wrote:Great work!
You can:
set SDLMAME_DESKTOPDIM=320x240
to change the screen size...
Done. Unfortunately, the results are still not as expected. The reason in this case is that an unsupported blending mode is being used. Nevertheless, my debug results (which include profiling for Warp3D and the driver) are here:
http://extropia.co.uk/_temp/mametiny_gl ... _debug.txt
If you scroll to the end, you will see a section starting MGL:Profiling statistics. You can see that on this system, MGLUpdate() is a big time consumer and all of it's time is spent, as I suspected, calling unpack_argb_b() and then write_rgba(). This illustrates my previous point regarding inefficiency quite well. The Permedia can handle 32-bit ARGB texture data directly and no conversion should be necessary, it's just enforced by MiniGL's internal texture handling which happens to use RGBA as an interim format for all texel data.
Incidentally, this:
[cgl_GLBlendFunc] Blend mode 0306 0000 not supported by hardware
is what's causing the total lack of visuals on the Permedia2. 0306 is GL_DST_COLOR, 0000 is GL_ZERO. If I am understanding it right, you might as well glDisable(GL_BLEND) instead*.
*note to self - perhaps interpret the underlying warp3d equivalent by disabling blending on the Permedia2 rather than returning unsupported blend mode.
edit
Incidentally, if all you are doing is using MiniGL to scale emulated framebuffer images, then you might consider some alternatives that I believe would be significantly more performant because MiniGL is introducing a large latency here. Futhermore, it would more broadly compatible.
1) Define a set of function prototypes for creating and destroying an opaque Scaler type and a scale method that accepts the raw pixel data input to be scaled into a BitMap. All the contextual information can be stored in the Scaler instance.
2) Define a number of potential scaling methods that all have the same function prototype: Software only, Warp3D and Compositing.
3) Implement each one and have the Scaler creation function choose the most appropriate, Copositing > Warp3D > Software
A quick test I wrote for WarpOS years ago generated a plasma fire fractal texture (32-bit ARGB) and used Warp3D to scale it full screen over a scrolling texture background. 25fps rock solid on my 603e. I hate to say it, but in it's current incarnation, MiniGL can't come close to this and it doesn't even have the context switch overhead to worry about.
OK, so Warp3D is deprecated, but MiniGL sits on top of it anyway. The beauty of a polymorphic scaler engine is that you can swap new implementations in and out.
On reflection, not a bad idea for a library...