From 7f669a708bd35bdf8e842f762ec68f9ad0ec0486 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 18 Sep 2013 08:03:04 +0200 Subject: libX11 mesa pixman xserver git update 18 Sep 2013 xserver commit 8010d3a48bd0b224dcb0883e39c2351ad364d846 libX11 commit 5dcb40f28d59587597d2ff6e6ac64c71cfe6ff7b pixman commit 58a79dfe6d1fd62c2b66c69fdb64f6b8ecf61da5 mesa commit a3b51a22f71819236baa6bbda9d0d050914b149d --- mesalib/src/glsl/glsl_types.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mesalib/src/glsl/glsl_types.h') diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h index 647867a23..9f61eee78 100644 --- a/mesalib/src/glsl/glsl_types.h +++ b/mesalib/src/glsl/glsl_types.h @@ -498,6 +498,18 @@ struct glsl_type { return is_array() ? length : -1; } + /** + * Return the number of coordinate components needed for this sampler type. + * + * This is based purely on the sampler's dimensionality. For example, this + * returns 1 for sampler1D, and 3 for sampler2DArray. + * + * Note that this is often different than actual coordinate type used in + * a texturing built-in function, since those pack additional values (such + * as the shadow comparitor or projector) into the coordinate type. + */ + int sampler_coordinate_components() const; + private: /** * ralloc context for all glsl_type allocations -- cgit v1.2.3