Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource chapter documenting buffers and bindings #344

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions specs/language/expressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,10 @@

\p A \textit{postfix-expression} followed by an expression in square brackets
(\texttt{[ ]}) is a subscript expression. In an array subscript expression of
the form \texttt{E1[E2]}, \texttt{E1} must either be a variable of array of
\texttt{T[]}, or an object of type \texttt{T} where \texttt{T} provides an
the form \texttt{E1[E2]}, \texttt{E1} must either be a variable of array,
vector, matrix, typed buffer (\ref{Resources.tybuf}), or structured buffer
(\ref{Resources.stbufs}), with elements of type \texttt{T[]} or an
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resource types have overloads for operator[] even in DXC. The original language did miss vector and matrix types, but the addition of resources is redundant.

object of type \texttt{T} where \texttt{T} provides an
overloaded implementation of \texttt{operator[]} (\ref{Overload}).\footnote{HLSL
does not support the base address of a subscript operator being the expression
inside the braces, which is valid in C and C++.}
Expand Down
1 change: 1 addition & 0 deletions specs/language/hlsl.tex
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
\input{statements}
\input{declarations}
\input{overloading}
\input{resources}

\input{placeholders} % Declare placeholder references

Expand Down
Loading
Loading