Skip to main content
OverflowAI is here! AI power for your Stack Overflow for Teams knowledge community. Learn more
6 votes
Accepted

Why do I need memory barrier when doing atomic operations?

glMemoryBarrier is for when you want to make writes from one rendering command visible to reads from a subsequent rendering command. That is, you can do all the ...
Nicol Bolas's user avatar
  • 9,832
4 votes
Accepted

How does ID3D12Resource::Map work?

There are two general ways the graphics driver can implement Map(). One way is to set up a virtual memory mapping that makes the resource's actual memory (could be ...
Nathan Reed's user avatar
4 votes
Accepted

Do we really need a fence event?

In your first example, the call to WaitForSingleObject blocks the thread. This puts it into a waiting state, which takes it off the run queue and allows other ...
Dan Hulme's user avatar
  • 6,820
3 votes
Accepted

Can D3D12 resource barriers be used to synchronize between the compute and 3D engine?

My understanding would be that resource barriers are not at all about synchronization. They are about memory ordering, which is a related but separate concern. Basically, synchronization is about ...
Michael Kenzel's user avatar
2 votes
Accepted

Compute shader workgroups execution and size

Since you mentioned CUs and SIMDs, I wrote this mainly from the perspective of AMD's GCN architecture, but broadly speaking the answers apply to other GPU architectures as well (except for #2 which is ...
Nathan Reed's user avatar
2 votes

how to update my scene graph?

A few more options: don't use a scenegraph. They don't map well to the data a gpu needs for rendering. A flat array of object tends to work much better for the cache as well separate the scenegraph ...
ratchet freak's user avatar
2 votes
Accepted

Directly use Transform Feedback primitive count as instance count for drawing

The complexity of this makes it seem like you don't really want to use transform feedback; you want to use a compute shader. Then, through indirect rendering and SSBOs, you can write whatever vertex ...
Nicol Bolas's user avatar
  • 9,832
1 vote
Accepted

OpenGL compute shader workgroup synconization

You cannot synchronize work groups. You can only synchronize work items within a work group. All work groups execute entirely independently of each other. Your algorithm must be adjusted accordingly. ...
Nicol Bolas's user avatar
  • 9,832
1 vote

How does ID3D12Resource::Map work?

First you may want to take a look at the doc. Map basically allows you to retrieve a CPU pointer of a GPU resource. It performs a few operations on the background so the data is up to date. ...
Nacho's user avatar
  • 110

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