Author Topic: glMipmap  (Read 3552 times)

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
glMipmap
« on: March 08, 2008, 02:34:01 pm »
hello,

i've found that setting Config.glMipmap = true has a huge performance boost on my computer. it increases fps up to 3-4 times :o i find this really interesting and wonder if this is the case on all machines.

the performance boost is especially higher when there are many many polygons one after another in a line. for example, run the fps sample, turn back, stand next to elevator and look at the corner to the right, now you are looking diagonally to all level. on my machine fps is ~25 with mipmapping disabled and ~60 enabled  ::) i doubt this maybe because of my stupid video card uses painter's algorithm ?

r a f t

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: glMipmap
« Reply #1 on: March 08, 2008, 04:05:51 pm »
No, it's because your stupid video card having only a small caches... ;D Because each mipmap stage is only a quarter of the size of the next higher, it uses less video memory (albeit video mem shouldn't be a problem on simpler scenes) and it makes the texture fit better into the chip's caches. So when the chip is accessing that texture, it can get all the texels right from the caches instead of getting them from the much slower video memory (or onboard memory if it's an onboard chip with shared memory). Therefor, it's usually faster, but on a decent, current video card, the benefits are not that high. What card is that? Intel onboard stuff?

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: glMipmap
« Reply #2 on: March 08, 2008, 09:22:31 pm »
yes, intel on board stuff :/ it is stil interesting. there are only a few textures in that fps sample.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: glMipmap
« Reply #3 on: March 08, 2008, 10:04:30 pm »
I've noticed that on those Intel onboard chips myself. The system's memory is much slower compared to dedicated video memory which is why they suffer from cache misses even more.

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: glMipmap
« Reply #4 on: March 09, 2008, 12:36:55 pm »
i see. what about looking through corner thing ? SW renderer performs almost the same everywhere. i'm just curious about what GL renderer does. where its duty ends and delegates to video card. does it use octree information ? docs says it doesnt use optiZ or other similar settings.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: glMipmap
« Reply #5 on: March 09, 2008, 05:43:00 pm »
Yes, it does use octrees. Basically, the pipeline is very similar until you start to render the actual polygons. OptiZ as well as the span based hsr-stuff are software only. Most graphic chips are doing something similar in hardware nowadays anyway.

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: glMipmap
« Reply #6 on: March 09, 2008, 05:47:34 pm »
so, how do you explain in GL mode looking through corner gets so slower. it uses same octree with software renderer, but software renderer doesnt gets so slow there  ::)

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11777
    • View Profile
    • http://www.jpct.net
Re: glMipmap
« Reply #7 on: March 09, 2008, 06:14:51 pm »
Maybe that's caused by the software renderer's hidden surface removal, which helps it in this situation a little bit. You can test it by disabling it and see if it affects performance in this situation. Apart from that, it's hard to tell. On this machine here, it slows down too, but it's still at 500fps compared to 56 when using the software renderer.

Offline raft

  • quad
  • ******
  • Posts: 1974
    • View Profile
    • http://www.aptalkarga.com
Re: glMipmap
« Reply #8 on: March 09, 2008, 07:18:43 pm »
nope, it doesnt effect that much. nevermind. thanks for the explanations :)