Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
11 user(s) are online (7 user(s) are browsing Forums)

Members: 0
Guests: 11

more...
Support us!
Recent OS4 Files
OS4Depot.net



« 1 ... 6 7 8 (9)


Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
You are right, don't waste your time on it for sure. Logging already fine enough :)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Tested latest version : independent starttime & duration works fine, as well as output in info log are good too :) Thanks a bunch for such a fast fixes/changes.

I notice through few little nitpicking issues which we can skip, but maybe worth to note (or maybe add them to BZ for 0.4 or for some future):

1). As we can use "Starttime" or "Duration" only with "PROFILE", then maybe worth at begining when we run glsnoop check also on that: if no PROFILE arg was used, but or Starttime, or Duration, or both was used, then or exit with words "sorry, startstime & duration can be used only in PROFILE mode", or, continue with the same words, but like "sorry, starttime & duration can be used in PROFILE mode only, skiping and continue without".

So that will be good user's feadback about.

2). it didn't works in GUI , but that probabaly expected ? Maybe to make it works in GUI, the same checking on args need it (so if PROFILE used, and if anything like STARTTIME or DURATION or both used and that all toghet with GUI), then make it works, just run gui with all buttons disabled. Or even instead of buttons, wrote in the middle of gui window "you can't control tracing/profiling when starttime/duration is used"

3). if you run glsnoop like "glsnoop PROFILE STARTTIME 10" (for example), and then imeediately press "ctrl+c" , then after words "*** Control-C detected ***" , we have "*** Delay timer triggered ***", while it wasn't triggered (as we for first didn't start anything yet, and for seconds 10 seconds didn't pass for trigger the delay timer). I think it can be some missing "if/else" ?


All of this for sure not really important, just trying to find any pieces which can be improved even a little bit :)

ps. And i have no single crash or issues for now when use glsnoop in all conditions. Pretty stable and helpfull

ps2. And i checked "tequila" of course too, pretty good :)

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
1) I will add some prints.

2) Yes, GUI mode is not supported. I don't want to duplicate all that timer logic on GUI side and GUI is pretty pointless if you are using start/duration params, in my opinion. If it can be implemented without code duplication, I might enable it in the future.

3) It's probably because timer is not cancelled upon CTRL-C. EDIT: "delay timer" (or "patch cooldown timer") is triggered in all cases. IExec has been patched and those patches must be removed "safely".


Edited by Capehill on 2019/10/10 18:15:48
   Report Go to top

Re: Porting apitrace
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803

   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Tested, yeah, all fine, thanks !

Btw, sorry for saying that, i am sure that you know it all well, but i just see you always change the build date manually, which of course take your time for nothing. Instead, you can use "date" for both crosscompiler and native. There adapted glsnoop's makefile:

ifneq ($(shell uname), AmigaOS)
    
CC            ppc-amigaos-gcc
    DELETE        
rm -f
    STRIP        
ppc-amigaos-strip
    NEWDATE        
= $(shell date +"%-d.%-m.%Y")
else
    
CC            gcc
    DELETE        
delete
    STRIP        
strip
    NEWDATE        
= $(shell date LFORMAT=%-d.%-m.%Y)
endif

NAME glSnoop
OBJS 
main.o ogles2_module.o warp3dnova_module.o logger.o gui.o common.o filter.o timer.o profiling.o
DEPS 
= $(OBJS:.o=.d)

CFLAGS = -Wall -Wextra -O3 -gstabs -D__COMPDATE__="$(NEWDATE)" 

# Dependencies
%.: %.c
    
$(CC) -MM -MP -MT $(@:.d=.o) -$@ $< $(CFLAGS)

%.
: %.c
    
$(CC) -$@ -$< $(CFLAGS)

