aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_types.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-08-01 09:13:47 +0200
committermarha <marha@users.sourceforge.net>2011-08-01 09:13:47 +0200
commit6730a76afc49a80573b2e582085086c2956fe96d (patch)
tree1478eb4f497670caeb2af983eadc4aee20f48b68 /mesalib/src/glsl/glsl_types.h
parenta69cff9373daf6b7afc97fb975ceb4fc0d6864f7 (diff)
parentf87ad0cdc41af88f134475ab50b0d604004d9cdc (diff)
downloadvcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.tar.gz
vcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.tar.bz2
vcxsrv-6730a76afc49a80573b2e582085086c2956fe96d.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/ast_function.cpp mesalib/src/glsl/glsl_types.cpp mesalib/src/mesa/main/teximage.c mesalib/src/mesa/main/texparam.c xorg-server/config/udev.c xorg-server/configure.ac xorg-server/dix/main.c xorg-server/hw/dmx/dmxinit.c xorg-server/hw/kdrive/src/kdrive.c xorg-server/hw/xfree86/common/xf86Config.c xorg-server/hw/xfree86/common/xf86Configure.c xorg-server/hw/xfree86/common/xf86Helper.c xorg-server/hw/xfree86/common/xf86Init.c xorg-server/hw/xfree86/common/xf86Option.c xorg-server/hw/xfree86/common/xf86Priv.h xorg-server/hw/xfree86/common/xf86Xinput.c xorg-server/hw/xnest/Init.c xorg-server/hw/xquartz/darwin.c xorg-server/hw/xwin/InitOutput.c xorg-server/hw/xwin/winerror.c xorg-server/hw/xwin/xlaunch/config.cc xorg-server/hw/xwin/xlaunch/config.h xorg-server/hw/xwin/xlaunch/main.cc xorg-server/hw/xwin/xlaunch/resources/dialog.rc xorg-server/hw/xwin/xlaunch/resources/resources.h xorg-server/hw/xwin/xlaunch/resources/resources.rc xorg-server/hw/xwin/xlaunch/resources/strings.rc xorg-server/hw/xwin/xlaunch/window/util.cc xorg-server/hw/xwin/xlaunch/window/util.h xorg-server/hw/xwin/xlaunch/window/wizard.h xorg-server/include/os.h xorg-server/os/log.c xorg-server/xkeyboard-config/symbols/lv
Diffstat (limited to 'mesalib/src/glsl/glsl_types.h')
-rw-r--r--mesalib/src/glsl/glsl_types.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/mesalib/src/glsl/glsl_types.h b/mesalib/src/glsl/glsl_types.h
index 87f57e7c7..048696693 100644
--- a/mesalib/src/glsl/glsl_types.h
+++ b/mesalib/src/glsl/glsl_types.h
@@ -224,6 +224,41 @@ struct glsl_type {
*/
unsigned component_slots() const;
+ /**
+ * \brief Can this type be implicitly converted to another?
+ *
+ * \return True if the types are identical or if this type can be converted
+ * to \c desired according to Section 4.1.10 of the GLSL spec.
+ *
+ * \verbatim
+ * From page 25 (31 of the pdf) of the GLSL 1.50 spec, Section 4.1.10
+ * Implicit Conversions:
+ *
+ * In some situations, an expression and its type will be implicitly
+ * converted to a different type. The following table shows all allowed
+ * implicit conversions:
+ *
+ * Type of expression | Can be implicitly converted to
+ * --------------------------------------------------
+ * int float
+ * uint
+ *
+ * ivec2 vec2
+ * uvec2
+ *
+ * ivec3 vec3
+ * uvec3
+ *
+ * ivec4 vec4
+ * uvec4
+ *
+ * There are no implicit array or structure conversions. For example,
+ * an array of int cannot be implicitly converted to an array of float.
+ * There are no implicit conversions between signed and unsigned
+ * integers.
+ * \endverbatim
+ */
+ bool can_implicitly_convert_to(const glsl_type *desired) const;
/**
* Query whether or not a type is a scalar (non-vector and non-matrix).