Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
87 user(s) are online (80 user(s) are browsing Forums)

Members: 1
Guests: 86

davec555, more...

Support us!

Headlines

 
  Register To Post  

« 1 ... 34 35 36 (37) 38 39 40 ... 74 »
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
About iconification snapshooting issue, i just change OS4_GetDiskObject() in the SDL_os4window.c as Trixie suggest and it works indeed. Just in case i set it to fallback one as well (to avoid problems when default on snapshoted somehow different too). There is:

static struct DiskObject*
OS4_GetDiskObject(_THIS)
{
    
SDL_VideoData *videodata = (SDL_VideoData *) _this->driverdata;
    
struct DiskObject *diskObject NULL;

    if (
videodata->appName) {
        
BPTR oldDir IDOS->SetCurrentDir(IDOS->GetProgramDir());
        
diskObject IIcon->GetDiskObject(videodata->appName);
        
diskObject->do_CurrentX NO_ICON_POSITION;
        
diskObject->do_CurrentY NO_ICON_POSITION;
        
IDOS->SetCurrentDir(oldDir);
    }

    if (!
diskObject) {
        
CONST_STRPTR fallbackIconName "ENVARC:Sys/def_window";
        
dprintf("Falling back to '%s'\n"fallbackIconName);
        
diskObject IIcon->GetDiskObjectNew(fallbackIconName);
        
diskObject->do_CurrentX NO_ICON_POSITION;
        
diskObject->do_CurrentY NO_ICON_POSITION;

    }

    return 
diskObject;
}


I added that info to the ticket as well

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Amigans Defender
Amigans Defender


See User information
@kas1e

Yes but this piece of code doesn't look very safe:

diskObject IIcon->GetDiskObject(videodata->appName);
diskObject->do_CurrentX NO_ICON_POSITION;
diskObject->do_CurrentY NO_ICON_POSITION;

GetDiskObject() can easily fail with a NULL return value, so the two assignments will poke into invalid memory! You should change it to

diskObject IIcon->GetDiskObject(videodata->appName);         
if (
diskObject)
 {
  
diskObject->do_CurrentX NO_ICON_POSITION;         
  
diskObject->do_CurrentY NO_ICON_POSITION;
 }





The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

Maybe you can try 'GetIconTags()' as it loads a default icon if none found.
...
//diskObject = IIcon->GetDiskObject(videodata->appName);
diskObject = IIcon->GetIconTags(videodata->appName, ICONGETA_FailIfUnavailable,FALSE, TAG_END);
...

Go to top
Re: SDL2
Amigans Defender
Amigans Defender


See User information
@jabirulo

Quote:
Maybe you can try 'GetIconTags()' as it loads a default icon if none found.

So does GetDiskObjectNew(), by the way. The code kas1e has posted can surely be rewritten/improved in several ways, but I think the simplest edit is the safety check I've suggested above.


Edited by trixie on 2019/7/17 16:01:33
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@trixie

Yeah, NULL checks are required. I would propose to patch it here (only one branch):

https://github.com/AmigaPorts/SDL/blob ... os4/SDL_os4window.c#L1042

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

About testdraw2, two things that might simplify the test case:

1) Reduce number of objects

https://github.com/AmigaPorts/SDL/blob/master/test/testdraw2.c#L25

2) Remove some primitive forms (try only lines, points or rectangles, for example)

https://github.com/AmigaPorts/SDL/blob/master/test/testdraw2.c#L195

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Quote:

Reduce number of objects


Tried with 20 instead of 100 : same crash.

Quote:

Remove some primitive forms (try only lines, points or rectangles, for example)


Only points: crash
Only lines: crash
Only rects: crash

Its like just whole "batching" thing broken for ogles2.

Btw, what i also notice, is that when it only rects, then graphics library give 4330 fps, opengl one 1910fps, and ogles2 2100fps. So in case with just rects, ogles2 version is faster a little. But when it come to lines and dots, it slower a lot.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

testdraw2 still works for me, using ogles2.library 2.6. What is the md5sum of your ogles2.library?

Go to top
Re: SDL2
Not too shy to talk
Not too shy to talk


