Skip to main content
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,932
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
  • 25.2k
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,870
3 votes
Accepted

How do the vulkan fences behave on the GPU?

The GPU does not block on a fence, it can only update the status of the fence, and even then it will not block, it just updates it and keeps going. The CPU does block on a fence though. The calls to ...
pmw1234's user avatar
  • 3,354
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
  • 25.2k
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,932
1 vote
Accepted

Vulkan synchronization stageBuffer

Vulkan timeline semaphores replace binary semaphores very nicely when a semaphore is needed. However in this situation memory barriers are probably the synchronization mechanism of choice. The flow of ...
pmw1234's user avatar
  • 3,354
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,932
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