top of page

Research Paper : Optimization.

Optimization is the process of making an application work on a certain hardware without considerable adverse effects to the smooth and sustainable function. When a performance occurs it could be mostly be any of the following issues which I am going to detail in the coming section of this document.


Draw Calls

When it comes to rendering, there is no other topic as important to draw calls. Our current graphics pipeline is designed in such a way that, CPU prepares Textures, Shaders, States, Material properties and all the data buffers for so that it could be send to the GPU which renders the screen every frame based on the enabled frame rate or the hardware capabilities offered by the platform. In an ideal scenario the CPU prepares all the data required for rendering always before GPU preforms rendering onto the screen. but in reality in most cases its far from it. What mostly happened is that due to several factor that leverages and therefor costs CPUs time. The CPU end up becoming unable to prepare the data buffer for the GPU to render before render cycle of the GPU. loosing a frame time as GPU idles and renders the provided information in the next frame, dropping the performance potential substantially and this phenomenon is known as CPU Bottlenecking. There are a few ways to reduce this and its already out there and several graphic APIs offer support for the new hardware architecture that's designed to reduce this issue. One of them is to make a separate thread or multiple threads handle the data preparation in the CPU. this can make the preparation much faster as an independent core could provide unwavering attention without being affected by other concurrent and potentially intensive process as they are managed by other processor cores. The other less technical solution to this is to make the scene simpler that the CPU could prepare the data and buffer with a short amount of time and pass it to the GPU before the rendering of the scene. The few ways this is done is by reducing the number of materials used as CUP batches objects if it shares the same material and texture thus reducing the iteration count which it takes to accounts for all the individual property and attributes specific to the object. The CPUs preparation time can also be reduced if we reduce the complexity of operation at a given time. Say the CPU(thread as of now) has to process physics, audio, user input and other procedural operations demanded by other systems in a scene, the CPU will take a much longer time to prepare the data, and the solution is to reduce the intensity, quantity or complexity of the operation so that it wont take cost a lot of the CPU time.


Fill Rate

In simple terms the fill rate can be described as amount of pixels a GPU can render to the screen per second. So basically its a measure of the hardware capability of a GPU. to make it more understandable describing it such that a GPU with a higher fill rate can render can render at a higher framerate compared to a GPU with a slower fill rate. Speaking of fill rates there are two types of fill rates Pixel Fill-rate and Texel Fill-rate. Pixel fill-rate corresponds to number pixels the GPU can render onto the screen per second. Its calculated by multiplying the number of ROUs(Raster Output Units) with the clock frequency of the GPU. While Texel Fill rate can be define as the number of texture samples that can be done per second, the theoretical number is calculated by multiplying the number of TMUs(Texture Mapping Units) with the clock speed of the GPU. Fill rate is a factor that comes into play towards the end of the graphics rendering pipeline were the vertices are placed with respect to the screen space, then triangles gets drawn and finally the triangles are rasterized and the color of the pixel is decided by sampling the a certain pixel within texture by calculating interpolated UV position with the barycentric coordinate of the triangle. As mentioned earlier the sampling of texture plays a very imported role in modern day graphics and rendering, As in rendering many data and complex details are both represented, transported and sampled using Textures, like Diffuse, Normal maps, Height map, Specular map, Depth Map, just to name a few. therefore GPUs are constructed with specific hardware that specializes in processing and reading/sampling texture data from the GPUs memory. Fill rates can be put as being highly dependent on the hardware capability of the GPU thou not always. Lets say that a GPU takes a certain amount of time to simply output a value of one to each pixel. and now imaging we wrote a shader that calculates the collision and reflection for every arbitrary objects send to the GPU as a buffer. the Arithmetical complexity per pixel will affect the fill rate of the GPU there for the frame rate. To avoid this issue make the shader as simple as possibility by reducing the mathematical complexity it have to handle per pixel.



Reference

techopedia.(n.d).Fill Rate. techopedia. https://www.techopedia.com/definition/85/fill-rate#:~:text=Fill%20rate%20refers%20to%20the,of%20raster%20operations%20(ROPs).


Esteban. (n.d). Why are my batches (draw calls) so high? What does that mean?. Unity Support. https://support.unity.com/hc/en-us/articles/207061413-Why-are-my-batches-draw-calls-so-high-What-does-that-mean-#:~:text=A%20draw%20call%20is%20a,each%20object%20inside%20the%20batch.


Jukic, E. (2015, June, 26). Draw calls in a nutshell. medium. https://medium.com/@toncijukic/draw-calls-in-a-nutshell-597330a85381


Lunda(n.d). What are Draw Calls?. Linda. https://www.lynda.com/Unity-tutorials/What-draw-calls/599611/616812-4.html


Michaud, S.(2015, August, 10). WHAT EXACTLY IS A DRAW CALL (AND WHAT CAN IT DO)?. pcprespective. https://pcper.com/2015/08/what-exactly-is-a-draw-call-and-what-can-it-do/


Abdulla, J. (n.d). Optimization. https://sites.google.com/student.saedubai.com/jumaabdulla-5000699/gpg230/optimization?authuser=1

6 views0 comments

Recent Posts

See All

Week 13 : El Fin...

Class 39 : We join in the class on Sunday. There's is nothing much to teach from our tutors side. all of us guys are doing our curricular requirements and getting weight off of our shoulders. we are a

Week 12 : Ending it rightly...

Class 36 : It was a Sunday. a busy morning. I showed up for the class, the tutor asked us let him know if we need any support with the projects and learning outcomes. some of us asked suggestions and

bottom of page