Author Topic: Could i use pre-compressed ETC1 texture file in jPCT-AE?  (Read 7337 times)

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #15 on: January 17, 2014, 03:03:02 pm »
If we have in-memory cache, not only we can save more in main memory, but save memory in gpu too. I think it's a win-win solution with abit more effort to do it. I had many crash reports with my app due to out of memory issue. However, compressing it makes it look bad on resume (due to the stutter). It would be nice if we have both compressed data to reduce chances of memory issue to match industry standard as close as possible. What do you think?

I can't replicate back the 1285 error anymore. It happens pretty randomly, I think. I'll try use Config.internalMipmapCreation if I get back that error. Thanks alot on the solution.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #16 on: January 17, 2014, 03:05:12 pm »
I don't see why an in-memory cache will save memory on the GPU...?

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #17 on: January 17, 2014, 03:19:44 pm »
Correct me if I'm wrong. The GPU driver reads etc1 data directly as texture, isn't it? Hence, gpu stores only etc1 compressed data in its memory instead of uncompressing etc1 first and read the texture.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #18 on: January 17, 2014, 10:07:48 pm »
Yes, it reduces memory usage on the GPU but keeping an extra copy in memory increases main memory usage. However, i had a look at your log output and my code and the loading itself is dead cheap (1-2ms). What takes much more time is the copying from the actual texture data into the buffer that is used to create the texture in case that it can't be found in the cache. This code also calculates the checksum, which is why i can't omit it...i'll try to come up with something better...
« Last Edit: January 17, 2014, 11:21:21 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #19 on: January 17, 2014, 11:08:40 pm »
Could you give this jar a try: http://jpct.de/download/beta/jpct_ae.jar? It doesn't include any kind of memory caching, but resume times should be better anyway. I would be interested in the log output of this one...

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #20 on: January 18, 2014, 03:20:06 am »
1-2ms? That's extremely fast, judging from file IO process. How many and how big are the textures in your case?