$(
NAME): $(OBJSmakefile
    
$(CC) -$@ $(OBJS) -lauto

clean
:
    $(
DELETE) $(OBJS)

strip:
    $(
STRIP) $(NAME)

ifneq ($(MAKECMDGOALS),clean)
-include $(
DEPS)
endif


See there i add for both native and crosscompiler different date call to have the same output, and in the CFLAGS add new __COMPDATE__ which will take the date.

So in code for both glsnoop and tequila you can use that __COMPDATE__ later without needs to worry anymore about manual date set.

That will have needs to do once, and you can forget about for all the time, and date will be always 100% accurate

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Found some formatting bug probably in ogles2 shader's patch function.

In the original code i have that:

static stringc vertToonShader =
"varying vec2 vTexCoord;"
"void main(void)"
"{"
"   vec2 Position;"
"   Position.xy = sign(gl_Vertex.xy);"
"   gl_Position = vec4(Position.xy, 0.0, 1.0);"
"   vTexCoord =Position.xy *.5 + .5;"
"}"
;

static 
stringc fragToonShader =
"uniform sampler2D texture[2];"
"varying vec2 vTexCoord;"
"uniform float sampleDist;"
"uniform float grayScaleFactor;"
"void main()"
"{"
"   vec2 samples[12];"
"   samples[0]  = vTexCoord + sampleDist * vec2(-0.326212, -0.405805);"
"   samples[1]  = vTexCoord + sampleDist * vec2(-0.840144, -0.073580);"
"   samples[2]  = vTexCoord + sampleDist * vec2(-0.695914,  0.457137);"
"   samples[3]  = vTexCoord + sampleDist * vec2(-0.203345,  0.620716);"
"   samples[4]  = vTexCoord + sampleDist * vec2(0.962340, -0.194983);"
"   samples[5]  = vTexCoord + sampleDist * vec2(0.473434, -0.480026);"
"   samples[6]  = vTexCoord + sampleDist * vec2(0.519456,  0.767022);"
"   samples[7]  = vTexCoord + sampleDist * vec2(0.185461, -0.893124);"
"   samples[8]  = vTexCoord + sampleDist * vec2(0.507431,  0.064425);"
"   samples[9]  = vTexCoord + sampleDist * vec2(0.896420,  0.412458);"
"   samples[10]  = vTexCoord + sampleDist * vec2(-0.321940, -0.932615);"
"   samples[11]  = vTexCoord + sampleDist * vec2(-0.791559, -0.597705);"
"   vec4 sample = texture2D(texture[0], vTexCoord);"
"   for(int i = 0; i < 12; i++)"
"   {"
"      sample += texture2D(texture[0],samples[i] );"
"   }"
"   sample /= 13.0;"
"   float greyscale=sample.r*0.3+sample.g*0.59+sample.b*0.11;"
"   vec4 gray;"
"   gray.r=greyscale;"
"   gray.g=greyscale;"
"   gray.b=greyscale;"
"   gl_FragColor = (sample*(1-grayScaleFactor)) + (gray*grayScaleFactor);"
"}"
;


Now, when i do choice to patch only shader's based functions in ogles i have 2 issues.

1st one : output have no cariage return after a ";" most of time.

2st one : second shaders dump not fully, and stop on the words
for(int.

That how glsnoop output looks like for me for those 2 shaders:

Quote:

Shell Process 'NIGHT OF THE ZOMBIES.exe': OGLES2_glShaderSource: shader 259, count 1, string 0x5721f9a8 length 0x0
Line 0: '#version 100
precision highp float;
precision highp int;
attribute highp vec4 _gl4es_Vertex;
varying vec2 vTexCoord;void main(void){ vec2 Position; Position.xy = sign(_gl4es_Vertex.xy); gl_Position = vec4(Position.xy, 0.000000, 1.000000); vTexCoord =Position.xy *.5 + .5;}'
Shell Process 'NIGHT OF THE ZOMBIES.exe': OGLES2_glCompileShader: shader 259
Shell Process 'NIGHT OF THE ZOMBIES.exe': OGLES2_glShaderSource: shader 260, count 1, string 0x5721f900 length 0x0
Line 0: '#version 100
precision highp float;
precision highp int;
uniform sampler2D texture[2];varying vec2 vTexCoord;uniform float sampleDist;uniform float grayScaleFactor;void main(){ vec2 samples[12]; samples[0] = vTexCoord + sampleDist * vec2(-0.326212, -0.405805); samples[1] = vTexCoord + sampleDist * vec2(-0.840144, -0.073580); samples[2] = vTexCoord + sampleDist * vec2(-0.695914, 0.457137); samples[3] = vTexCoord + sampleDist * vec2(-0.203345, 0.620716); samples[4] = vTexCoord + sampleDist * vec2(0.962340, -0.194983); samples[5] = vTexCoord + sampleDist * vec2(0.473434, -0.480026); samples[6] = vTexCoord + sampleDist * vec2(0.519456, 0.767022); samples[7] = vTexCoord + sampleDist * vec2(0.185461, -0.893124); samples[8] = vTexCoord + sampleDist * vec2(0.507431, 0.064425); samples[9] = vTexCoord + sampleDist * vec2(0.896420, 0.412458); samples[10] = vTexCoord + sampleDist * vec2(-0.321940, -0.932615); samples[11] = vTexCoord + sampleDist * vec2(-0.791559, -0.597705); vec4 sample = texture2D(texture[0], vTexCoord); for(int


See first shader start dumping fine, with cariage return after ";", then it disappear, and after that all going in line. And second shader dumped not in full size.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@kas1e

1) That's because shader string doesn't contain '\n' characters. Apparently only the prefix part does.

2) It seems to be chopped after about 1 kilobyte while glSnoop log buffer is 16 kilobytes. Does it happen with or without Sashimi? At least DebugPrintF() function is able to print longer buffers (> 1024 chars).

I think there is a bug in glSnoop in case strings weren't NUL-terminated and "length" array was passed because lengths are ignored as far as I can see, but this a separate issue.

   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Quote:

1) That's because shader string doesn't contain '\n' characters. Apparently only the prefix part does.


That probabaly because prefix part added by gl4es at top of original shader , and then other part taken without modification as it. So probabaly not something we need to worry about then (?).

Quote:

2) It seems to be chopped after about 1 kilobyte while glSnoop log buffer is 16 kilobytes. Does it happen with or without Sashimi? At least DebugPrintF() function is able to print longer buffers (> 1024 chars).


