diff options
author | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-27 15:56:59 +0000 |
commit | 100633b3e7619842f345cb7603b0db6b5761dd11 (patch) | |
tree | 3c3af754c7e801c07263269837d6a05072ff834c /mesalib/src/mesa/main/samplerobj.h | |
parent | 205a4bdae76f287126db9f45a4f0ba631e3efca1 (diff) | |
parent | 96d6df5da9cddedf4931bf8e17f96e242467c661 (diff) | |
download | vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.gz vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.tar.bz2 vcxsrv-100633b3e7619842f345cb7603b0db6b5761dd11.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/samplerobj.h')
-rw-r--r-- | mesalib/src/mesa/main/samplerobj.h | 116 |
1 files changed, 62 insertions, 54 deletions
diff --git a/mesalib/src/mesa/main/samplerobj.h b/mesalib/src/mesa/main/samplerobj.h index ed495c376..4245594d6 100644 --- a/mesalib/src/mesa/main/samplerobj.h +++ b/mesalib/src/mesa/main/samplerobj.h @@ -1,54 +1,62 @@ -/* - * Mesa 3-D graphics library - * - * Copyright (C) 2011 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -#ifndef SAMPLEROBJ_H -#define SAMPLEROBJ_H - -struct dd_function_table; - - -extern void -_mesa_reference_sampler_object(struct gl_context *ctx, - struct gl_sampler_object **ptr, - struct gl_sampler_object *samp); - -extern void -_mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name); - -extern struct gl_sampler_object * -_mesa_new_sampler_object(struct gl_context *ctx, GLuint name); - -extern void -_mesa_delete_sampler_object(struct gl_context *ctx, - struct gl_sampler_object *sampObj); - -extern void -_mesa_init_sampler_object_functions(struct dd_function_table *driver); - -extern void -_mesa_init_sampler_object_dispatch(struct _glapi_table *disp); - - -#endif /* SAMPLEROBJ_H */ +/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 2011 VMware, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+
+#ifndef SAMPLEROBJ_H
+#define SAMPLEROBJ_H
+
+struct dd_function_table;
+
+static INLINE struct gl_sampler_object *
+_mesa_get_samplerobj(struct gl_context *ctx, GLuint unit)
+{
+ if (ctx->Texture.Unit[unit].Sampler)
+ return ctx->Texture.Unit[unit].Sampler;
+ else
+ return &ctx->Texture.Unit[unit]._Current->Sampler;
+}
+
+extern void
+_mesa_reference_sampler_object(struct gl_context *ctx,
+ struct gl_sampler_object **ptr,
+ struct gl_sampler_object *samp);
+
+extern void
+_mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name);
+
+extern struct gl_sampler_object *
+_mesa_new_sampler_object(struct gl_context *ctx, GLuint name);
+
+extern void
+_mesa_delete_sampler_object(struct gl_context *ctx,
+ struct gl_sampler_object *sampObj);
+
+extern void
+_mesa_init_sampler_object_functions(struct dd_function_table *driver);
+
+extern void
+_mesa_init_sampler_object_dispatch(struct _glapi_table *disp);
+
+
+#endif /* SAMPLEROBJ_H */
|