I’m a Game Developer targeting the iOS Devices which have the Power-VR GPU built in.
I’ve already read the documents for developers such as “PowerVR Series 5.Architecture Guide for Developers”, “POWERVR SGX.OpenGL ES 2.0 Application Development Recommendations.1.1f.External”, “PowerVR.Performance Recommendations” and got the detailed information which are very very helpful about the PVR SGX hardware.
I want to take as much advantage of HSR as possible, so a little issues confusing me:
- The Deferred Rendering means the hardware keeps caching(or something like that) the drawing commands and data till some point and then execute them all. This
could let the ISP perform HSR before fragments processing because the ISP has complete visibility info inside a tile using PB. But I want to know what makes or when does the hardware stop caching and start to execute ?
I know some cases that will make the hardware start executing :
a. some opengl calls that would modify opengl objects
b. glFlush() glFinish()
c. the Parameter Buffer is full
- To render a scene, as my application calling “glDrawArray” or “glDrawElements” again and again using different Textures Binding, how does the hardware deal with the code below:
glDrawArray(…); // 1
glDrawArray(…); // 2
In the pseudo-code above, the 2 glDrawArray calls use different textures, I want to how the hardware deal with it.
Does the hardware start executing commands submitted by “glDrawArray 1” just after “glDrawArray 1” is called only because later another different texture is bound?
Or the hardware will cache as much as possible even if the primitives using different textures or buffer objects(vbo,vao) ? (Assuming Parameter Buffer won’t be overflow)
The reason that I’m confusing with it is that I think once the hardware stop caching and start to execute drawing command, the HSR processing merely available for the bunch of primitives submitted previously, and I just don’t know how I could maximize the bunch of primitives being executed together taking as much advantage of HSR as possible in as the “glDrawArray” or “glDrawElements” being called one by one.
- Giving a rendering situation:
– drawing two 2D quads:
A is textured with a image partially transparent(eg. a red opaque circle, with alpha=0 texels round)
B is overlapped by A.
– no using of “discard” or “alpha test”, PB won’t be overflow
– no matter the alpha blend is on or off
– enable depth test and depth buffer is prepared
As the principle of HSR described in the documents I mentioned ahead, although A’s texture is partially transparent, the hardware also take it as a opaque primitive processing HSR, so the fragments of B overlapped by A is discarded by HSR, am I right?
P.S : all situations talked above assuming not using “discard” or “alpha test”, and Parameter Buffer won’t be overflow.
Thank you very much for your attention. Hope for your reply.