[Mesa-dev] ssbo support missing imin/umin dinstinction

Iago Toral itoral at igalia.com
Mon Sep 28 00:50:32 PDT 2015


On Fri, 2015-09-25 at 21:15 -0400, Ilia Mirkin wrote:
> Hi Samuel,
> 
> It seems like there's only a single atomic_min intrinsic for ssbo
> (same for max), but the ssbo spec actually calls for both signed and
> unsigned semantics:
> 
>         uint atomicMin(inout uint mem, uint data);
>         int atomicMin(inout int mem, int data);
> 
> Should there be separate intrinsics for these (and their Max friends)
> or is there some other way to tell whether the min/max should be done
> signed/unsigned?
> 
> Cheers,

Good point. This is a problem in NIR that we overlooked when we ported
the code from GLSL IR. In GLSL IR you have the type information
available but that is lost once you go into NIR, the current code in the
i965 backend checks the register type, but that is going to be the
default we use for NIR values, not the real type from GLSL IR... I think
we will need two intrinsics in this case. I'll send a patch.

uThanks for bring this up!

Iago




More information about the mesa-dev mailing list