See User information
@Capehill
There was another bug in ogles2 which indeed caused testdraw2 with env-var SDL_RENDER_BATCHING 1 to produce undefined behaviour. On my FTP there's a wip-version of ogles2 2.7 which among many other stuff also contains a fix for that one.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Daniel
Yeah, can confirm that 2.7 fix the SDL_RENDER_BATCHING thing.

@Capehill
Now when SDL_RENDER_BATCHING enabled, we have 207fps for ogles2 rendering, which indeed about 7 times faster than without, but render via pure opengl (minigl) give us 411fps.

So with batching it much better indeed, but still slower than opengl one.

I also notice, that in "fix-opengles2-renderer" branch, you rewrite a bit fragment shader (to map ARGB colors), but should't we just report issue to Hans, so he will made it works the same as on all other platforms ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@kas1e

I removed angle/center stuff from the vertex shader (which are not used for point/line/rects) and also the glPointSize, and ran testdraw2 few times: for me, OGLES2 is faster that MiniGL in rects and lines. MiniGL is 2x faster in points.

Regarding fragment shader: SDL2 tells OpenGL all textures are internally GL_RGBA. Now, we have ARGB texture in memory and so I believe we need to reorder the color channels so that OpenGL gets what it was promised. This actually works (try testscale, for example). However target textures are partially broken: the smiley face (testrendercopyex) clearly suffers from wrong color channels. However, the background doesn't, so it seems strange to me. Their texture format is identical.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill
Tested your way of fixing NO_ICON_POSITION stuff, and yes, all fine as well, closed the ticket.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Thank you for the release.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

I don't know if the following issue is SDL2 or OGLES2, since it only appears when starting residualvm built with ogles2 (sdl1 and sdl2 are fine), but it has an SDL2 error message, so i guess it might be a cobination of both?

Quote:

WARNING: Unsupported bpp value: 24!
WARNING: SDL_SetVideoMode failed: Invalid texture!


On start i get this, after it tried to open a screen (monitor goes black and returns to WB...)

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Raziel

I tried to build the latest ResidualVM but when starting I run into some error with boolean uniforms. How do you configure and build it?

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

I thought as much...please discard my inquiry.
Seems I have a mixed build with opengl which not really uses ogles2.

Must have broken my branch with one if the last merges.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@capehill

Sorry if this is the wrong thread, but i need to first find out who is acting wrong.

It could be SDL2 or OGLES2.

ScummVM built with OGLES2 and SDL2 running.

If i choose to play any game that is not yet fully supported, a black screen will come up with a window saying just that and the possibility to start or cancel.

The screen is, as i said, black or erased when using SDL1, SDL2 and MiniGL.
But it's not once OGLES2 is used.

Instead a malformed part of the earlier launcher screen is displayed.
Resized ImageResized Image
The right one is the correct one (SDL2 and OpenGL)

If you could just point me to the correct thread and i'll be gone

Thank you

Go to top
Re: SDL2
Just can't stay away
Just can't stay away


See User information
@Raziel

I think it's not SDL2. SDL2 doesn't draw anything when OGLES2 context is used (OGLES2 is given the window pointer). Which W3DNova driver version you are using?

It seems that you have reported this kind of texture/framebuffer (?) issue earlier here http://www.amigans.net/modules/xforum ... id=113834#forumpost113834 and then Kas1e responded that he may have the same issue with Letterfall game, and that is possibly fixed in Nova driver 1.60 or something, I didn't read the whole thread til the end.

Go to top
Re: SDL2
Home away from home
Home away from home


See User information
@Capehill

Warp3DNova.library 1.65 (31.03.2019)
W3DN_SI.library 1.65 (31.03.2019)

Yes, i know about that other thread.
I dropped it because iogles2 wasn't as evolved as it is now and i thought that it might be because of something else interfering.

Need to resurrect my post thread there then.

Thanks a lot

Go to top

  Register To Post
« 1 ... 34 35 36 (37) 38 39 40 ... 74 »

 




Currently Active Users Viewing This Thread: 2 ( 0 members and 2 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project