Using framegraphs for efficient usage of low level graphics APIs
No Thumbnail Available
URL
Journal Title
Journal ISSN
Volume Title
Perustieteiden korkeakoulu |
Master's thesis
Authors
Date
2019-08-19
Department
Major/Subject
Computer Science
Mcode
SCI3042
Degree programme
Master’s Programme in Computer, Communication and Information Sciences
Language
en
Pages
73 + 3
Series
Abstract
Graphics processing unit (GPU) is separate execution unit that is controlled by the CPU and that is used for accelerating the rendering of graphics at interactive rates. To get most out of the GPUs, graphically demanding applications, like modern computer games, can use GPUs directly through special application programming interfaces (APIs). The APIs have been traditionally quite high level, so they are easy for the programmers to use. However, in the recent years multiple new low level graphics APIs - Vulkan, Direct3D 12 and Metal - have been created, because the high level of abstraction in the older APIs has led to performance issues, both on GPU and CPU side. When used correctly, rendering can be done more efficiently with the new low level APIs, but because of the low level of abstraction, they are harder and more error prone to use for the application programmers. In this thesis we implement a method called framegraphs, that will make the new low level APIs easier to use while still maintaining the performance benefits. Framegraph will make it easier to write error free and more modular code. In this thesis we first go through the relevant history of modern GPUs and how the GPUs operate and how they are controlled through the APIs. Then we go through the differences in the high and low level graphics APIs and explain how the differences affect rendering engine architecture. We go through our framegraph implementation and analyze it from the usability perspective. Finally, we go through multiple improvement ideas, on how to make the framegraph implementation more efficient performance wise and what we could add to the implementation in the future, to make it better.Grafiikkasuorittimella voidaan suorittaa tehokkaasti laskutoimituksia kuvien renderöintiin liittyen ja sitä ohjataan keskussuorittimella. Graafisesti vaativat ohjelmistot, kuten modernit tietokonepelit, käyttävät grafiikkasuoritinta suoraan erityisten grafiikkarajapintojen kautta. Grafiikkarajapinnat ovat perinteisesti mahdollistaneet ohjelmoijille grafiikkasuorittimen käytön suhteellisen korkealla tasolla. Kuitenkin viime vuosina on ohjelmoijien käyttöön tullut monia uusia matalamman abstraktiotason grafiikka rajapintoja, joita ovat Vulkan, Direct3D 12 ja Metal. Nämä uudet matalamman tason rajapinnat luotiin, koska korkea abstraktiotaso grafiikkaarajapinnoissa johti tehokkuusongelmiin sekä grafiikka- että keskussuorittimella. Uusia matalan tason rajapintoja käyttämällä voidaan siis luoda tehokkaampia ohjelmia, mutta matalan abstraktiotason vuoksi näiden rajapintojen käyttö on ohjelmoijille vaikeampaa. Tässä diplomityössä käytämme renderöintiverkkoja uusien matalan tason grafiikkarajapintojen käytön helpottamiseksi. Renderöintiverkkojen tarkoitus on helpottaa ohjelmoijia tuottamaan ohjelmakoodia, jossa on vähemmän virheitä ja joka on modulaarisempaa, menettämättä tehohyötyjä jotka matalan tason grafiikkarajapinnat tuovat mukanaan. Käymme työssä aluksi läpi grafiikkasuorittimien historiaa ja toimintaa, jonka jälkeen tutustutaan matalan ja korkean tason grafiikkarajapintojen eroihin ja siihen, miten nämä erot vaikuttavat grafiikkaohjelmistojen sisäisiin rakenteisiin. Sitten käymme läpi meidän renderöintiverkko toteutuksen ja arvioimme sitä käytettävyysnäkökulmasta. Lopuksi käymme läpi monia parannusideoita, miten meidän toteutuksesta voisi tehdä tehokkaamman ja mitä toimintoja siihen voisi lisätä käytettävyyden parantamiseksi.Description
Supervisor
Lehtinen, JaakkoThesis advisor
Hirvonen, AnttiKeywords
computer graphics, rendering engine, graphics APIs, vulkan, direct3D