Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
44 user(s) are online (42 user(s) are browsing Forums)

Members: 0
Guests: 44

more...

Support us!

Headlines

 
  Register To Post  

« 1 2 (3) 4 5 6 ... 10 »
Re: Porting apitrace
Just can't stay away
Just can't stay away


See User information
Pause/resume GUI added.

:riverdancing bananas:

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Bananas ! :)

Tested, and it works ! It really very handy.

With real serial all still will be slow even for little portions, so Sashimi save a lot with it. When you redirect it to ram then all really fast.

I.e. i run glsnoop with GUI key, press "pause" rigth away, then run sashimi >ram:debug.txt, then run game, go till problematic moment, press "trace" in glsnoop's gui, do something, press "pause", and in log have all stuff happens only on need it place.

I think paused-logging is not buffered right ? I mean, when i press "pause" no output collected somewhere in the memory's buffer so when i press "Trace" , it didn't throw at me what was done before, but only start all new , right ? Just to clarify, as when it throw walls of logs at you, you can't be sure :) But seems that all fine and when you press "pause" all skipped till you press "trace".

The only thing which probably need it for that little gui wndow, its resizable gadget, so anyone can set size of that gui as big as he want, with buttons resized as well. And by default that window imho can be a little bit bigger , so word "glsnoop" in the window's title will be fit in all the themes, not only default aos4 one. For me by default with SilverGreen theme it looks like this now:

Resized Image


Also found some bug probabaly: sometihng wrong with adding of OGLES2_glShaderSource(), at least i think it is. As i tried to run one game (fricking shark), and it just crashes now on that function (but crash skippable):

