aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-11-14 09:38:56 +0100
committermarha <marha@users.sourceforge.net>2011-11-14 09:38:56 +0100
commit156e37d3879b316329e3e05579414031da2647e2 (patch)
tree59fb1dce046fd3aab228e224bff8b0c1d074f876 /mesalib/src/mesa/state_tracker
parentd783adea42f29bd7917929597ca1031b70587e1d (diff)
downloadvcxsrv-156e37d3879b316329e3e05579414031da2647e2.tar.gz
vcxsrv-156e37d3879b316329e3e05579414031da2647e2.tar.bz2
vcxsrv-156e37d3879b316329e3e05579414031da2647e2.zip
libX11 libXext libXinerama libXmu libfontenc libxcb mesa pixman git update
14 nov 2011
Diffstat (limited to 'mesalib/src/mesa/state_tracker')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c15
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawtex.c2
2 files changed, 10 insertions, 7 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index 1a8854b9b..fa37be0b6 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -376,6 +376,10 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
PIPE_USAGE_STREAM,
max_slots *
sizeof(st->bitmap.vertices));
+ if (!st->bitmap.vbuf) {
+ /* out of memory */
+ return 0;
+ }
}
/* Positions are in clip coords since we need to do clipping in case
@@ -547,11 +551,12 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
sv->texture->target != PIPE_TEXTURE_RECT,
x, y, width, height, z, color);
- util_draw_vertex_buffer(pipe, st->cso_context, st->bitmap.vbuf, offset,
- PIPE_PRIM_TRIANGLE_FAN,
- 4, /* verts */
- 3); /* attribs/vert */
-
+ if (st->bitmap.vbuf) {
+ util_draw_vertex_buffer(pipe, st->cso_context, st->bitmap.vbuf, offset,
+ PIPE_PRIM_TRIANGLE_FAN,
+ 4, /* verts */
+ 3); /* attribs/vert */
+ }
/* restore state */
cso_restore_rasterizer(cso);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
index eff195068..332b0d1b6 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
@@ -114,7 +114,6 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
uint semantic_names[2 + MAX_TEXTURE_UNITS];
uint semantic_indexes[2 + MAX_TEXTURE_UNITS];
struct pipe_vertex_element velements[2 + MAX_TEXTURE_UNITS];
- GLbitfield inputs = VERT_BIT_POS;
st_validate_state(st);
@@ -128,7 +127,6 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
numTexCoords = 0;
for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_2D_BIT) {
- inputs |= VERT_BIT_TEX(i);
numTexCoords++;
}
}