Skip to content

[0035] vector InterlockedAccumulate parameter ordering is inconsistent #869

@tex3d

Description

@tex3d

Which proposal does this relate to?

template <typename InputElTy, SIZE_TYPE M>
typename hlsl::enable_if<hlsl::is_arithmetic<InputElTy>::value, void>::type
InterlockedAccumulate(vector<InputElTy, M> Vec, RWByteAddressBuffer Res,
uint StartOffset);

Describe the issue or outstanding question.
Parameter ordering for Interlocked operations typically starts with a parameter for the location into which you are accumulating. This new operation reverses the parameter ordering, starting with the vector to accumulate, followed by the target buffer.

I think it would make more sense to reverse the order of these parameters.

The earlier we do this, the less pain, since this operation is brand new and we haven't released a preview that includes it yet.

For the DXIL op (dx.op.vectorAccumulateToDescriptor), I think it would be more consistent with existing atomic operations to place the resource and offset before the vector.

While we're at it, I also think the DXIL op naming should be made more consistent with other atomic operations in DXIL as well, such as: AtomicVectorAccumulate. Though this could be considered an independent issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions