Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (52 user(s) are browsing Forums)

Members: 2
Guests: 83

Maijestro, dfstudios, more...

Headlines

Forum Index


Board index » All Posts (Capehill)




Re: Qt 6 progress
Just can't stay away
Just can't stay away


@elfpipe

Quote:


I tested the real case, replacing CONSTRUCTOR_FUNCTION tokens with __attribute__ notation. This is so bad. There are multiple shared objects, and only a selection (random?) of the constructor functions are called. This is utterly incomprehensible.



I opened a new ticket for tracking purposes.

https://github.com/sba1/adtools/issues/139

Go to top


Re: Qt 6 progress
Just can't stay away
Just can't stay away


@elfpipe

Quote:

It gets worse. Static constructors and destructors no longer work with the latest adtools. This is strange, since the exact same code + elf.library worked fine a few releases ago.


Do you mean in context of shared objects? I have had some headaches with library constructor calls.

I tested your example and it seems to work as long as I don't declare any __attribute__((constructor)) stuff. If I do, then only one constructor is called. I don't understand the issue at all :(

My examples:

// library code
#include <proto/exec.h>
#include <stdio.h>

#define CONSTRUCTOR_FUNCTION0(AFUNC) \
namespace { \
static const struct AFUNC ## _ctor_class_ { \
inline AFUNC ## _ctor_class_() { AFUNC(); } \
AFUNC ## _ctor_instance_; \
}

#define CONSTRUCTOR_FUNCTION(AFUNC) CONSTRUCTOR_FUNCTION0(AFUNC)

void foo()
{
    
printf("%s\n"__func__);
}

void bar()
{
    
printf("%s\n"__func__);
}

CONSTRUCTOR_FUNCTION(foo);
CONSTRUCTOR_FUNCTION(bar);

#if 1
void __attribute__((constructor(1000))) ctor()
{
    
printf("%s\n"__func__);
}

void  __attribute__((destructor(1000))) dtor()
{
    
printf("%s\n"__func__);
}

void __attribute__((constructor(2000))) ctor2()
{
    
printf("%s\n"__func__);
}

void  __attribute__((destructor(2000))) dtor2()
{
    
printf("%s\n"__func__);
}
#endif

int f(int x)
{
    
printf("%s %d\n"__func__x);

    return 
x;
}

// main

#include <stdio.h>

int f(int);

int main()
{
    
int result f(123);

    
printf("%s result %d\n"__func__result);

    return 
0;
}

// makefile

CC=g++

all:
    $(
CC) -o lib.-c lib.-fPIC
    
$(CC) -o libf.so lib.-shared
    ar cruv  libf
.a lib.o
    ranlib libf
.
    
$(CC) -o test_dyn main.-use-dynld -L. -lf -athread=native 
    
$(CC) -o test_static main.-L. -lf -athread=native


Results (GCC 11.2):

Quote:

constructor> test_static
ctor
ctor2
foo
bar
f 123
main result 123
dtor2
dtor

So far so good.

constructor> test_dyn
ctor
f 123
main result 123
dtor2
dtor

WTF: ctor2, foo and bar calls missing?

Then I disable __attribute__ stuff and things get more consistent:

constructor> test_dyn
foo
bar
f 123
main result 123

constructor> test_static
foo
bar
f 123
main result 123


Go to top


Re: SDL2
Just can't stay away
Just can't stay away


@kas1e

I didn't see function similar to SDL_VideoModeOK either.

Scaling seems to exist for surface (https://wiki.libsdl.org/SDL2/SDL_BlitScaled) but if you want to accelerate it, you should create a renderer and a texture, and copy surface to texture each frame.

SDL_WINDOW_FULLSCREEN_DESKTOP is not working properly (it was never supported so far) but I started to test it yesterday. Need some debugging.

Go to top


Re: SDL2
Just can't stay away
Just can't stay away


@kas1e

If app doesn't call SDL_Quit(), then our thread subsystem will not be cleaned up. Maybe I should try again constructor/destructor approach which might solve this implicitly.

@samo79

Not yet.

Go to top


Re: SDL2
Just can't stay away
Just can't stay away


2.26.1 RC1 is available. Changes:

- Compile with GCC 11.2
- Fix shaped window alpha bitmap creation
- Enable virtual joysticks
- Add a workaround for game controller detection (AmigaOS 4 GUIDs are unfortunately broken)
- Add 2in1 game controller
- Update installer: delete old libSDL2.so soft links

https://github.com/AmigaPorts/SDL-2.0/ ... /tag/v2.26.1-rc1-amigaos4

Go to top


Re: SDL3
Just can't stay away
Just can't stay away


@Raziel

Quote:
You keep on digging into the SDL (now 3) stuff?


That's the plan.

Quote:
If i understand it correctly one could use it from day 1 even if it still relies on SDL2 or SDL1.2?


I don't know. I haven't studied the compatibility topic. AFAIK SDL3 API is not stable yet, so it's not for end users. Maybe in 3.2.0?

Go to top


SDL3
Just can't stay away
Just can't stay away


I just noticed that SDL folks are starting to work on SDL 3.x so created a new thread for that.

https://discourse.libsdl.org/t/sdl-3-0/40374

Older discussions:

SDL2 - https://www.amigans.net/modules/newbb/viewtopic.php?topic_id=7039

SDL1 - https://www.amigans.net/modules/newbb/viewtopic.php?topic_id=7164

Go to top


Re: Quake 2 and Heretic 2 OS 4 Updates
Just can't stay away
Just can't stay away


@TheMagicSN

Sources are in the same dir ( http://capehill.kapsi.fi/quake2/ ). Port is 14 years old, so I don't remember much. Maybe I added just a stack cookie. IIRC Hyperion SW renderer port existed at that time.

Go to top


Re: updating sgit
Just can't stay away
Just can't stay away


@Raziel

Your new branch is based on the one you were before, master. "sgit log" shows you the commits done.

If you have non committed changes before checkout, be careful because branch switching using sgit is destructive (if I remember correctly), so you could lose changes.

Go to top


Re: updating sgit
Just can't stay away
Just can't stay away


@Raziel

sgit branch branch-name
sgit checkout branch-name

(sgit add, sgit commit...)

sgit push origin branch-name

Go to top


Re: Mednafen Port for AmigaOS4
Just can't stay away
Just can't stay away


@rjd324

64*64 is too small. There is a limit that window must be at least 100*100 for iconification gadget to be added. I don't know what is the actual limit in the OS but if window is too small, it doesn't work.

Go to top


Re: updating sgit
Just can't stay away
Just can't stay away


@Raziel

Syntax seems correct to me.

1) Are you able to fetch from origin?
2) Are you pushing from repo's root level (some sgit commands are picky about directory: not sure about push)
3) Is your local branch called "patch-1"?

