Questions tagged [gpu]

Questions related to the massively parallel computing units targeting effective computer graphics in modern machines.

Filter by
Sorted by
Tagged with
36 votes
2 answers
12k views

What is the cost of changing state?

Programmers are supposed to have a fairly good idea of the cost of certain operations: for example the cost of an instruction on CPU, the cost of a L1, L2, or L3 cache miss, the cost of a LHS. When ...
Julien Guertault's user avatar
21 votes
4 answers
20k views

What does GPU assembly look like?

I have played around with CPU assembly programming like Nasm, Tasm or Masm, but I'm really curious to know how GPU works now. However, i'm quite confused when I look on internet. I've heard about Cuda ...
sebastien finor's user avatar
17 votes
3 answers
5k views

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

Games and other graphically intensive applications use frameworks like OpenGL and DirectX. Also they require features like pixel shader and DX12. But why would we need all these frameworks and GPU ...
Suici Doga's user avatar
16 votes
2 answers
7k views

How is anisotropic filtering typically implemented in modern GPUs?

Anisotropic filtering "retains the sharpness of a texture normally lost by MIP map texture's attempts to avoid aliasing". The Wikipedia article gives hints about how it can be implemented ("probe the ...
wip's user avatar
  • 1,829
15 votes
1 answer
895 views

Are lookup textures still used for anything?

I know in the not so long ago (5-10 years?) that it was popular / efficient to bake data out into textures and then read the data from the textures, often using the built in texture interpolation to ...
Alan Wolfe's user avatar
  • 7,721
14 votes
1 answer
928 views

Why is work-efficiency desired in GPU programming?

I've been reading the following article on how to do a parallel scan in CUDA: https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch39.html In the article, there is an emphasis on making the scan ...
Mokosha's user avatar
  • 1,144
14 votes
1 answer
3k views

Why do GPUs still have rasterizers?

Despite advancements modern GPUs still have fixed rasterizers. Highly customizable, with programmable shaders but nevertheless not fully programmable. Why is that? Why can't GPUs be simply massively ...
zduny's user avatar
  • 377
14 votes
2 answers
22k views

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

A fairly basic, in some ways, question, but one that many people, myself included, don't really know the answer to. GPU manufacturers often cite extremely high numbers, and the spread between polygon ...
Llamageddon's user avatar
13 votes
1 answer
5k views

How does Texture Cache work considering multiple shader units

Modern GPUs have many parallel shading units. I'd like to know how texture cache is managed in that scenario.
Felipe Lira's user avatar
  • 1,236
11 votes
1 answer
1k views

Why do adjacent triangles never overlap when rasterized?

Apologies for the following noob question, it's just I can't find a satisfactory answer anywhere... When I render a simple axis-aligned quad made up of two triangles, I don't understand why there's ...
Reuben Scratton's user avatar
10 votes
6 answers
7k views

Why can't we have hardware-specific graphics APIs?

Right now, if you want to use a GPU, you have to do it through graphics APIs like DirectX or Vulkan. These APIs are meant to be hardware-independent, but more often than not, they are tied to a ...
JasonPh's user avatar
  • 209
10 votes
1 answer
2k views

How does Texture Cache work in Tile Based Rendering GPU

How does cache work with tile based rendering? Are there any tips on how to improve cache hit ratio for it? (for instance, if tiles are processed horizontally and I have vertical segments of ...
Felipe Lira's user avatar
  • 1,236
10 votes
1 answer
594 views

Creating shared vertex normals on GPU

I've mostly succeeded at porting an implementation of Marching Cubes from CPU over to OpenGL compute shaders, but I haven't tackled normals yet and wondering the best way to go about it. My ...
russ's user avatar
  • 2,342
10 votes
1 answer
258 views

Why did AMD's putting an SSD on a GPU board reduce latency so much?

AMD have recently been in the news with an interesting Radeon Pro board with a couple of M2 SSDs on it. As some of the more detailed stories (here or here, for example) note, the benefits may ...
timday's user avatar
  • 201
9 votes
2 answers
2k views

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

When reading papers I commonly find Oct tree implementations of geometry representations to sort the data. However whenever I think about the problem hash tables seem better overall. Hash tables have ...
Makogan's user avatar
  • 1,656
9 votes
2 answers
2k views

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

I'm looking to use my GPU for non-graphical calculations (artificial life simulations) but ideally I would like to leave this running for weeks at a time, 24 hours a day. Is there anything I should ...
trichoplax is on Codidact now's user avatar
9 votes
1 answer
2k views

Are draw calls executed in parallel or sequentially or both?

This a follow up for a question I answered on GameDev SE. The question was simply Is glDrawArraysInstanced in OpenGL parallel when drawing those instances? My answer was in the lines of "the GPU ...
concept3d's user avatar
  • 243
9 votes
1 answer
906 views

How to get started writing a low-level GPU profiler?

I have been studying hardware corporation GPU profilers in recent days (Qualcomm, PowerVR, Intel). I've noticed that these tools seem to give more low-level details than the GPU profilers I have ...
user avatar
9 votes
2 answers
1k views

The most performant way to organize vertex data on modern GPUs

Say I have a model made up of vertices, each with position, normal, tangent, and ...
lcmylin's user avatar
  • 413
8 votes
1 answer
430 views

Do modern GPUs contain barrel shifters?

I'm aware that most modern GPUs, although designed for floating point, are more or less equivalent in integer performance these days, with a few caveats like the lack of a fused multiply add. I'm not ...
russ's user avatar
  • 2,342
8 votes
1 answer
229 views

Can I use several GPUs for a grid multi screen image?

Is it realistic to render a super-high resolution image over an array of 3 by 3 or 5 by 5 (for example) stacked screens? Could I do this by combining several different GPUs, or would the only way be ...
trichoplax is on Codidact now's user avatar
7 votes
1 answer
511 views

Does prerendering actually help performance?

In PC game development, after loading models, textures, shaders, etc in a loading screen, some games will render the models once to an off screen target to make sure the driver and gpu have done all ...
Alan Wolfe's user avatar
  • 7,721
7 votes
2 answers
695 views

What factors affect which shader language to learn?

I don't know any shader languages. I've heard of GLSL and HLSL, and I'm interested in learning one or both. Are there significant differences between them that would make one or other better in ...
trichoplax is on Codidact now's user avatar
7 votes
1 answer
278 views

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

It is pretty well known that writing depth in your fragment shader generally disables "early Z" test/write optimizations that modern GPUs rely on for fastness. Nonetheless, APIs still allow it and ...
GroverManheim's user avatar
7 votes
1 answer
3k views

Is vkCmdPushDescriptorSetKHR efficient?

I am new to Vulkan. Compared to DX12, the resource binding procedure seems a little bit complicated. In terms of per draw call uniform buffers, I currently have two approaches in mind, and they both ...
ACskyline's user avatar
  • 105
7 votes
2 answers
17k views

OpenCL doesn't detect GPU

I installed AMD APP SDK and here my problem. The OpenCL samples do not detect the GPU. HelloWorld give me this: ...
Thomas BRAUD's user avatar
6 votes
2 answers
763 views

Why did tessellation come to be a prominent feature?

Tessellation has been touted as one of the major features in newer graphics APIs like DirecX 11, and it is shown as a standalone stage in a modern graphics pipeline. Compared to the amount of ...
ApoorvaJ's user avatar
  • 577
6 votes
1 answer
3k views

What is the difference in overlay and framebuffer?

I have been trying to understand display and graphics. I feel that it's hard to make a logical image of the terms. I understand this: Frame buffer is a dedicated memory that has the image/video/...
mrigendra's user avatar
  • 163
6 votes
1 answer
166 views

The generations of Intel's integrated graphics

Which among Intel's integrated GPUs depart from their predecessors in a major way? Which are merely incremental improvements? BACKGROUND Intel integrates GPUs with many of the processors they sell. ...
thb's user avatar
  • 161
6 votes
1 answer
226 views

Same draw call causing extremely different GPU usage under different triangle orders

So I have a bit of a predicament I am trying to solve. I have 10,000 triangle strips I am trying to draw. Each one has a z-order for the entire strip and within each strip the most recent triangles ...
J.Doe's user avatar
  • 1,445
6 votes
1 answer
169 views

Does MRG32k3a compare well with PCG and Xorshift256*?

I've been using standard 32-bit Xorshift in my GPU path-tracer for a while, following Nathan Reed's approach with hashed seeds and decorrelated state. I (finally) discovered today that Xorshift is ...
Paul Ferris's user avatar
6 votes
2 answers
484 views

In a shader, how to store fragment coordinates in a spatial partitioning from one pass to the next?

I have a post-effect camera-shader in which I want to implement a simple spatial partitioning of the screen between two passes of the fragment shader. The first pass should divide the screen into ...
blipblop's user avatar
5 votes
1 answer
3k views

What are 'mesh clusters' / hierarchical cluster culling (with LOD?) / triangle cluster culling and how do they relate?

I've seen several references to this and related concepts now but I can't find any hard details about these systems, and how they are implemented. The earliest reference I can find is from the "...
cg_guy420's user avatar
  • 115
5 votes
1 answer
2k views

The mathematics of two dimensional interpolation on a quad

I am trying to wrap my head around how exactly the GPU interpolates texture coords on a quad. I realize to the GPU a quad is two triangles but I find thinking in terms of the whole quad to be easiest. ...
J.Doe's user avatar
  • 1,445
5 votes
1 answer
2k views

Binding vs bindless

I was trying to understand what exactly is 'binding'. I found an answer on quora on this. From this, binding basically sounds like sending data from to GPU with help from CPU. I got to know more about ...
Abhineet Pandey's user avatar
5 votes
1 answer
613 views

Double buffering always necessary?

Question from the graphics newbie: What I know by now is that "usually" double buffering is used: You calculate the content of frame x+1 while frame x is shown on the screen, if you want to achieve ...
mic's user avatar
  • 287
5 votes
2 answers
543 views

How did the hard, accurate shadows, work in early 3d (2000 - 2004) games?

I've been hunting around the internet for a while now, and I can't find anything about the specific shadow technique that I'm looking for. I can only recall one game in particular that used it, and I ...
Steffan Donal's user avatar
5 votes
1 answer
713 views

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

Why sending data from gpu to cpu is slower than cpu to gpu? I heard the relation is similar to network situation, in detail, the upload is slower than download. However, I could not understand the ...
shashack's user avatar
  • 523
5 votes
1 answer
497 views

Where is the best place for Tangent-bitangent calculation, in shader or in C/CPP code?

I have two methods of calculating tangent and cotengent (needed for normalMap lighting calculation). The one is doing it from CPP code (with assimp library for example) The second is doing it ...
Irrmich's user avatar
  • 153
5 votes
1 answer
442 views

Gpu derivatives. How it's done across 2x2 boundary?

This question bothers me since the first time I got to know about derivatives in pixel shader. Suppose we have a 2d texture: 5 10 20 30 6 11 50 100 If I ...
nikitablack's user avatar
5 votes
2 answers
2k views

Difference in pixels between different monitors' sizes

If I have an image of x/y resolution and display it on a monitor, does this mean that between a 15-inch monitor and a 42-inch, the same amount of pixels (x/y) will be displayed, only that each pixel ...
FLUSHER's user avatar
  • 151
5 votes
1 answer
2k views

Do GPU performance improve when rendering at native or half resolution, compared to fixed scaling?

This might be an odd question, but I was wondering if you could improve GPU performance with games, comparatively, when using doubles/halves of the native resolution, instead of an odd ratio of that. ...
Sander Schaeffer's user avatar
5 votes
1 answer
728 views

Modern Screen Space Ambient Occlusion Techniques

Down the road, I'm planning to implement one or another GPU based ambient occlusion technique. My goal will be to approximate a physically based offline renderer, so I was pretty happy when Wikipedia ...
user avatar
5 votes
2 answers
757 views

Blit and scroll

Could anyone please explain to me how drawing works with respect to scrolling? Suppose there is a window, which has an area where one can draw to (a "canvas"). Are there two copies of this canvas? ...
Ecir Hana's user avatar
  • 1,459
5 votes
0 answers
399 views

CUDA cuMemcpuHtoD vs cuMemcpy2D

Asking it here and not on SO as it seems to be appropriate question for CG. I am learning NVIDIA NVENC API.The SDK supplies a sampled called "NvEncoderCudaInterop" .There is a chunk of code which ...
Michael IV's user avatar
5 votes
0 answers
877 views

How Texture Prefetch works? [closed]

I know GPU prefetches textures and that's why dependent texture reads are slower, but how does it work and at what point that happens? EDIT: Split the content of this question into others as ...
Felipe Lira's user avatar
  • 1,236
4 votes
5 answers
1k views

Cloud based VR would be the future?

According to the following assumptions, I think Cloud based VR would be the future: 1) Real world scene rendering needs ray tracing or other complex computing graphics technologies. It needs a lot of ...
Hao Zhang's user avatar
  • 109
4 votes
2 answers
585 views

Can a scene graph be stored in the GPU?

I am starting to learn WebGL. Can a scene graph be stored in the GPU? Or is that type of thing more for the main thread (or webworker)? For example, I want to calculate some layout, and apply it as a ...
trusktr's user avatar
  • 255
4 votes
1 answer
424 views

How much does driver quality affect Vulkan and DX12 compared to OpenGL and DX11?

Considering the fact that Vulkan and DX12 delegate most of the memory management / work scheduling tasks to the application itself, how much do drivers affect performance? To put my question into ...
mbl's user avatar
  • 291
4 votes
1 answer
2k views

Compute shaders: one-time-only versus persistent buffers

When using a Compute Shader, is it possible to keep a buffer in the GPU memory during the whole run-time duration of the application, so whenever the original Compute Shader or other Compute Shaders ...
Brianna Szvenska's user avatar