Kenneth Graunke <[email protected]> writes: > Untyped Atomic Operation messages are illegal for non-RAW formats. > I have no idea why it worked before; the documentation claims it > shouldn't be allowed and the simulator enforces it. > > Some arithmetic sleight of hand happens in this patch: > > Previously, we allocated a R32G32B32A32 buffer. However, atomic > operations only access the first DWord (the 'R' channel). Thus, we > multiplied all of our offsets (measured in DWords) by 4 to skip over > the other three channels. > > Now, we allocate a single component (effectively R32) buffer, > eliminating the wasted space. Using the RAW format means that our > offsets must be measured in bytes (and must be DWord-aligned). This > means that the multiplication by 4 is still necessary. However, instead > of skipping over the BGA components, it converts DWords to bytes. > > We ought to change the size of the buffer, but I'm pretty sure it was > just wrong before: brw->shader_time.bo->size is measured in bytes, so > we were allocating it too large in the past.
Hmm. Actually, since we're dealing with atomic ops here, we might be able to reduce our overhead by separating each dword by a cacheline (reducing traffic between, say, the VS and FS). Or possibly do even better by using the TID and EUID out of sr0 to have unique locations per shader per instantiated thread and skip atomic operations entirely. Packing things tighter doesn't seem like a good idea to me.
pgp0jfRzovMFI.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
