From 8fb6402c98c2ef2a4d18b95deae6d0754ec8507f Mon Sep 17 00:00:00 2001 From: David Neto Date: Fri, 21 May 2021 20:25:53 +0000 Subject: [PATCH] Clarify NumCoordinateAxes Change-Id: Ie8a4e31c7f0440e3285827d0a592427a8be3ba0d Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51804 Kokoro: Kokoro Commit-Queue: David Neto Reviewed-by: Ben Clayton --- src/ast/texture.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ast/texture.h b/src/ast/texture.h index c8c871f4c4..4c2270e010 100644 --- a/src/ast/texture.h +++ b/src/ast/texture.h @@ -47,11 +47,16 @@ std::ostream& operator<<(std::ostream& out, TextureDimension dim); /// @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);