It was pure "dumpdebugbuffer" in console (and i even tried to redirect it to a file, same result). When i just trace shaders function there no big needs in sashimi, as not that much to dump, so no slowing downs.

And when i check, that string wasn't line 1024, but something like 1068 or so. Yeah, "almost" 1024 limit, but a bit more.



_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@kas1e

I haven't been able to reproduce issue. Maybe you can add a normal printf() somewhere around https://github.com/capehill/glsnoop/bl ... ter/ogles2_module.c#L2259 for comparison.


   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
There is little fault in makefile which make it fail to bulid on crosscompiler, it should be not:

Quote:

CFLAGS = -Wall -Wextra -O3 -gstabs -D__AMIGA_DATE__="$(AMIGADATE)"


But with added \ char before both " things. That should be fine and for crosscompiler's shells , and for "sh" on amigaos4, and for pure amigaos4 shell


Edited by kas1e on 2019/10/27 12:09:57
_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Quote:

I haven't been able to reproduce issue. Maybe you can add a normal printf() somewhere around https://github.com/capehill/glsnoop/bl ... ter/ogles2_module.c#L2259 for comparison.


Yeah, there is printf output:

Quote:

'Line 0: '#version 100
precision highp float;
precision highp int;
uniform sampler2D texture[2];varying vec2 vTexCoord;uniform float sampleDist;uniform float grayScaleFactor;void main(){ vec2 samples[12]; samples[0] = vTexCoord + sampleDist * vec2(-0.326212, -0.405805); samples[1] = vTexCoord + sampleDist * vec2(-0.840144, -0.073580); samples[2] = vTexCoord + sampleDist * vec2(-0.695914, 0.457137); samples[3] = vTexCoord + sampleDist * vec2(-0.203345, 0.620716); samples[4] = vTexCoord + sampleDist * vec2(0.962340, -0.194983); samples[5] = vTexCoord + sampleDist * vec2(0.473434, -0.480026); samples[6] = vTexCoord + sampleDist * vec2(0.519456, 0.767022); samples[7] = vTexCoord + sampleDist * vec2(0.185461, -0.893124); samples[8] = vTexCoord + sampleDist * vec2(0.507431, 0.064425); samples[9] = vTexCoord + sampleDist * vec2(0.896420, 0.412458); samples[10] = vTexCoord + sampleDist * vec2(-0.321940, -0.932615); samples[11] = vTexCoord + sampleDist * vec2(-0.791559, -0.597705); vec4 sample = texture2D(texture[0], vTexCoord); for(int i = 0; i < 12; i++) { sample += texture2D(texture[0],samples[i] ); } sample /= 13.000000; float greyscale=sample.r*0.300000+sample.g*0.590000+sample.b*0.110000; vec4 gray; gray.r=greyscale; gray.g=greyscale; gray.b=greyscale; gl_FragColor = (sample*(1-grayScaleFactor)) + (gray*grayScaleFactor);}'