BTW, here's the log after using new jpct :
Code: [Select]
01-18 10:00:58.146: I/jPCT-AE(2265): Visibility lists disposed!
01-18 10:00:58.146: I/jPCT-AE(2265): [ 1390010458153 ] - WARNING: Unable to dispose gl related resources because the current context has changed!
01-18 10:00:58.146: I/jPCT-AE(2265): Renderer disposed!
01-18 10:00:58.146: I/jPCT-AE(2265): GL context is 1118286640
01-18 10:00:58.146: I/jPCT-AE(2265): Initializing GL20 render pipeline...
01-18 10:00:58.146: I/jPCT-AE(2265): Loading default shaders !
01-18 10:00:58.146: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:58.146: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:58.151: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.151: I/jPCT-AE(2265): Text file from InputStream loaded...2416 bytes
01-18 10:00:58.151: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:58.151: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.151: I/jPCT-AE(2265): Text file from InputStream loaded...4496 bytes
01-18 10:00:58.151: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:58.891: I/jPCT-AE(2265): Handles of 210003: 4/44/5
01-18 10:00:58.891: I/jPCT-AE(2265): Loading default shaders (Tex0Amb)!
01-18 10:00:58.891: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:58.891: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:58.891: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.891: I/jPCT-AE(2265): Text file from InputStream loaded...199 bytes
01-18 10:00:58.891: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:58.896: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.896: I/jPCT-AE(2265): Text file from InputStream loaded...757 bytes
01-18 10:00:58.896: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:58.921: I/jPCT-AE(2265): Handles of 420006: 1/5/2
01-18 10:00:58.926: I/jPCT-AE(2265): Loading default shaders (Tex0)!
01-18 10:00:58.926: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:58.926: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:58.926: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.926: I/jPCT-AE(2265): Text file from InputStream loaded...201 bytes
01-18 10:00:58.926: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:58.926: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.926: I/jPCT-AE(2265): Text file from InputStream loaded...4020 bytes
01-18 10:00:58.926: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:58.936: I/jPCT-AE(2265): Handles of 630009: 1/41/2
01-18 10:00:58.936: I/jPCT-AE(2265): Loading default shaders (Tex1)!
01-18 10:00:58.936: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:58.936: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:58.941: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.941: I/jPCT-AE(2265): Text file from InputStream loaded...997 bytes
01-18 10:00:58.941: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:58.941: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:58.941: I/jPCT-AE(2265): Text file from InputStream loaded...4390 bytes
01-18 10:00:58.941: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.251: I/jPCT-AE(2265): Handles of 840012: 2/44/3
01-18 10:00:59.251: I/jPCT-AE(2265): Loading default shaders (Tex0Light0)!
01-18 10:00:59.251: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:59.251: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:59.251: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.251: I/jPCT-AE(2265): Text file from InputStream loaded...201 bytes
01-18 10:00:59.251: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:59.251: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.251: I/jPCT-AE(2265): Text file from InputStream loaded...1293 bytes
01-18 10:00:59.251: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.256: I/jPCT-AE(2265): Handles of 1050015: 1/11/2
01-18 10:00:59.256: I/jPCT-AE(2265): Loading default shaders (Fog)!
01-18 10:00:59.256: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:59.256: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:59.256: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.256: I/jPCT-AE(2265): Text file from InputStream loaded...328 bytes
01-18 10:00:59.256: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:59.256: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.256: I/jPCT-AE(2265): Text file from InputStream loaded...4267 bytes
01-18 10:00:59.256: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.271: I/jPCT-AE(2265): Handles of 1260018: 1/44/2
01-18 10:00:59.271: I/jPCT-AE(2265): Loading default shaders (FogLight0)!
01-18 10:00:59.271: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:59.271: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:59.271: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.276: I/jPCT-AE(2265): Text file from InputStream loaded...328 bytes
01-18 10:00:59.276: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:59.276: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.276: I/jPCT-AE(2265): Text file from InputStream loaded...1608 bytes
01-18 10:00:59.276: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.276: I/jPCT-AE(2265): Handles of 1470021: 1/15/2
01-18 10:00:59.276: I/jPCT-AE(2265): Loading default shaders (Depth)!
01-18 10:00:59.276: I/jPCT-AE(2265): 0 shaders in replacement map!
01-18 10:00:59.276: I/jPCT-AE(2265): Default fragment shader is: /defaultFragmentShader.src
01-18 10:00:59.276: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.276: I/jPCT-AE(2265): Text file from InputStream loaded...745 bytes
01-18 10:00:59.276: I/jPCT-AE(2265): Default vertex shader is: /defaultVertexShader.src
01-18 10:00:59.276: I/jPCT-AE(2265): Loading file from InputStream
01-18 10:00:59.281: I/jPCT-AE(2265): Text file from InputStream loaded...248 bytes
01-18 10:00:59.281: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.286: I/jPCT-AE(2265): Handles of 1680024: 1/1/-1
01-18 10:00:59.286: I/jPCT-AE(2265): GL20 render pipeline initialized!
01-18 10:00:59.286: I/jPCT-AE(2265): OpenGL vendor:     Imagination Technologies
01-18 10:00:59.286: I/jPCT-AE(2265): OpenGL renderer:   PowerVR SGX 544MP
01-18 10:00:59.286: I/jPCT-AE(2265): OpenGL version:    OpenGL ES 2.0 build 1.10@2359475
01-18 10:00:59.286: I/jPCT-AE(2265): OpenGL renderer initialized (using 3/8 texture stages)
01-18 10:00:59.316: D/dalvikvm(2265): GC_FOR_ALLOC freed 2709K, 29% free 23135K/32544K, paused 23ms, total 23ms
01-18 10:00:59.331: I/jPCT-AE(2265): Compressing texture (512*512) to ETC1...
01-18 10:00:59.331: I/jPCT-AE(2265): Creating byte buffer of size 786432
01-18 10:00:59.421: D/dalvikvm(2265): GC_FOR_ALLOC freed 64K, 21% free 25891K/32544K, paused 14ms, total 15ms
01-18 10:00:59.421: I/jPCT-AE(2265): Loaded etc1_0_4123721231787.tex from cache!
01-18 10:00:59.421: I/jPCT-AE(2265): ...done in 92/17ms
01-18 10:00:59.426: I/jPCT-AE(2265): Compressing texture (256*256) to ETC1...
01-18 10:00:59.426: I/jPCT-AE(2265): Creating byte buffer of size 196608
01-18 10:00:59.446: I/jPCT-AE(2265): Loaded etc1_1_257835499821.tex from cache!
01-18 10:00:59.446: I/jPCT-AE(2265): ...done in 19/1ms
01-18 10:00:59.446: I/jPCT-AE(2265): Compressing texture (128*128) to ETC1...
01-18 10:00:59.446: I/jPCT-AE(2265): Creating byte buffer of size 49152
01-18 10:00:59.451: I/jPCT-AE(2265): Loaded etc1_2_16140396311.tex from cache!
01-18 10:00:59.451: I/jPCT-AE(2265): ...done in 5/0ms
01-18 10:00:59.451: I/jPCT-AE(2265): Compressing texture (64*64) to ETC1...
01-18 10:00:59.451: I/jPCT-AE(2265): Creating byte buffer of size 12288
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_3_1015172985.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 1/0ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (32*32) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 3072
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_4_65050486.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (16*16) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 768
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_5_4458828.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (8*8) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 192
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_6_384069.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (4*4) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 48
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_7_47774.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (2*2) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 12
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_8_17371.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.456: I/jPCT-AE(2265): Compressing texture (1*1) to ETC1...
01-18 10:00:59.456: I/jPCT-AE(2265): Creating byte buffer of size 3
01-18 10:00:59.456: I/jPCT-AE(2265): Loaded etc1_9_16473.tex from cache!
01-18 10:00:59.456: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.456: I/jPCT-AE(2265): Recompiling shader because of context change!
01-18 10:00:59.456: I/jPCT-AE(2265): Compiling shader program!
01-18 10:00:59.596: I/jPCT-AE(2265): Handles of 1890027: 4/44/5
01-18 10:00:59.596: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:00:59.596: I/jPCT-AE(2265): Creating buffers...
01-18 10:00:59.606: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:00:59.606: I/jPCT-AE(2265): Creating buffers...
01-18 10:00:59.626: D/dalvikvm(2265): GC_FOR_ALLOC freed 4274K, 30% free 23074K/32544K, paused 16ms, total 16ms
01-18 10:00:59.636: I/jPCT-AE(2265): Compressing texture (512*512) to ETC1...
01-18 10:00:59.636: I/jPCT-AE(2265): Creating byte buffer of size 786432
01-18 10:00:59.736: D/dalvikvm(2265): GC_FOR_ALLOC freed 2K, 21% free 25892K/32544K, paused 24ms, total 24ms
01-18 10:00:59.736: I/jPCT-AE(2265): Loaded etc1_0_4123694060866.tex from cache!
01-18 10:00:59.736: I/jPCT-AE(2265): ...done in 103/27ms
01-18 10:00:59.746: I/jPCT-AE(2265): Compressing texture (256*256) to ETC1...
01-18 10:00:59.746: I/jPCT-AE(2265): Creating byte buffer of size 196608
01-18 10:00:59.766: I/jPCT-AE(2265): Loaded etc1_1_257828553330.tex from cache!
01-18 10:00:59.766: I/jPCT-AE(2265): ...done in 22/1ms
01-18 10:00:59.771: I/jPCT-AE(2265): Compressing texture (128*128) to ETC1...
01-18 10:00:59.771: I/jPCT-AE(2265): Creating byte buffer of size 49152
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_2_16138571164.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 4/0ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (64*64) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 12288
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_3_1014702394.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 1/0ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (32*32) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 3072
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_4_64925807.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (16*16) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 768
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_5_4429662.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 1/0ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (8*8) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 192
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_6_375737.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (4*4) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 48
01-18 10:00:59.776: I/jPCT-AE(2265): Loaded etc1_7_45876.tex from cache!
01-18 10:00:59.776: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.776: I/jPCT-AE(2265): Compressing texture (2*2) to ETC1...
01-18 10:00:59.776: I/jPCT-AE(2265): Creating byte buffer of size 12
01-18 10:00:59.781: I/jPCT-AE(2265): Loaded etc1_8_16936.tex from cache!
01-18 10:00:59.781: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.781: I/jPCT-AE(2265): Compressing texture (1*1) to ETC1...
01-18 10:00:59.781: I/jPCT-AE(2265): Creating byte buffer of size 3
01-18 10:00:59.781: I/jPCT-AE(2265): Loaded etc1_9_16473.tex from cache!
01-18 10:00:59.781: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.781: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:00:59.781: I/jPCT-AE(2265): Creating buffers...
01-18 10:00:59.796: D/dalvikvm(2265): GC_FOR_ALLOC freed 4144K, 30% free 23074K/32544K, paused 13ms, total 13ms
01-18 10:00:59.801: I/jPCT-AE(2265): Compressing texture (512*512) to ETC1...
01-18 10:00:59.801: I/jPCT-AE(2265): Creating byte buffer of size 786432
01-18 10:00:59.886: D/dalvikvm(2265): GC_FOR_ALLOC freed 2K, 21% free 25892K/32544K, paused 16ms, total 16ms
01-18 10:00:59.886: I/jPCT-AE(2265): Loaded etc1_0_4123713749042.tex from cache!
01-18 10:00:59.886: I/jPCT-AE(2265): ...done in 84/19ms
01-18 10:00:59.891: I/jPCT-AE(2265): Compressing texture (256*256) to ETC1...
01-18 10:00:59.891: I/jPCT-AE(2265): Creating byte buffer of size 196608
01-18 10:00:59.911: I/jPCT-AE(2265): Loaded etc1_1_257833308256.tex from cache!
01-18 10:00:59.911: I/jPCT-AE(2265): ...done in 19/1ms
01-18 10:00:59.911: I/jPCT-AE(2265): Compressing texture (128*128) to ETC1...
01-18 10:00:59.911: I/jPCT-AE(2265): Creating byte buffer of size 49152
01-18 10:00:59.916: I/jPCT-AE(2265): Loaded etc1_2_16139342772.tex from cache!
01-18 10:00:59.916: I/jPCT-AE(2265): ...done in 6/1ms
01-18 10:00:59.921: I/jPCT-AE(2265): Compressing texture (64*64) to ETC1...
01-18 10:00:59.921: I/jPCT-AE(2265): Creating byte buffer of size 12288
01-18 10:00:59.921: I/jPCT-AE(2265): Loaded etc1_3_1014775409.tex from cache!
01-18 10:00:59.921: I/jPCT-AE(2265): ...done in 2/0ms
01-18 10:00:59.921: I/jPCT-AE(2265): Compressing texture (32*32) to ETC1...
01-18 10:00:59.921: I/jPCT-AE(2265): Creating byte buffer of size 3072
01-18 10:00:59.921: I/jPCT-AE(2265): Loaded etc1_4_64925054.tex from cache!
01-18 10:00:59.921: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.921: I/jPCT-AE(2265): Compressing texture (16*16) to ETC1...
01-18 10:00:59.921: I/jPCT-AE(2265): Creating byte buffer of size 768
01-18 10:00:59.921: I/jPCT-AE(2265): Loaded etc1_5_4421730.tex from cache!
01-18 10:00:59.921: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.921: I/jPCT-AE(2265): Compressing texture (8*8) to ETC1...
01-18 10:00:59.921: I/jPCT-AE(2265): Creating byte buffer of size 192
01-18 10:00:59.921: I/jPCT-AE(2265): Loaded etc1_6_372702.tex from cache!
01-18 10:00:59.921: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.926: I/jPCT-AE(2265): Compressing texture (4*4) to ETC1...
01-18 10:00:59.926: I/jPCT-AE(2265): Creating byte buffer of size 48
01-18 10:00:59.926: I/jPCT-AE(2265): Loaded etc1_7_44506.tex from cache!
01-18 10:00:59.926: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.926: I/jPCT-AE(2265): Compressing texture (2*2) to ETC1...
01-18 10:00:59.926: I/jPCT-AE(2265): Creating byte buffer of size 12
01-18 10:00:59.926: I/jPCT-AE(2265): Loaded etc1_8_16623.tex from cache!
01-18 10:00:59.926: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:00:59.926: I/jPCT-AE(2265): Compressing texture (1*1) to ETC1...
01-18 10:00:59.926: I/jPCT-AE(2265): Creating byte buffer of size 3
01-18 10:00:59.926: I/jPCT-AE(2265): Loaded etc1_9_16473.tex from cache!
01-18 10:00:59.926: I/jPCT-AE(2265): ...done in 0/0ms
01-18 10:00:59.926: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:00:59.926: I/jPCT-AE(2265): Creating buffers...
01-18 10:00:59.946: D/dalvikvm(2265): GC_FOR_ALLOC freed 4144K, 30% free 23074K/32544K, paused 16ms, total 16ms
01-18 10:00:59.956: I/jPCT-AE(2265): Compressing texture (512*512) to ETC1...
01-18 10:00:59.956: I/jPCT-AE(2265): Creating byte buffer of size 786432
01-18 10:01:00.061: D/dalvikvm(2265): GC_FOR_ALLOC freed 2K, 21% free 25892K/32544K, paused 18ms, total 18ms
01-18 10:01:00.061: I/jPCT-AE(2265): Loaded etc1_0_4123738728105.tex from cache!
01-18 10:01:00.061: I/jPCT-AE(2265): ...done in 109/21ms
01-18 10:01:00.071: I/jPCT-AE(2265): Compressing texture (256*256) to ETC1...
01-18 10:01:00.071: I/jPCT-AE(2265): Creating byte buffer of size 196608
01-18 10:01:00.091: I/jPCT-AE(2265): Loaded etc1_1_257840545329.tex from cache!
01-18 10:01:00.091: I/jPCT-AE(2265): ...done in 23/0ms
01-18 10:01:00.096: I/jPCT-AE(2265): Compressing texture (128*128) to ETC1...
01-18 10:01:00.096: I/jPCT-AE(2265): Creating byte buffer of size 49152
01-18 10:01:00.101: I/jPCT-AE(2265): Loaded etc1_2_16141751266.tex from cache!
01-18 10:01:00.101: I/jPCT-AE(2265): ...done in 6/0ms
01-18 10:01:00.101: I/jPCT-AE(2265): Compressing texture (64*64) to ETC1...
01-18 10:01:00.101: I/jPCT-AE(2265): Creating byte buffer of size 12288
01-18 10:01:00.106: I/jPCT-AE(2265): Loaded etc1_3_1015526905.tex from cache!
01-18 10:01:00.106: I/jPCT-AE(2265): ...done in 5/1ms
01-18 10:01:00.106: I/jPCT-AE(2265): Compressing texture (32*32) to ETC1...
01-18 10:01:00.106: I/jPCT-AE(2265): Creating byte buffer of size 3072
01-18 10:01:00.111: I/jPCT-AE(2265): Loaded etc1_4_65140124.tex from cache!
01-18 10:01:00.111: I/jPCT-AE(2265): ...done in 2/1ms
01-18 10:01:00.111: I/jPCT-AE(2265): Compressing texture (16*16) to ETC1...
01-18 10:01:00.111: I/jPCT-AE(2265): Creating byte buffer of size 768
01-18 10:01:00.111: I/jPCT-AE(2265): Loaded etc1_5_4483328.tex from cache!
01-18 10:01:00.111: I/jPCT-AE(2265): ...done in 1/0ms
01-18 10:01:00.111: I/jPCT-AE(2265): Compressing texture (8*8) to ETC1...
01-18 10:01:00.111: I/jPCT-AE(2265): Creating byte buffer of size 192
01-18 10:01:00.111: I/jPCT-AE(2265): Loaded etc1_6_389069.tex from cache!
01-18 10:01:00.111: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:01:00.111: I/jPCT-AE(2265): Compressing texture (4*4) to ETC1...
01-18 10:01:00.111: I/jPCT-AE(2265): Creating byte buffer of size 48
01-18 10:01:00.116: I/jPCT-AE(2265): Loaded etc1_7_49068.tex from cache!
01-18 10:01:00.116: I/jPCT-AE(2265): ...done in 2/1ms
01-18 10:01:00.116: I/jPCT-AE(2265): Compressing texture (2*2) to ETC1...
01-18 10:01:00.116: I/jPCT-AE(2265): Creating byte buffer of size 12
01-18 10:01:00.116: I/jPCT-AE(2265): Loaded etc1_8_17611.tex from cache!
01-18 10:01:00.116: I/jPCT-AE(2265): ...done in 1/0ms
01-18 10:01:00.116: I/jPCT-AE(2265): Compressing texture (1*1) to ETC1...
01-18 10:01:00.116: I/jPCT-AE(2265): Creating byte buffer of size 3
01-18 10:01:00.116: I/jPCT-AE(2265): Loaded etc1_9_16473.tex from cache!
01-18 10:01:00.116: I/jPCT-AE(2265): ...done in 1/1ms
01-18 10:01:00.116: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:01:00.116: I/jPCT-AE(2265): Creating buffers...
01-18 10:01:00.126: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:01:00.126: I/jPCT-AE(2265): Creating buffers...
01-18 10:01:00.136: I/jPCT-AE(2265): OpenGL context has changed(2)...recovering for renderer 3/2!
01-18 10:01:00.136: I/jPCT-AE(2265): Creating buffers...