Go to top


Re: Shaderjoy 1.23
Just can't stay away
Just can't stay away


@kas1e

GetAttr issue happens because program tries to query non-existing ClickTab gadget (in case there is no editor). I guess this was more broken before 1.17 (shader loading failed?) but it seems error print was not removed earlier.

I will add a workaround to avoid this error log.

Go to top


Re: SDL2
Just can't stay away
Just can't stay away


2.24.0 RC2 is available: https://github.com/AmigaPorts/SDL-2.0/ ... /tag/v2.24.0-rc2-amigaos4

Changes:
- Add more game controller mappings
- Add SDL_GetPreferredLocales support, currently hard-coded to en_GB
- Fix a crash issue due to missing nullptr check

Go to top


Re: ScummVM and AmigaOS4.1 F.E.
Just can't stay away
Just can't stay away


@Raziel

I could not get Grim demo working on ScummVM 2.6.0. It cannot load grim_background.vertex shader. This file seems to be in extras/shaders directory. Should this demo work?

It seems that OGLES2 results are missing in your log because ScummVM (or SDL2) didn't unload GL library for some reason. This works with test/testgles2 so it could be something ScummVM-specific. SDL2 is supposed to unload GL library when destroying the window.

Could you try this:

1) start glSnoop with params PROFILE GUI
2) finish profiling from gui
3) start ScummVM
4) start profiling again
5) finally stop profiling - now you should have both OGLES2/Nova results from the correct time frame

Go to top


Re: ScummVM and AmigaOS4.1 F.E.
Just can't stay away
Just can't stay away


@Raziel

Thanks for the log sample, but based on that profiling period was very short (< 1 second) and there were very few draw calls. I could see 1 Clear and 2 DrawArrays, so almost nothing was renderered during this capture. Also OGLES2 results were not included.

Also calls of TexUpdateSubImage were expensive, average shows 13 ms so that's almost the budget for one frame at 60 FPS (~16 ms).

EDIT: strange, now I see that there are multiple short-lived context creations. Maybe ScummVM is creating the GL context many times. I'm not sure which of the results is relevant, if any.

Does this happen with Grim Fandango demo version? And did you try to remove that suspected frame cap?

Could you also test with Hieronymus? http://os4depot.net/?function=showfil ... ment/debug/hieronymus.lha

SDL2 settings should not impact OpenGL(ES2) applications, they are for SDL_Renderer subsystem (which has multiple driver backends from software to DirectX to OpenGL to Vulkan etc).

Go to top


Re: glSnoop 1.1
Just can't stay away
Just can't stay away


glSnoop 1.1 RC1 is available. Changes:

- Make function tracing more consistent
- Log timestamps
- Improve GL error handling
- Add support for new OGLES2 and Nova features
- Fix some CppCheck findings

https://github.com/capehill/glsnoop/releases

EDIT, also here: http://capehill.kapsi.fi/glsnoop/


Edited by Capehill on 2022/10/8 14:16:56
Go to top


Re: The OpenGL ES 2.0 thread
Just can't stay away
Just can't stay away


@HunoPPC

Added to the list.

Go to top


Re: Amiga games Quake 2 and Battle Squadron
Just can't stay away
Just can't stay away


@MamePPCA1

I don't think your graphics card is supported by Warp3D, AFAIK it's only for Southern Islands series (until NovaBridge).

1) You need a supported graphics card
2) Or you need Quake2 from Hyperion (it should support SW rendering)
3) Or maybe you can use Wazp3D

Go to top


Re: The OpenGL ES 2.0 thread
Just can't stay away
Just can't stay away


@kas1e

Added.

I wish OS4Depot had some kind of tagging/keyword system. For example, if you search for "ogles2", there is about 2 hits currently.

Go to top



TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 84 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project