aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_atom_texture.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-01-13 16:54:57 +0100
committermarha <marha@users.sourceforge.net>2012-01-13 16:54:57 +0100
commit5cfbe97cd797d8f78ece208bb5114704b83d8aab (patch)
tree5c88c73ee39367742bb5547ef6fb5a3d25d656e0 /mesalib/src/mesa/state_tracker/st_atom_texture.c
parent39324211d7a79ef8115fd1e39771a2e400b31993 (diff)
downloadvcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.gz
vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.tar.bz2
vcxsrv-5cfbe97cd797d8f78ece208bb5114704b83d8aab.zip
libxtrans libXdmcp libxcb mesa xserver git update 13 jan 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_atom_texture.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index 008e9bd10..88e6128c8 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -1,8 +1,8 @@
/**************************************************************************
- *
+ *
* Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
* 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
@@ -10,11 +10,11 @@
* distribute, sub license, 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 (including the
* next paragraph) 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 NON-INFRINGEMENT.
@@ -22,7 +22,7 @@
* 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.
- *
+ *
**************************************************************************/
/*
@@ -30,7 +30,7 @@
* Keith Whitwell <keith@tungstengraphics.com>
* Brian Paul
*/
-
+
#include "main/macros.h"
#include "main/mtypes.h"
@@ -182,8 +182,10 @@ st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj,
return stObj->sampler_view;
}
+
static GLboolean
-update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view,
+update_single_texture(struct st_context *st,
+ struct pipe_sampler_view **sampler_view,
GLuint texUnit)
{
struct pipe_context *pipe = st->pipe;
@@ -233,7 +235,6 @@ update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_
st_view_format = firstImageFormat;
}
-
/* if sampler view has changed dereference it */
if (stObj->sampler_view) {
if (check_sampler_swizzle(stObj->sampler_view,
@@ -251,7 +252,8 @@ update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_
return GL_TRUE;
}
-static void
+
+static void
update_vertex_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
@@ -275,7 +277,8 @@ update_vertex_textures(struct st_context *st)
st->state.num_vertex_textures = su + 1;
}
- pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view);
+ pipe_sampler_view_reference(&st->state.sampler_vertex_views[su],
+ sampler_view);
}
if (ctx->Const.MaxVertexTextureImageUnits > 0) {
@@ -287,7 +290,8 @@ update_vertex_textures(struct st_context *st)
}
}
-static void
+
+static void
update_fragment_textures(struct st_context *st)
{
const struct gl_context *ctx = st->ctx;
@@ -319,6 +323,7 @@ update_fragment_textures(struct st_context *st)
st->state.sampler_views);
}
+
const struct st_tracked_state st_update_texture = {
"st_update_texture", /* name */
{ /* dirty */
@@ -328,8 +333,9 @@ const struct st_tracked_state st_update_texture = {
update_fragment_textures /* update */
};
+
const struct st_tracked_state st_update_vertex_texture = {
- "st_update_vertex_texture", /* name */
+ "st_update_vertex_texture", /* name */
{ /* dirty */
_NEW_TEXTURE, /* mesa */
ST_NEW_VERTEX_PROGRAM, /* st */
@@ -337,7 +343,9 @@ const struct st_tracked_state st_update_vertex_texture = {
update_vertex_textures /* update */
};
-static void
+
+
+static void
finalize_textures(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
@@ -371,7 +379,6 @@ finalize_textures(struct st_context *st)
}
-
const struct st_tracked_state st_finalize_textures = {
"st_finalize_textures", /* name */
{ /* dirty */