<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Invalid imageAtomicExchange() writes."
href="https://bugs.freedesktop.org/show_bug.cgi?id=106390#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_REOPENED "
title="REOPENED - Invalid imageAtomicExchange() writes."
href="https://bugs.freedesktop.org/show_bug.cgi?id=106390">bug 106390</a>
from <span class="vcard"><a class="email" href="mailto:frustumo@gmail.com" title="Alexander <frustumo@gmail.com>"> <span class="fn">Alexander</span></a>
</span></b>
<pre>(In reply to Jason Ekstrand from <a href="show_bug.cgi?id=106390#c3">comment #3</a>)
<span class="quote">> (In reply to Alexander from <a href="show_bug.cgi?id=106390#c2">comment #2</a>)
> > So is the atomicImage* behavior different to imageStore? It's not absolutely
> > clear from GL_ARB_shader_image_load_store specification: "For example, it is
> > legal to access an image whose internal format is RGBA8 with an image unit
> > format of R32UI."
> >
> > Nvidia and AMD doesn't have a difference between:
> >
> > layout(r32ui) uniform uimage2D surface;
> > imageAtomicExchange(surface, ..., packUnorm4x8(color))
> >
> > layout(rgba8) uniform writeonly image2D surface;
> > imageStore(surface, ..., color)
>
> Ok, yeah, that should work fine and I'm a bit confused as to why it's not.
> Sorry for the overly quick response. :/ Are you sure the image unit is set
> up with the right format?
>
> Unfortunately, from the pictures, it's hard to tell what's wrong. Do you
> expect them to be exactly the same? I suppose the one with atomics has a
> bit of a blue tint.
>
> What happens if you bind as R32_UINT and then use imageStore(surface, ...,
> packUnorm4x8(color))?</span >
It's impossible to substitute imageAtomicExchange() with imageStore().
imageStore(uimage2D, ivec2, uvec4) is the only suitable signature
for r32ui format. The result of such operation is weird.
I have some update on this issue. I tried to store a gradient based on
shader invocation: vec4(ivec4(gl_GlobalInvocationID.xy, 0, 0) % 256) / 255.0f
And there is no difference between imageAtomicExchange() and imageStore().
It looks like imageAtomicExchange() somehow changes another texture sampling
behavior.
Please check new attachment.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>