domainSize and domainOffset for brook compute shaders

Discussion created by emuller on Oct 30, 2009
Latest reply on Nov 2, 2009 by emuller

Consider the attached computer shader kernel

I had to enable address virtualization for it to work at all, even for an in<> stream.  Why?  It is 1D.  Do all compute shaders need -r option?

But now the puzzling part ... domainSize has effect on 1st dimension, domainOffset has no effect.

For 2d version of kernel, that is "out_s[global_id.y][global_id.x]=" and appropriate stream defs, domainSize on 2nd dim has no effect.  Only first dim.  Again no effect from domainOffset.

The brookplus svn shows no tests for domainOffset, domainSize, and only exec_domain example, not for computer shaders, and its only mentioned once in docs ... so is it an "experimental feature" ... or user error ?















Attribute[GroupSize (64)] kernel void wftest1(uint4 in_s[], out uint4 out_s[]) { uint2 global_id = (uint2)instance ().xy; uint local_id = (uint)instanceInGroup().x; //int4 tmp = {1,2,3,4}; uint tmp = dot(in_s[local_id],in_s[local_id]); out_s[global_id.x]= uint4(local_id,global_id.x,global_id.y,tmp); }