Stack trace:
(
0x54546570) [ogles2_module.c:238glsnoop:OGLES2_glShaderSource()+0xb8 (section 1 0x21EC)
(
0x545465A0) [ogles2_module.c:233glsnoop:OGLES2_glShaderSource()+0x90 (section 1 0x21C4)
(
0x545465D0GameEngine_lto:fpe_program.part.3()+0xd0 (section 1 0x2E7910)
(
0x545469D0GameEngine_lto:realize_glenv()+0x11fc (section 1 0x2EB294)
(
0x545472B0GameEngine_lto:fpe_glDrawArrays()+0x30 (section 1 0x2EE4B0)
(
0x545472D0GameEngine_lto:draw_renderlist()+0x106c (section 1 0x3148A8)
(
0x54547400GameEngine_lto:flush()+0x50 (section 1 0x305E74)
(
0x54547410GameEngine_lto:gl4es_glPopAttrib()+0x9c (section 1 0x32D558)
(
0x545474D0GameEngine_lto:.LTHUNK54.lto_priv.765()+0x398 (section 1 0x27B3B0)
(
0x54547550GameEngine_lto:_ZN15CGameGUIManager12RenderWindowEP14IGenericRenderP11IGameWindow9SGameRect()+0x470 (section 1 0x13A1EC)
(
0x545476F0GameEngine_lto:_ZN15CGameGUIManager12RenderWindowEP14IGenericRenderP11IGameWindow9SGameRect()+0x800 (section 1 0x13A57C)
(
0x54547890GameEngine_lto:_ZN15CGameGUIManager8OnRenderEv()+0x104 (section 1 0x13A7F4)
(
0x545479A0GameEngine_lto:.LTHUNK20.lto_priv.2069()+0x244 (section 1 0x1570FC)
(
0x54547A40GameEngine_lto:main()+0x974 (section 1 0x28DDA0)
(
0x54547D20native kernel module newlib.library.kmod+0x00002520
(0x54547D70native kernel module newlib.library.kmod+0x00003234
(0x54547F20native kernel module newlib.library.kmod+0x00003558
(0x54547F50GameEngine_lto:_start()+0x170 (section 1 0x1920)
(
0x54547F90native kernel module dos.library.kmod+0x00026724
(0x54547FC0native kernel module kernel+0x0006b268
(0x54547FD0native kernel module kernel+0x0006b2b0

Disassembly of crash site
:
 
7FDF81E03BE00000   li                r31,0
 7FDF81E4
84DE0004   lwzu              r6,4(r30)
 
7FDF81E87FE4FB78   mr                r4,r31
 7FDF81EC
7F63DB78   mr                r3,r27
>7FDF81F084BD0004   lwzu              r5,4(r29)
 
7FDF81F43BFF0001   addi              r31,r31,1
 7FDF81F8
4CC63182   crclr             6,6
 7FDF81FC
48003059   bl                0x7FDFB254
 7FDF8200
7F9FE040   cmplw             cr7,r31,r28
 7FDF8204
409EFFE0   bne+              cr7,0x7FDF81E4
Stack pointer 
(0x54546570is inside bounds
Redzone is OK 
(4)


With just NOVA tracing it works, so it for sure that function.

Before crash happens, all i see in log is:

Shell Process: OGLES2_glShaderSource: shader 256, count 1, string 0x5eddede0 length 0x0

Without running glsnoop game didn't crashes of course.

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


See User information
@kas1e

Logging is not buffered, so when you pause, logs are simply ignored.

Thanks for the crash report. It's hopefully fixed now. It seems to be OK to pass a NULL pointer for "length" param.

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Quote:

Logging is not buffered, so when you pause, logs are simply ignored.


Rigth, as it should be then :)

Quote:

Thanks for the crash report. It's hopefully fixed now. It seems to be OK to pass a NULL pointer for "length" param.


Crash fixed, and gui window looks fine too, banana !

And i can see in the log now how shaders dumps too, that quite cool ! We need filters now probabaly, so we can for example only choice from the list to patch only "glShaderSource", and have in log only shaders in use which ogles2 transfer to warp3d.

What is also good with shashimi and ">" thing, is that you can open it in realtime and see last writing. I.e. you start sashimi, glsnoop, doing things via trace/pause , and can in some dopus window check the log in realtime.

Another little moment which of course make no big harm, but you may want to change : when we run glsnoop we have: "system patched. Press control-C to quit..." in console, but then when we exit from (via ctrl-c, or via close gadget if gui mode used), then we don't have words like "System dispatched, glsnoop exit", it just silencly exit and only wrote to serial about glsnoop being terminated.

Probabaly adding that on exit to usuall console same as when we run it will be good.

PS. what you think, do we need to create ticket for adding minigl and old warp3d support too, so, ppls can trace and minigl/warp3d apps as well ? If i understand things right, patching of minigl/warp3d will be the same as warp3dnova's one ?

We anyway still use minigl things there and there, can be helpfull (for example to detect why we have crash in Jedy game, which we have with all newer minigl versions since 2.20).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
And seems found another little bug:

When we run glsnoop in gui mode, then press "pause", and then close it, then in the log we have only "tracing paused", and nothing else, which mean that probably it didn't removed/dispatched when we exit from pause mode.

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


See User information
@kas1e

I don't object adding MiniGL and Warp3D classic, but logging them is already possible, without system patching, by just building a debug version of MiniGL. glSnoop would add pause/resume feature of course.

Writing those log wrappers is super-boring so probably would need to create a Python script that creates all those functions based on the interface data.

Quote:

When we run glsnoop in gui mode, then press "pause", and then close it, then in the log we have only "tracing paused", and nothing else, which mean that probably it didn't removed/dispatched when we exit from pause mode.


Hmm. I think only prints were omitted but can check.

Patching business is somewhat undefined currently. Depending on which is quit first, the traced application or glSnoop, something strange might happen.

Quote:

we don't have words like "System dispatched, glsnoop exit", it just silencly exit and only wrote to serial about glsnoop being terminated.


Totally reasonable request, I will see what can be done.

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Quote:

Totally reasonable request, I will see what can be done.


I see you already do so, thanks !

Quote:

Hmm. I think only prints were omitted but can check.


Seems also fine now, through when in GUI mode i exit when "pause" pressed, in log i have also words that tracing resumed before restoring of patches and exit happens, but that probably not big deal.

Quote:

Patching business is somewhat undefined currently. Depending on which is quit first, the traced application or glSnoop, something strange might happen.


Oh, that can explain some strange crashes when i have few times when close glsnoop while game still in runing. I was in hope that those crash happens because of that missing dispatching when close glsnoop from gui mode when pause pressed, but as you say its other problem.

I retested now, and it seems that if i run glsnoop, then run some game, and while game runnig i quit from glsnoop, it seems patches interface still there, and game continue to works like it works over glsnoop (i can see new logs coming to serial). But when i quit glsnoop it of course says that patches removed and glsnoop terminated. Then in end , after a while, it just freeze OS or crashes.

Maybe there is no way to remove patches while app already runing with patched interface ? And there should be something like "sorry you can't interrupt glsnoop while tracing app" ?


Edited by kas1e on 2019/4/15 22:07:57
Edited by kas1e on 2019/4/15 22:10:31
Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting apitrace
Just can't stay away
Just can't stay away


See User information
@kas1e

Stability should be now improved:

1) multiple glSnoop instances are blocked by a named message port
2) when glSnoop is quit first, it attempts to remove known patches, then it waits for a moment before freeing context memory and quitting. This *hopefully* makes sure that applications don't get surprises.
3) support for multiple applications (5 now)

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Tested !

Quote:

1) multiple glSnoop instances are blocked by a named message port


That one works for sure

Quote:

2) when glSnoop is quit first, it attempts to remove known patches, then it waits for a moment before freeing context memory and quitting. This *hopefully* makes sure that applications don't get surprises.


Tested about 10 times it , in all different conditions, with gui, without, with just ogles2, with just w3dnova, with both, tried to pause/resume it : and after that exit while game is running, and all seems fine.

I.e. logging stops when need it, FPS in game back to normal (mean that patches removes fine), and exit from game also happens after that fine.

So this one for sure Banana !

Quote:

3) support for multiple applications (5 now)


Yes, i can run for sure few different ogles2 apps at one time, and loggin of them works, but at it writes to the the same log, and with the same "Shell Process:" you can't know from what and what come.

In general support of more than one GL app being running at the same time sounds interesting, but usually when you want to debug something, you debug one app / one problem, not that you debug 2 apps running at the same time which send debug information to the same log.

But i can miss the point there :) Like some GL plugins for GL app used at one time or something of that sort ..

Probably what is need it to deal with now, its that "shell process" in the log , so to get name of binary which is running for debug, and filters. And nothing else probabaly need it.

Btw, one little moment i notice: when we patch ogles2's ShaderSource, the output looks like this:

Shell ProcessOGLES2_glShaderSourceshader 256count 1string 0x5c16ade0 length 0x0
Line 0
'#version 100
precision mediump float;
precision mediump int;
uniform highp mat4 _gl4es_ModelViewProjectionMatrix;
attribute highp vec4 _gl4es_Vertex;
attribute lowp vec4 _gl4es_Color;
// FPE_Shader generated
varying vec4 Color;

void main() {
gl_Position = _gl4es_ModelViewProjectionMatrix * _gl4es_Vertex;
Color = _gl4es_Color;
}
'
Shell ProcessOGLES2_glCompileShadershader 256


So there is "Line 0: ' .... '" thing. But can be there be any other "lines", as shader is just one single piece ? I mean is there needs for that "Line 0" then ?

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


See User information
@kas1e

I agree that it is difficult to debug multiple OpenGL apps at the same time. However, maybe there are some screen savers or some accidentally started GL apps: this way glSnoop is a little bit safer.

Regarding glShaderSource: it is possible to pass multiple lines. There is count parameter.

The latest glSnoop should be able to show application name properly.

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Quote:

The latest glSnoop should be able to show application name properly.


Yeah, it is ! I run even 2 gl games, and have in log for both of them their names, like:

Shell Process 'Friking_Shark': blablalb
Shell PRocess 'LettersFall': blablab

Through, when i run those 2 games, then exit one of them, then another one, and then CTRL+C for glsnoop, then glsnoop is crashed with such stack trace:

Crash log for task "glsnoop"
Generated by GrimReaper 53.19
Crash occured in module glsnoop at address 0x7FADCE14
Type of crash
DSI (Data Storage Interruptexception
Alert number
0x80000003

Register dump
:
GPR (General Purpose Registers):
   
07FADE0E4 62D18CC0 00000002 00000000 62CE5840 00000000 022E4E14 022E4E84 
   8
00000000 00000000 7F714BE0 00000A05 26844222 68A4D180 6604E9B4 00000001 
  16
: 02390000 EFDE2550 63406C40 00000000 6605FBC8 7FAD71E8 00000000 68A40000 
  24
68A40000 68A45210 673C6EC4 673C6EFC 68A40000 62CE5840 68A45200 673C6ED4 


FPR 
(Floating Point RegistersNaN Not a Number):
   
0:                0                0          0.99999         0.181836 
   4
:         0.222222         0.285714               21               21 
   8
:                0              167              167       4.5036e+15 
  12
:       4.5036e+15      2.14748e+09     4.94884e+160      -7.7576e+10 
  16
:    -2.02184e-211     2.08306e-235     5.90462e-258      -5.4897e-63 
  20
:      5.36321e-38    -2.63551e-144     7.30753e-220     2.48107e-265 
  24
:    -4.25329e-188    -9.30944e-202     3.08329e-153     2.20245e-226 
  28
:    -8.64219e-262    -8.93921e-262     3.44347e-293     -1.03663e+88 

FPSCR 
(Floating Point Status and Control Register): 0x82004000


SPRs 
(Special Purpose Registers):
           
Machine State (msr) : 0x0002F030
                Condition 
(cr) : 0x628D7A6C
      Instruction Pointer 
(ip) : 0x7FADCE14
       Xtended Exception 
(xer) : 0x5EC7B038
                   Count 
(ctr) : 0x6FF5D4D0
                     Link 
(lr) : 0x7FBFF698
            DSI Status 
(dsisr) : 0x5EC7ADF0
            Data Address 
(dar) : 0x019E7748



680x0 emulated registers
:
DATA00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
ADDR
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 
FPU0
:                0                0                0                0 
FPU4
:                0                0                0                0 



Symbol info
:
Instruction pointer 0x7FADCE14 belongs to module "glsnoop" (PowerPC
Symbolpatch_Destroy 0x10 in section 1 offset 0x00005E10

Stack trace
:
    [
warp3dnova_module.c:301glsnoop:patch_Destroy()+0x10 (section 1 0x5E10)
    [
warp3dnova_module.c:342glsnoop:warp3dnova_remove_patches()+0x10c (section 1 0x70F4)
    
native kernel module newlib.library.kmod+0x00002520
    native kernel module newlib
.library.kmod+0x00003234
    native kernel module newlib
.library.kmod+0x00003558
    glsnoop
:_start()+0x170 (section 1 0x16C)
    
native kernel module dos.library.kmod+0x00026724
    native kernel module kernel
+0x0006b268
    native kernel module kernel
+0x0006b2b0

PPC disassembly
:
 
7fadce0c40820014   bne-              0x7FADCE20
 7fadce10
81440028   lwz               r10,40(r4)
*
7fadce149149000c   stw               r10,12(r9)
 
7fadce1890640028   stw               r3,40(r4)
 
7fadce1c4e800020   blr


Ignore DSI helps.


Also , when i build last version, i have some new warning from gcc (i use 8.2.0 which is more warning-aware by default), there is:

make
ppc
-amigaos-gcc -o main.-c main.-Wall -O3 -gstabs
ppc
-amigaos-gcc -o ogles2_module.-c ogles2_module.-Wall -O3 -gstabs
In file included from ogles2_module
.c:2:
common.h:14:13warning‘patch_aglSwapBuffers’ defined but not used [-Wunused-function]
 static 
void patch_##func(BOOL patching, struct ctxtype * ctx) \
             
^~~~~~
ogles2_module.c:521:1notein expansion of macro ‘GENERATE_PATCH’
 GENERATE_PATCH
(OGLES2IFaceaglSwapBuffersOGLES2Ogles2Context)
 ^~~~~~~~~~~~~~
ogles2_module.cIn function ‘EXEC_GetInterface’:
ogles2_module.c:66:52warning%s’ directive output may be truncated writing up to 31 bytes into a region of size 30 [-Wformat-truncation=]
             
snprintf(context->nameNAME_LEN"%s '%s'"node->ln_Namebuffer);
                                                    ^~                   ~~~~~~
ogles2_module.c:66:13note‘snprintf’ output 4 or more bytes (assuming 35into a destination of size 32
             snprintf
(context->nameNAME_LEN"%s '%s'"node->ln_Namebuffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘find_process_name’,
    
inlined from ‘EXEC_GetInterface’ at ogles2_module.c:118:17:
ogles2_module.c:69:9warning‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
         
strncpy(context->namenode->ln_NameNAME_LEN);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ogles2_module.c:64:13warning‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
             
strncpy(context->namenode->ln_NameNAME_LEN);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -o warp3dnova_module.-c warp3dnova_module.-Wall -O3 -gstabs
warp3dnova_module
.cIn function ‘my_W3DN_CreateContext’:
warp3dnova_module.c:101:52warning%s’ directive output may be truncated writing up to 31 bytes into a region of size 30 [-Wformat-truncation=]
             
snprintf(context->nameNAME_LEN"%s '%s'"node->ln_Namebuffer);
                                                    ^~                   ~~~~~~
warp3dnova_module.c:101:13note‘snprintf’ output 4 or more bytes (assuming 35into a destination of size 32
             snprintf
(context->nameNAME_LEN"%s '%s'"node->ln_Namebuffer);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘find_process_name’,
    
inlined from ‘my_W3DN_CreateContext’ at warp3dnova_module.c:369:17:
warp3dnova_module.c:104:9warning‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
         
strncpy(context->namenode->ln_NameNAME_LEN);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
warp3dnova_module.c:99:13warning‘strncpy’ specified bound 32 equals destination size [-Wstringop-truncation]
             
strncpy(context->namenode->ln_NameNAME_LEN);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ppc-amigaos-gcc -o logger.-c logger.-Wall -O3 -gstabs
ppc
-amigaos-gcc -o gui.-c gui.-Wall -O3 -gstabs
ppc
-amigaos-gcc -o glsnoop main.o ogles2_module.o warp3dnova_module.o logger.o gui.-lauto



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


See User information
@kas1e

It seems that the current name buffer is already on the edge so increased it. Need to solve those truncation warnings at some point.

There was a bug in Destroy() wrapper that did cleanup wrongly, hopefully fixed now - thanks!

Go to top
Re: Porting apitrace
Just can't stay away
Just can't stay away


See User information
@Capehill

Use strlcpy() instead of strncpy(). The strncpy() API is weird and only nul-terminates if the source string is smaller than the specified size.

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill
Tested latest version, yes, crash on exit fixed and all warnings gone, cool :)

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


See User information
@salass00

The current implementation uses only snprintf: https://github.com/capehill/glsnoop/blob/master/common.c

I wonder whether GetCliProgramName adds a zero character in
case of truncation or not...

@kas1e

Good to hear.

Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Capehill

Tested latest version and now all warnings gone and filters added , banana of course !

Did i understand right, that filters for NOVA is not working at moment ? At least when i tried to comment out everything, for ogles2 , but keep only one function: all works for ogles2 filtering. But when i tried to comment out everything for NOVA, but only keep W3DN_Destroy, it still output for me patched W3DN_DestroyVertexBufferObject().


Also, it seems that glShaderSource() patching not works as should : big enough shaders do not fits to the logs, and just ends on some random place. See what i have in log now:

Shell Process 'GameEngine_lto'OGLES2_glShaderSourceshader 260count 1string 0x61fbead8 length 0x0
Line 0
'#version 100
precision highp float;
#define _gl4es_MaxLights 8
precision highp int;
uniform highp mat4 _gl4es_ModelViewMatrix;
uniform highp mat4 _gl4es_ModelViewProjectionMatrix;
uniform highp mat4 _gl4es_TextureMatrix[8];
uniform highp mat3 _gl4es_NormalMatrix;
attribute highp vec4 _gl4es_Vertex;
attribute lowp vec4 _gl4es_Color;
attribute highp vec4 _gl4es_MultiTexCoord0;
attribute highp vec4 _gl4es_MultiTexCoord1;
attribute highp vec3 _gl4es_Normal;
struct _gl4es_LightSourceParameters
{
   vec4 ambient;
   vec4 diffuse;
   vec4 specular;
   vec4 position;
   vec4 halfVector;
   vec3 spotDirection;
   float spotExponent;
   float spotCutoff;
   float spotCosCutoff;
   float constantAttenuation;
   float linearAttenuation;
   float quadraticAttenuation;
};
uniform _gl4es_LightSourceParameters _gl4es_LightSource[_gl4es_MaxLights];
struct _gl4es_LightModelParameters {
  vec4 ambient;
};
uniform _gl4es_LightModelParameters _gl4es_LightModel;
struct _gl4es_MaterialParameters
{
   vec4 emission;
   vec
Shell Process '
GameEngine_lto': OGLES2_glShaderSource: shader 261, count 1, string 0x5c98cdf0 length 0x0
Line 0: '
#version 100
precision highp float;
#define _gl4es_MaxLights 8
precision highp int;
struct _gl4es_LightSourceParameters
{
   
vec4 ambient;
   
vec4 diffuse;
   
vec4 specular;
   
vec4 position;
   
vec4 halfVector;
   
vec3 spotDirection;
   
float spotExponent;
   
float spotCutoff;
   
float spotCosCutoff;
   
float constantAttenuation;
   
float linearAttenuation;
   
float quadraticAttenuation;
};
uniform _gl4es_LightSourceParameters _gl4es_LightSource[_gl4es_MaxLights];
struct _gl4es_MaterialParameters
{
   
vec4 emission;
   
vec4 ambient;
   
vec4 diffuse;
   
vec4 specular;
   
float shininess;
};
uniform _gl4es_MaterialParameters _gl4es_FrontMaterial;
uniform _gl4es_MaterialParameters _gl4es_BackMaterial;
struct _gl4es_FogParameters {
    
vec4 color;
    
float density;
    
float start;
    
float end;
    
float scale;
};
uniform _gl4es_FogParameters _gl4es_Fog;
varying lowp vec4 _gl4es_FrontColor;
varying mediump vec4 _gl4es_TexCoord[2];
#define ENABLE_FOG
#define ENABLE_TEXTURES
#define TEXTURE_UNITS 1
#d
Shell Process 'GameEngine_lto'OGLES2_glShaderSourceshader 262count 1string 0x5c96c880 length 0x0


See, it just ends randomly, like, buffer is too small and static (like 1024 or something) and not dinamic-calculated ?

It is also show length 0x0 all the time for all shaders, dunno if it correct as well ?

@Hans

What function of Warp3dNova is analogue of glShaderSource() ? Is it GetShaderDataBuffer() ?

Why i ask, because we often not only need to get shaders which "in" to ogles2, but we also need code of shaders which "in" to warp3dnova (be it after ogles2 conversion, or when we use pure warp3dnova progs).

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@kas1e

Quote:
@Hans

What function of Warp3dNova is analogue of glShaderSource() ? Is it GetShaderDataBuffer() ?

Why i ask, because we often not only need to get shaders which "in" to ogles2, but we also need code of shaders which "in" to warp3dnova (be it after ogles2 conversion, or when we use pure warp3dnova progs).

Sounds like you're confused as to what glShaderSource() does. It's used to pass shader code TO OpenGL, NOT to get it.

Or do you mean glGetShaderSource()? If you mean glGetShaderSource(), then there is no equivalent. Warp3D Nova does NOT store a copy of the SPIR-V shader code because that would be a pointless waste of memory.

If you want to capture a copy of the SPIR-V source, then do so in your patched CompileShader() function.

Hans

Join Kea Campus' Amiga Corner and support Amiga content creation
https://keasigmadelta.com/ - see more of my work
Go to top
Re: Porting apitrace
Home away from home
Home away from home


See User information
@Hans
Quote:

Sounds like you're confused as to what glShaderSource() does. It's used to pass shader code TO OpenGL, NOT to get it.


It probabaluy have no difference with shader itself ? I mean, be it TO , and NOT to get, or to get, and not to : it make no differences as shader didn't changes.

The point there is that we have now shader with which ogles2 operates (so gl4es send it, ogles2 take it). Now we need what is ogles2 output to the nova, and what nova get from ogles2 , i.e. how shader start to looks like after, and in his last tranformation.

With that info, i may start to think more about why fricking shark shaders didn't work at all visually while compiles well.

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


See User information
@Capehill

Quote:

I wonder whether GetCliProgramName adds a zero character in
case of truncation or not...


It does.

Go to top
Re: Porting apitrace
Just can't stay away
Just can't stay away


See User information
@kas1e

Changed matcher function to use strcmp instead of strstr.

Increased line buffer to 16 K. It's allocated on stack for speed and simplicity. Not sure what is the best to way to handle it. Now it sets an implicit requirement for application to have enough stack.

Quote:

It is also show length 0x0 all the time for all shaders, dunno if it correct as well ?


Yes, https://www.khronos.org/registry/OpenG ... /xhtml/glShaderSource.xml

Go to top

  Register To Post
« 1 2 (3) 4 5 6 ... 10 »

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project