Comments on: OpenGL 4.2 Atomic Counter Demo: Rendering Order of Fragments https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/ Graphics Cards and GPUs News, Graphics Programming, Home of FurMark Fri, 24 Nov 2017 16:13:18 +0000 hourly 1 https://wordpress.org/?v=6.7.1 By: Robert https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23682 Wed, 21 Mar 2012 19:18:55 +0000 http://www.geeks3d.com/?p=8137#comment-23682 mbentrup: your right. Sadly, there is no guarantee that the behaviour with the counters is the same as without them. But worth a shot.

]]>
By: mbentrup https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23655 Tue, 20 Mar 2012 20:42:03 +0000 http://www.geeks3d.com/?p=8137#comment-23655 The OpenGL 4.2 spec explicitly states in the chapter about Memory Access Ordering that the number of Vertex shader invocations for a single vertex is implementation-defined, so there’s no reason to turn the Vertex cache off.

]]>
By: Robert https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23628 Mon, 19 Mar 2012 20:52:15 +0000 http://www.geeks3d.com/?p=8137#comment-23628 mbentrup: You can’t do that. While you can visualize the run-order of the vertex shader and how it’s interlaced with the fragment shader (see my post about rasterization order and specificly this video: http://www.youtube.com/watch?v=5vEAO6icz7M ), vertex caching (post-transformation cache) must be switched off when you use atomic counters. The cache assumes that the vertex shader is deterministic which it was up till OpenGL 4.2 with the introduction of atomic counters – such a cache itself is not part of the OpenGL specs and caching a VS that is indeterministic would produce non spec-conform output. The shader compiler has to check for such side-effects and switch the cache off in such cases… (similar: the early z-test gets switched off as soon as the FS modifies the Z value)

]]>
By: mbentrup https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23503 Tue, 13 Mar 2012 11:20:29 +0000 http://www.geeks3d.com/?p=8137#comment-23503 Hmm, couldn’t you use this to measure vertex cacheing by incrementing a per-vertex counter in the VS ?

That way you should be able to see how often a vertex shader runs for each vertex.

]]>
By: Corwin https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23497 Mon, 12 Mar 2012 23:48:28 +0000 http://www.geeks3d.com/?p=8137#comment-23497 it seems my 560Ti has a problem with this demo, I got only around 30 fps and demo is stuttering badly, I use the latest WHQL drivers

]]>
By: jK https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23473 Sun, 11 Mar 2012 14:06:51 +0000 http://www.geeks3d.com/?p=8137#comment-23473 nice images 🙂
The chess pattern on the Radeon HD 6970 is interesting.
Neither assumed that they changed such fundamental things between the HD6xxx & HD7xxx series.

]]>
By: Groovounet https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23452 Sat, 10 Mar 2012 01:39:45 +0000 http://www.geeks3d.com/?p=8137#comment-23452 This would be very inefficient for the multiple caches a GPU contains. A more efficient and classic pattern is this one: http://en.wikipedia.org/wiki/Z-order_curve

We see that most of a processing order of the Radeons is done Z-order because atomic operation and fragment execution are synchronous.

However, on GeForce there are asynchronous so we can only see the high level patterns of the fragment executions but I am pretty convince that the underlying execution of the fragments follows a sort of Z-order approach.

]]>
By: Robert https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23448 Fri, 09 Mar 2012 22:07:21 +0000 http://www.geeks3d.com/?p=8137#comment-23448 What a timing…
I just finished my own ‘rasterization order visualization’ demo based on atomic counters:
http://renderingpipeline.com/2012/03/gpu-rasterizer-pattern/

But instead of coloring the fragments based on the counter value I first stored them in an integer render target so in a second pass I can watch the rasterization in ‘slow motion’ (videos are online of a quad and a killeroo).

This kind of demo is realy the ‘hello world’ of atomic counters (or even OpenGL 4.2?) 😉

]]>
By: Corwin https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23443 Fri, 09 Mar 2012 19:12:28 +0000 http://www.geeks3d.com/?p=8137#comment-23443 what a mess! I don’t get why there is something like that. I always thought that framebuffer fills pixel by pixel, line by line, like old good ZX Spectrum screen

]]>
By: Groovounet https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23439 Fri, 09 Mar 2012 17:26:49 +0000 http://www.geeks3d.com/?p=8137#comment-23439 @fellix

The froggy fragsniffer works on AMD hardware has well and there is no OpenGL drivers issue for that.

However: using the The froggy fragsniffer requires tuning even on NVIDIA and will either produce not visible result or reboot your PC.
It also require WinXP because WinVista+ forbide the OpenGL drivers to directly render to the framebuffer.

On Radeon there is no reboot but we can’t see the expected result from Fragsniffer because AMD drivers render to a texture even on WinXP and then blit to the framebuffer.

]]>
By: Groovounet https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23437 Fri, 09 Mar 2012 17:21:40 +0000 http://www.geeks3d.com/?p=8137#comment-23437 Ahah! That was my video 😀
Post something about it here:
http://www.g-truc.net/post-0434.html#menu

]]>
By: fellix https://www.geeks3d.com/20120309/opengl-4-2-atomic-counter-demo-rendering-order-of-fragments/#comment-23436 Fri, 09 Mar 2012 16:54:48 +0000 http://www.geeks3d.com/?p=8137#comment-23436 That reminds me of another similar program for visualizing pixel fragments:

http://www.icare3d.org/blog_techno/gpu/the_froggy_fragsniffer.html

It’s old and probably won’t run properly on AMD hardware, due to OGL driver issues.

]]>