projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
st/mesa: Remove unneeded texture format terminators.
[mesa.git]
/
src
/
mesa
/
state_tracker
/
st_cb_drawtex.c
diff --git
a/src/mesa/state_tracker/st_cb_drawtex.c
b/src/mesa/state_tracker/st_cb_drawtex.c
index 3d99d6c8a11dc41d2de0bc594524105a60caddad..86ceb9d78b32abc294efb7203db3c95abfa8cab6 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_drawtex.c
+++ b/
src/mesa/state_tracker/st_cb_drawtex.c
@@
-14,10
+14,10
@@
#include "main/imports.h"
#include "main/image.h"
#include "main/imports.h"
#include "main/image.h"
-#include "main/bufferobj.h"
#include "main/macros.h"
#include "main/macros.h"
-#include "shader/program.h"
-#include "shader/prog_print.h"
+#include "main/mfeatures.h"
+#include "program/program.h"
+#include "program/prog_print.h"
#include "st_context.h"
#include "st_atom.h"
#include "st_context.h"
#include "st_atom.h"
@@
-101,7
+101,7
@@
lookup_shader(struct pipe_context *pipe,
}
static void
}
static void
-st_DrawTex(
GL
context *ctx, GLfloat x, GLfloat y, GLfloat z,
+st_DrawTex(
struct gl_
context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height)
{
struct st_context *st = ctx->st;
GLfloat width, GLfloat height)
{
struct st_context *st = ctx->st;
@@
-139,6
+139,7
@@
st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
/* create the vertex buffer */
vbuffer = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER,
/* create the vertex buffer */
vbuffer = pipe_buffer_create(pipe->screen, PIPE_BIND_VERTEX_BUFFER,
+ PIPE_USAGE_STREAM,
numAttribs * 4 * 4 * sizeof(GLfloat));
/* load vertex buffer */
numAttribs * 4 * 4 * sizeof(GLfloat));
/* load vertex buffer */
@@
-221,7
+222,7
@@
st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
}
}
}
}
- pipe_buffer_unmap(pipe, vbuffer
, vbuffer
_transfer);
+ pipe_buffer_unmap(pipe, vbuffer_transfer);
#undef SET_ATTRIB
}
#undef SET_ATTRIB
}
@@
-230,6
+231,7
@@
st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_save_viewport(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
cso_save_viewport(cso);
cso_save_vertex_shader(cso);
cso_save_vertex_elements(cso);
+ cso_save_vertex_buffers(cso);
{
void *vs = lookup_shader(pipe, numAttribs,
{
void *vs = lookup_shader(pipe, numAttribs,
@@
-264,7
+266,7
@@
st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
}
}
- util_draw_vertex_buffer(pipe, vbuffer,
+ util_draw_vertex_buffer(pipe,
cso,
vbuffer,
0, /* offset */
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
0, /* offset */
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
@@
-277,6
+279,7
@@
st_DrawTex(GLcontext *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_restore_viewport(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
cso_restore_viewport(cso);
cso_restore_vertex_shader(cso);
cso_restore_vertex_elements(cso);
+ cso_restore_vertex_buffers(cso);
}
}