Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualuser88

Posted 07 December 2012 - 07:04 AM

hello,

code snippet from Compute Shader 5.0:
groupshared int3 sMin;
...
InterlockedMin(sMin.x, asint(viewPosition.x));
...
In code snippet above there is groupshared variable that holds minimum position value across the thread group. I noticed the case that the InterlockedMin works wrong when sMin.x == 0 and viewPosition == some_negaive_sign_value. After the operation sMin.x == 0.

Question: why negative value doesn't take as minimal value? In documentation mentioned that uint and int types are supported by InterlockedMin, so the sine should takes in account in case of int type.

I use nSight to profiler via network to debug shaders. The graphics adapter on target PC is GeForce GTX 460.

Any help would be appreciated..

#2user88

Posted 07 December 2012 - 07:04 AM

hello,

code snippet from Compute Shader 5.0:
groupshared int3 sMin;
...
InterlockedMin(sMin.x, asint(viewPosition.x));
...
In code snippet above there is groupshared variable that holds minimum position value across the thread group. I noticed the case that the InterlockedMin works wrong when sMin.x == 0 and viewPosition == some_negaive_sign_value. After the operation sMin.x == 0.

Question: why negative value doesn's take as minimal value? In documentation mentioned that uint and int types are supported by InterlockedMin, so the sine should takes in account in case of int type.

I use nSight to profiler via network to debug shaders. The graphics adapter on target PC is GeForce GTX 460.

Any help would be appreciated..

#1user88

Posted 07 December 2012 - 07:03 AM

hello,

code snippet from Compute Shader 5.0:
groupshared int3 sMin;
...
InterlockedMin(sMin.x, asint(viewPosition.x));
...
In code snippet above there is groupshared variable that hold minimum position value across the thread group. I noticed the case that the InterlockedMin works wrong when sMin.x == 0 and viewPosition == some_negaive_sign_value. After the operation sMin.x == 0.

Question: why negative value isn't takes as minimal value? In documentation mentioned that uint and int types are supported by InterlockedMin, so the sine should takes in account in case of int type.

I use nSight to profiler via network to debug shaders. The graphics adapter on target PC is GeForce GTX 460.

Any help would be appreciated..

PARTNERS