Questions tagged [gpu]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
28
votes
2answers
9k 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 ...
16
votes
3answers
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 ...
14
votes
2answers
5k 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 ...
14
votes
1answer
729 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 ...
14
votes
1answer
2k 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 ...
13
votes
1answer
697 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 ...
13
votes
1answer
17k views

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

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 ...
11
votes
4answers
8k 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 ...
11
votes
1answer
4k 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.
11
votes
1answer
894 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 ...
10
votes
1answer
236 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 ...
9
votes
1answer
1k 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 ...
9
votes
2answers
1k 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 ...
9
votes
1answer
476 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 ...
9
votes
2answers
615 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 ...
8
votes
2answers
1k 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 ...
8
votes
1answer
1k 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 ...
8
votes
1answer
871 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 ...
8
votes
1answer
366 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 ...
7
votes
1answer
193 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 ...
7
votes
1answer
192 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 ...
7
votes
1answer
148 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. ...
6
votes
1answer
328 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 ...
6
votes
2answers
503 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 ...
6
votes
1answer
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/...
6
votes
1answer
879 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 ...
6
votes
2answers
15k 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: ...
6
votes
1answer
177 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 ...
5
votes
2answers
509 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 ...
5
votes
1answer
1k 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. ...
5
votes
2answers
338 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 ...
5
votes
1answer
521 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 ...
5
votes
1answer
1k 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. ...
5
votes
2answers
312 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 ...
4
votes
2answers
419 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 ...
4
votes
1answer
229 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 ...
4
votes
2answers
2k views

How does a GPU process a task by using multiple ALUs?

I know the philosophy of how a GPU works {many weak men doing a task (GPU) compared to one strong man doing the same task (CPU)}. How does the GPU manage all the ALUs and schedule the necessary ...
4
votes
1answer
358 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 ...
4
votes
1answer
303 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 ...
4
votes
1answer
276 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 ...
4
votes
2answers
530 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 ...
4
votes
1answer
976 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 ...
4
votes
1answer
662 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 ...
4
votes
2answers
595 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? ...
4
votes
1answer
354 views

Using multiply and accumulate of 4x4 matrices for ray-triangle intersection tests on GPU

Is it possible to gain performance boost using new 4x4 MAD from NVIDIA'a tensor cores for ray-triangle intersection tests? Really there are two questions: Is it possible to modify some of the ray-...
4
votes
1answer
263 views

How to estimate what GPU (2D/3D/none at all?) is necessary?

I have to do some operations on 2D grayscale images. The "normal" stuff like moving, alpha blending and resizing, but also "3D like" operations: Perspective projection, rotation around any axis (x, y, ...
4
votes
1answer
714 views

What is the difference and/or relationship between the OpenGL SDK and the OpenGL GPU driver?

I'm brand new to OpenGL and graphics programming in general, and I'm trying to figure out what software I need to program a GPU. I saw an NVidia OpenGL driver, and I've also seen reference to the ...
4
votes
1answer
563 views

Clipping for perspective projection

In the following two graphs, the red lines are borders of the perspective-projection frustum, the blue lines are to be rasterized, the green lines are perspective-projection lines, which are wrong. ...
4
votes
0answers
62 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 ...
4
votes
0answers
275 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 ...