aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_cb_drawtex.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2016-02-16 10:22:32 -0700
committerBrian Paul <[email protected]>2016-02-16 10:22:32 -0700
commit79ffe94c8bf19747ff4204b9d3fd58dcf27d6de1 (patch)
tree8f07bef37abc5f467534588c8b092c981fa0307c /src/mesa/state_tracker/st_cb_drawtex.c
parent4277618235b229f46cf5570908d10ed810198d76 (diff)
st/mesa: fix whitespace and add comment in st_DrawTex()
Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_drawtex.c')
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index cdfd831ce3c..32a6608ec53 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/state_tracker/st_cb_drawtex.c
@@ -49,6 +49,7 @@ struct cached_shader
/**
* Simple linear list cache.
* Most of the time there'll only be one cached shader.
+ * XXX This should be per-st_context state.
*/
static struct cached_shader CachedShaders[MAX_SHADERS];
static GLuint NumCachedShaders = 0;
@@ -99,6 +100,7 @@ lookup_shader(struct pipe_context *pipe,
return CachedShaders[i].handle;
}
+
static void
st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height)
@@ -158,7 +160,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
if (!vbuffer) {
return;
}
-
+
z = CLAMP(z, 0.0f, 1.0f);
/* positions (in clip coords) */
@@ -272,7 +274,6 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_set_viewport(cso, &vp);
}
-
util_draw_vertex_buffer(pipe, cso, vbuffer,
cso_get_aux_vertex_buffer_slot(cso),
offset, /* offset */
@@ -280,7 +281,6 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
4, /* verts */
numAttribs); /* attribs/vert */
-
pipe_resource_reference(&vbuffer, NULL);
/* restore state */