And there is output which i have from glsnoop when do dumpdebugbuffer:

Quote:

'#version 100
precision highp float;
precision highp int;
uniform sampler2D texture[2];varying vec2 vTexCoord;uniform float sampleDist;uniform float grayScaleFactor;void main(){ vec2 samples[12]; samples[0] = vTexCoord + sampleDist * vec2(-0.326212, -0.405805); samples[1] = vTexCoord + sampleDist * vec2(-0.840144, -0.073580); samples[2] = vTexCoord + sampleDist * vec2(-0.695914, 0.457137); samples[3] = vTexCoord + sampleDist * vec2(-0.203345, 0.620716); samples[4] = vTexCoord + sampleDist * vec2(0.962340, -0.194983); samples[5] = vTexCoord + sampleDist * vec2(0.473434, -0.480026); samples[6] = vTexCoord + sampleDist * vec2(0.519456, 0.767022); samples[7] = vTexCoord + sampleDist * vec2(0.185461, -0.893124); samples[8] = vTexCoord + sampleDist * vec2(0.507431, 0.064425); samples[9] = vTexCoord + sampleDist * vec2(0.896420, 0.412458); samples[10] = vTexCoord + sampleDist * vec2(-0.321940, -0.932615); samples[11] = vTexCoord + sampleDist * vec2(-0.791559, -0.597705); vec4 sample = texture2D(texture[0], vTexCoord); for(int

2/0.Work:debug/glsnoop>


I.e. its that when i just have those 2 lines one after another:

logLine("Line %u: '%s'"istring[i]);
printf("Line %u: '%s'"istring[i]);



Then tried sashimy : there is all fine !

So.. wtf ?:) Is it just dumpdebugbuffer can't handle big enough strings (that somewhere a bit more than 1024) ?

Full shader in line are 1401 bytes, while when we stop when do dumpdebugbuffer, it print only 1082 bytes

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Home away from home
Joined:
2007/9/11 11:31
From Russia
Posts: 5531
@Capehill
Is there any way with current glSnoop, to dump content of W3DN_DBOSetBuffer ? I mean content of buffers exactly in hex format.

_________________
Join us to improve dopus5!
zerohero's mirror of os4/os3 crosscompiler suites
   Report Go to top

Re: Porting apitrace
Quite a regular
Joined:
2007/7/14 20:30
From Lothric
Posts: 803
@kas1e

Try something like

diff --git a/warp3dnova_module.c b/warp3dnova_module.c
index 207869a
..5b91f1f 100644
--- a/warp3dnova_module.c
+++ b/warp3dnova_module.c
@@ -863,+863,11 @@ static W3DN_ErrorCode W3DN_BufferUnlock(struct W3DN_Context_s *self,
 {
     
W3DN_ErrorCode result W3DNEC_SUCCESS;
 
+    const 
size_t items bufferLock->size 4;
+    for (
size_t i 0itemsi++) {
+        
logLine("[%u] = 0x%lX"ibufferLock->buffer[i]);
+    }
+
     
NOVA_CALL_RESULT(resultBufferUnlockbufferLockwriteOffsetwriteSize)
 
     
logLine("%s: %s: bufferLock %p, writeOffset %llu, writeSize %llu. Result %d (%s)"context->name__func__,


It will dump all buffers, not only DBOs and in case buffer sizes are not aligned to 32-bits, it may fail to print some bytes.

   Report Go to top


« 1 ... 6 7 8 (9)



[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project