graphics - Why the GPU works only in games -


i know don't have knowledge subject have questions can understand how graphics app work , please correct me cause i'm sure have mistakes.

why normal ui app works without lags when comes drawing animation , other stuff , doesn't use gpu @ all. games using opengl , directx uses gpu draw objects. wondering if because 3d objects should rendered rendered 2d image before being displayed , guess gpu job. why can't cpu job instead? makes gpu better rendering components in 3d game?

but why can't cpu job instead? makes gpu better rendering components in 3d game?

the cpu can render 3d graphics. , there 3d games before gpus or other 3d graphics chips existed, did. what's thought seminal 3d game, quake, written cpus rendering.

specialized hardware 3d rendering exists same reason there specialized hardware on cpu ieee-754 floating-point computations: can faster special hardware through emulated instructions. though there different reasons it.

rendering in 3d simple process. take triangle. break pixel-sized fragments. figure out color goes each fragment. , write them screen.

a cpu can this. can 1 triangle @ time. 16-core cpu can work on 16 triangles @ time. , then, each triangle core working on, core can work on 1 fragment triangle @ time.

but algorithm computing each fragment's color doesn't involve cross-talk. is, computations each fragment independent of each other. indeed, computations figure out triangle independent of computations needed figure out next triangle be. in theory work on dozens of triangles/fragments, @ once.

rendering therefore considered "embarrassingly parallel" algorithm.

cpus not meant embarrassingly parallel tasks. have parallelism built-in, cpus general-purpose computational devices. they're designed able handle variety of different workloads relatively well.

gpus contrast designed specifically these kinds of computational tasks. gpu has enough execution units working hundreds or thousands of fragments. @ once. gpu computational elements simpler of cpus, without deep instruction pipelining, caching, , forth offer. offer ability compute lots of independent things in parallel.

there other aspects of rendering lend highly specialized hardware maximum performance. texture fetching , specific memory architecture needed graphics work. blending fragment data current framebuffer image, process has done in order triangles sent. , forth.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -