Hot answers tagged

35 votes
Accepted

What is the cost of changing state?

The most data I've seen is on the relative expense of various state changes is from Cass Everitt and John McDonald's talk on reducing OpenGL API overhead from January 2014. Their talk included this ...
user avatar
  • 23.7k
30 votes

What is the cost of changing state?

The actual cost of any particular state change varies with so many factors that a general answer is nigh impossible. First, every state change can potentially have both a CPU-side cost and a GPU-side ...
user avatar
27 votes
Accepted

What does GPU assembly look like?

You're tilting at windmills trying to learn "GPU assembly", and it's due to the differences between how CPUs and GPUs are made and sold. Each CPU has what's called an instruction set architecture, ...
user avatar
  • 6,490
23 votes
Accepted

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Speed is the most common reason why this is not done. In fact you can do what you propose, if you make your own operating system, its just going to be very slow for architectural reasons. So the ...
user avatar
  • 8,169
21 votes
Accepted

Why is work-efficiency desired in GPU programming?

First of all, re: "GPUs are simply giant SIMD processors and should operate in lock-step", it's a bit more complicated than that. The entire GPU does not run in lockstep. Shader threads are organized ...
user avatar
  • 23.7k
19 votes
Accepted

How does Texture Cache work in Tile Based Rendering GPU

Whether it's a tile based GPU or not doesn't really affect the texture cache architecture. The memory layout of texture will look like some flavor of Morton order or Hilbert curve in all GPUs. As a ...
user avatar
17 votes
Accepted

How does Texture Cache work considering multiple shader units

At the top level, a GPU is subdivided into a number of shader cores. A small GPU in a notebook or tablet may have only a few cores while a high-end desktop GPU may have dozens. In addition to the ...
user avatar
  • 23.7k
17 votes
Accepted

Are lookup textures still used for anything?

Yes, lookup textures are still used. For example, pre-integrated BRDFs (for ambient lighting, say), or arbitrarily complicated curves baked down to a 1D texture, or a 3D lookup texture for color ...
user avatar
15 votes

How is anisotropic filtering typically implemented in modern GPUs?

The texture filtering hardware takes several samples of the various mipmap levels (the maximum amount of samples is indicated by the anisotropic filtering level, though the exact amount of samples ...
user avatar
  • 1,100
15 votes

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

work on any 32-bit color GPU (even old ones)? Bit of history here: this is how games were done on PC up until graphical accelerators started to become available in the mid-90s. It did indeed work on ...
user avatar
  • 251
15 votes
Accepted

Why do GPUs still have rasterizers?

In short, performance reasons are why they aren't programmable. History and Market In the past, there used to be separate cores for vertex and fragment processors to avoid bloated FPU designs. There ...
user avatar
  • 1,323
14 votes

Why do we have graphics frameworks like OpenGL and DirectX, when games could just draw pixels directly?

Just to add to joojaa's answer, things are still being drawn pixel by pixel. You're just generating the pixels using a vertex shader/assembler/rasterizer, then texturing and lighting them using a ...
user avatar
  • 2,302
11 votes
Accepted

Does prerendering actually help performance?

As far as I know, this sort of thing is mainly about shader compilation. One of the main reasons why a game may experience hitches the first time something renders is that the shaders necessary to ...
user avatar
  • 23.7k
11 votes

Why did tessellation come to be a prominent feature?

The main purpose of tesselation is to increase the resolution of the mesh, while only transferring a small amount of triangle data around. In addition, tessellation allows you to dynamically change ...
user avatar
  • 3,552
10 votes
Accepted

Why do adjacent triangles never overlap when rasterized?

This is the same problem as discussed in What are sample gaps during scan conversion? Briefly, rasterisation - at least with the majority of hardware systems - tests at a single 'infinitesimal' point ...
user avatar
  • 3,986
10 votes
Accepted

What modern real-time rendering applications still use fragment shader depth writes / late-Z?

Any techniques that involve raytracing in the fragment shader might want to write Z in order that the depth buffer contain an accurate representation of the raytraced surface. For example: Distance-...
user avatar
  • 23.7k
9 votes
Accepted

Are draw calls executed in parallel or sequentially or both?

The result should be as if it was executed sequentially one triangle at a time. This is important so that each frame is deterministic. If it wasn't then drawing the same frame multiple times could ...
user avatar
9 votes

How is anisotropic filtering typically implemented in modern GPUs?

The API requirements can be found in any of the specs or extensions. Here is one: https://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt All GPU vendors likely deviate from the spec ...
user avatar
  • 1,994
9 votes

Cloud based VR would be the future?

As other people have mentioned, due to network latency issues, I think that full rendering on a cloud server and streaming video to a client device is unlikely to be workable. Even if the latency can ...
user avatar
  • 23.7k
9 votes
Accepted

What is the difference in overlay and framebuffer?

As you've understood, the framebuffer is an array in memory that holds all the pixels to display on the screen. On a desktop PC, it's probably special memory on the graphics card, but in a SoC with ...
user avatar
  • 6,490
9 votes

Why are oct trees so much more common than hash tables?

Lots of things here. "When reading papers". What papers? If the topic of the paper is about something other than the spatial partitioning structure, it could be fair to use whatever knowing that the ...
user avatar
8 votes

The mathematics of two dimensional interpolation on a quad

(It actually is easier to think (and compute) about this with triangles, but for the sake of the answer, let's first stick to your quad example.) For this you just have to define the point you're ...
user avatar
8 votes
Accepted

Is vkCmdPushDescriptorSetKHR efficient?

What you're ultimately trying to do is, between draw calls, change some state that allows one to select which set of read-only data to use in the rendering process. There are many techniques for this. ...
user avatar
  • 8,141
7 votes

What factors affect which shader language to learn?

The shader language is bound to the APIs/engines that support it (glsl to openGL & WebGL and hlsl to D3D). There are tools to translate from one to the other but they aren't perfect. This means ...
user avatar
7 votes
Accepted

Is long term continuous use of GPGPU safe for my GPU?

Running a GPU at full capacity will reduce its lifespan through electromigration; the speed at which the chips are damaged depends on how hot it is. A desktop computer has enough room that the ...
user avatar
  • 1,462
7 votes

How many polygons in a scene can modern hardware reach while maintaining realtime, and how to get there?

I think it is commonly accepted that real time is everything that is above interactive. And interactive is defined as "responds to input but is not smooth in the fact that the animation seems jaggy". ...
user avatar
  • 613
7 votes

Can a scene graph be stored in the GPU?

Short answer: Yes, It can be done. But no one does so. Long answer: Scene graphs can be stored and processed on a GPU using OpenCL/WebCL. But it is not practical to do so. Updating scene graphs (a ...
user avatar
7 votes
Accepted

What mechanisms are being used by Directx12 and Vulkan APIs in order to communicate with graphic card drivers internally?

It's very different between the Khronos standards (including Vulkan) and DirectX. In DirectX, Microsoft implements the API, but they publish to GPU vendors a HAL API. There's actually two HALs: one ...
user avatar
  • 6,490
7 votes
Accepted

Why sending data from gpu to cpu is slower than cpu to gpu?

The actual sending of data is the same. The PCIe bus is the same speed in both directions. However when programming there is a big difference namely that when you send you can immediately start doing ...
user avatar
7 votes
Accepted

Double buffering always necessary?

Indeed there are/were 'just in time' renderers. For example, Dreamcast (PowerVR CLX2) had a mode where the 'frame buffer' only had to be a few rows of tiles in size. The system would be rendering ...
user avatar
  • 3,986

Only top scored, non community-wiki answers of a minimum length are eligible