Clarify NumCoordinateAxes
Change-Id: Ie8a4e31c7f0440e3285827d0a592427a8be3ba0d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51804
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
diff --git a/src/ast/texture.h b/src/ast/texture.h
index c8c871f..4c2270e 100644
--- a/src/ast/texture.h
+++ b/src/ast/texture.h
@@ -47,11 +47,16 @@
/// @return true if the given TextureDimension is an array texture
bool IsTextureArray(TextureDimension dim);
-/// Returns the number of axes in the coordinate for a dimensionality.
+/// Returns the number of axes in the coordinate used for accessing
+/// the texture, where an access is one of: sampling, fetching, load,
+/// or store.
/// None -> 0
/// 1D -> 1
/// 2D, 2DArray -> 2
/// 3D, Cube, CubeArray -> 3
+/// Note: To sample a cube texture, the coordinate has 3 dimensions,
+/// but textureDimensions on a cube or cube array returns a 2-element
+/// size, representing the (x,y) size of each cube face, in texels.
/// @param dim the TextureDimension to query
/// @return number of dimensions in a coordinate for the dimensionality
int NumCoordinateAxes(TextureDimension dim);