And the textures should be 16bit under QEMU with current drivers, as that’s all WB can display, put perhaps its not working in 32bit, because its using 16bit textures.
Stuffing 2 pixels into one-pixel won’t work so well. Of course, it can be entireness thing as well, graphics drivers have different BE/LE modes.
I’m not sure WPA converts BE/LE or just scales from 32bit to 16bit or the other way. How is it displayed on workbench.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
AFAIK, WritePixelArray is a straight copy into a bitmap. No pixel format conversions whatsever.
When it comes to 16-bit modes, please check which mode you actually have. Older Radeon cards support big-endian 16-bit, whereas newer Radeon HD (Southern Islands) and Radeon RX cards don't. The Picasso96 driver API doesn't allow the driver to do any automatic conversion. So, your software had better check what screen-mode it's running on. We've had trouble in the past with software assuming that big-endian 16-bit modes are available.
This is also why Wipeout 2097 can't be used in full-screen mode with newer hardware...
(R9 is 5B7A754D in HEX, 1534752077 in decimal. as number ends with 7, and 7 can't be divided by 4 or 8.)
Typical 16 bytes alignment on AlltiVec, doubles are 64bit / 8 bytes.
AllocVecTags() has option for alignment, just remember to free it with FreeVec.
If your replacing malloc() with AllocVecTags you also need to remember to replace free() with FreeVec()
It is odd that happen to end up with nonaligned memory, I assume at least 2bytes alignment be normal, perhaps a length is read wrong, if high byte, low byte is swapped, you get a bad length. As result you can get a bad offset.
Edited by LiveForIt on 2023/9/4 17:57:24
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
Typical 8 bytes alignment on AlltiVec, doubles are 64bit / 4bytes.
That's enough on all other Power(PC) CPUs supported by AmigaOS, for some even 2 byte alignment is enough for float/double, but not on 405 CPU cores with an "external" FPU (Sam440/460): float/double accesses must never cross a cache line boundary. If it does you get an alignment exception, i.e. for double you need to use 8 byte alignment.
Quote:
AllocVecTags() has option for alignment, just remember to free it with FreeVec.
If your replacing malloc() with AllocVecTags you also need to remember to replace free() with FreeVec()
malloc() results (with newlib, no idea about clib2) should have at least 4 byte alignment. If you need more alignment it's easier to replace malloc() with memalign() than using IExec->AllocVecTags()/FreeVec() instead: No need to replace free() as well.
AFAIK, WritePixelArray is a straight copy into a bitmap. No pixel format conversions whatsever.
It has to do format conversation since it has a source (PIX_FMT srcPixelFormat argument) and a destination (the one used in the dst RastPort) pixel format, which may be different.
There is 3 different versions of WPA, P96, CGX and graphic.Library.
from benchmark, it looked where similar scores, this why think perhaps it’s not doing byte swap, should be more deviation, between the different input / output format.
I think I need to do visual confirmation, or wite a validator.
One more thing, is WPA does not return success / failure, perhaps it possible to add without breaking software.
(NutsAboutAmiga)
Basilisk II for AmigaOS4 AmigaInputAnywhere Excalibur and other tools and apps.
There is 3 different versions of WPA, P96, CGX and graphic.Library.
In AmigaOS 3.x and maybe MorphOS, but not in AmigaOS 4.x. The AmigaOS 4.x cybergraphics.library always was just a wrapper calling P96, or graphics.library, functions, and Picasso96API.library doesn't exist anymore either, the only exception are the p96PIP_#?() functions. All other Picasso96API.library functions are just simple wrappers calling the corresponding graphics.library functions now.
@joerg Exactly, in os4 they all wrappers and that why they recommend to use graphics.library functions directly, and forget direct usage of cgx and p96. All in all usage of wrappers will be slower always.
P96 versions still can be used (for historical reassons) but were merged into graphics.library since some years and marked as abandoned
Anyway, sorry to sounds naive, but, wasn't you able just build BeWorld's version ? If i got it right, the colors on morphos version are ok (so endian issues are dealt with).
Or, version from PPC Linux, which also seems to be ok seeing the answers in the thread from Chrisian
I Downloaded BeWorld github (fix branch) and recompiled, and it just hangs when loading .PRM files ¿:-/
So I'm (like Sinan) applying step by step such patches and see where it hangs.
<thinking_loud> Maybe MoprhOS GL library doesn't use GLES2 (as ours, and dunnot if there are "big" diffs between GL and GLES2 or "things" are applied differently on our 3Dgfx system VS mos 3Dgfx system) and some things do work with BeWorld's fixes and others don't.) </thinking_loud>
EDIT1: and now such brach (fix) doesn't exists ¿:-/ his ain branch doesn't have render_gl_legacy,c
@jabirulo Maybe then LinuxPPC port worth to recompile ?
As for GL vs GLES2 differences : you do compile with GL4ES ? If yes, then it's "GL 2.x". If you do use OGLES2 directly, without GL, then there can be differences, but if it GL4ES , then it's the same "GL".
I also read some have issues with alignments crashes, they were solved already ?
And, seeing the picture from Sinan, it looks like textures just didn't loads up ?
Most of the patches from "BeWorld2018 ->fix" were added to "phoboslab ->master"
so my head branch remained - "mrneo240 ->master"="wip-dev" added all patches that were missing from "phoboslab ->master" and added "BeWorld2018-morph.patch"
everything is sorted on a branch and dated 3.09.2023 In addition, in each folder there is a "patch" folder where all patches are located
in the "wip-dev" directory is what I did and there is also a directory for patches which have been added. It runs on Linux x86_86 and on AOS Qemu 16bit.
As I wrote, it is fairly clear - if someone wants to use it, I have put up a file
Just to be sure, check if you have no errors in console about failing shaders, and, also, try to delete .psa dir just in case in the root (it contains precompiled shaders, so maybe old ones used).