Seems alot faster than previous, but the stutter still noticeable, just that it's shorter time. IMHO, if user chooses for sdcard caching, then we keep the raw texture data for checksum and backup. If user chooses for in-memory caching, then the raw texture data can be removed permanently. How about that? btw, is there any way to check the time taken for the gpu driver to process etc1?
« Last Edit: January 18, 2014, 04:49:08 am by kkl »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #21 on: January 18, 2014, 03:32:58 pm »
The time used to process the actual data is the second number in the "...done in (...)" outputs. The first one is the buffer processing. That number went down from 1.4 sec to 0.5 sec in total with the latest change. As you may have noticed, i somehow don't like the idea of this memory caching. I think that optimizing the current process is the better idea and i have one idea left that might help to get rid of this buffer processing in most cases. I'll report back when i tried that...

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #22 on: January 18, 2014, 04:17:10 pm »
Yea sure, would love to hear from you soon.

I do notice you are not fond of in-memory caching, but I hope I can convince you too. I read an article about etc1 compression, and it saves a whole lot bunch of memory http://software.intel.com/en-us/articles/android-texture-compression. It tempted me so much till I can't resist thinking of using it. If JPCT is open-sourced, I'd love to help on this part  ; )

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #23 on: January 18, 2014, 09:02:59 pm »
It's just that caching the etc1 data in memory seems like the wrong solution to me...i can't tell exactly why. Anyway, try this jar: http://jpct.de/download/beta/jpct_ae.jar

Offline kkl

  • float
  • ****
  • Posts: 291
    • View Profile
Re: Could i use pre-compressed ETC1 texture file in jPCT-AE?
« Reply #24 on: January 19, 2014, 03:31:41 pm »
Yes, it's alot faster now. I can barely see the stutter, even though there is still a very short stutter. Hopefully that short one is the driver trying to process the etc1. Thanks alot for your help on improving the caching. Anyway, I still look forward to in-memory caching in the future if you change your mind ; )