Skip to content

Commit

Permalink
constify copy ctrs. Clarify grammar
Browse files Browse the repository at this point in the history
  • Loading branch information
pow2clk committed Nov 25, 2024
1 parent 93bbd1c commit c5057b9
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions specs/language/resources.tex
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
class Buffer {
public:
Buffer();
Buffer(Buffer &buf);
Buffer(const Buffer &buf);
Buffer operator=(Buffer buf);

void GetDimensions(out uint width) const;
Expand Down Expand Up @@ -145,7 +145,7 @@
class ByteAddressBuffer {
public:
ByteAddressBuffer();
ByteAddressBuffer(ByteAddressBuffer &buf);
ByteAddressBuffer(const ByteAddressBuffer &buf);
ByteAddressBuffer operator=(ByteAddressBuffer buf);

void GetDimensions(out uint size) const;
Expand All @@ -169,7 +169,7 @@
class RWByteAddressBuffer : public ByteAddressBuffer {
public:
RWByteAddressBuffer();
RWByteAddressBuffer(RWByteAddressBuffer &buf);
RWByteAddressBuffer(const RWByteAddressBuffer &buf);
RWByteAddressBuffer operator=(RWByteAddressBuffer buf);

// Element assignment.
Expand Down Expand Up @@ -485,7 +485,7 @@
class StructuredBuffer {
public:
StructuredBuffer();
StructuredBuffer(StructuredBuffer &buf);
StructuredBuffer(const StructuredBuffer &buf);
StructuredBuffer operator=(StructuredBuffer buf);

void GetDimensions(out uint count, out uint stride) const;
Expand All @@ -500,7 +500,7 @@
class RWStructuredBuffer : public StructuredBuffer {
public:
RWStructuredBuffer();
RWStructuredBuffer(RWStructuredBuffer &buf);
RWStructuredBuffer(const RWStructuredBuffer &buf);
RWStructuredBuffer operator=(RWStructuredBuffer buf);

// Element assignment.
Expand All @@ -515,7 +515,7 @@
class AppendStructuredBuffer {
public:
AppendStructuredBuffer();
AppendStructuredBuffer(AppendStructuredBuffer &buf);
AppendStructuredBuffer(const AppendStructuredBuffer &buf);
AppendStructuredBuffer operator=(AppendStructuredBuffer buf);

void GetDimensions(out uint count, out uint stride) const;
Expand All @@ -527,7 +527,7 @@
class ConsumeStructuredBuffer {
public:
ConsumeStructuredBuffer();
ConsumeStructuredBuffer(ConsumeStructuredBuffer &buf);
ConsumeStructuredBuffer(const ConsumeStructuredBuffer &buf);
ConsumeStructuredBuffer operator=(ConsumeStructuredBuffer buf);

void GetDimensions(out uint count, out uint stride) const;
Expand Down Expand Up @@ -713,22 +713,22 @@
RWBuffer<float> herbuf : register(u0, space1);
\end{HLSL}

A aggregate resource type can be:
An aggregate resource type can be:
\begin{itemize}
\item a struct containing one or more resources types
\item an array of resource types
\item an array or struct containing either of the above
\end{itemize}

When aggregate resource types have register annotations,
they occupy the first register they specify as well as however many additional sequential registers
Aggregate resource types with register annotations
occupy the first register they specify and however many additional sequential registers
the aggregate requires to assign a register to each of its elements that correspond to the given register type.
Multiple register annotations can be placed on aggregates involving structs where each corresponds to a distinct
register type that will apply to all the registers of that type in the aggregate.

\begin{note}
Resource types contained in structs are only allocated registers when they are explicitly used.
This includes elements of arrays of resources as such array elements must be indexed with literals.
This includes elements of arrays of resources since such array elements must be indexed with literals.
\end{note}

\begin{HLSL}
Expand Down

0 comments on commit c5057b9

Please sign in to comment.