New atomic write mode

This commit is contained in:
Steven Robertson
2011-12-10 12:18:00 -05:00
parent a0fd3f965f
commit 6c50e6dadc
3 changed files with 130 additions and 26 deletions

View File

@ -270,8 +270,8 @@ void interp_palette_hsv_flat(mwc_st *rctxs,
uint32_t r = min(255, (uint32_t) (rgba.x * 255.0f + 0.49f * mwc_next_11(rctx)));
uint32_t g = min(255, (uint32_t) (rgba.y * 255.0f + 0.49f * mwc_next_11(rctx)));
uint32_t b = min(255, (uint32_t) (rgba.z * 255.0f + 0.49f * mwc_next_11(rctx)));
out.x = (1 << 22) | (r << 4);
out.y = (g << 18) | b;
out.y = (1 << 22) | (r << 4);
out.x = (g << 18) | b;
surf2Dwrite(out, flatpal, 8 * threadIdx.x, blockIdx.x);
rctxs[gid] = rctx;
}