summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-12-19 17:15:02 +0100
committerMarek Olšák <[email protected]>2016-01-02 15:15:44 +0100
commit020009f7ccdffa84c6e1649c4e915954f5fd7cc0 (patch)
tree41ef13eda4f8f44bc31ea900e18328b2ce9e2d23 /src/mesa/state_tracker
parentffc4716e9730ca162ce5dfcf0298125269c6d908 (diff)
u_upload_mgr: pass alignment to u_upload_alloc manually
The fixed alignment of u_upload_mgr will go away. This is the first step. The motivation is that one u_upload_mgr can have multiple users, each allocating from the same buffer, but requiring a different alignment. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_bitmap.c2
-rw-r--r--src/mesa/state_tracker/st_cb_clear.c2
-rw-r--r--src/mesa/state_tracker/st_cb_drawpixels.c2
-rw-r--r--src/mesa/state_tracker/st_cb_drawtex.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c
index a4a48a616fd..14e8354d480 100644
--- a/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/src/mesa/state_tracker/st_cb_bitmap.c
@@ -204,7 +204,7 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized,
tBot = (GLfloat) height;
}
- u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]),
+ u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), 4,
vbuf_offset, vbuf, (void **) &vertices);
if (!*vbuf) {
return;
diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c
index 18efd14a57c..e09f5ec6a0b 100644
--- a/src/mesa/state_tracker/st_cb_clear.c
+++ b/src/mesa/state_tracker/st_cb_clear.c
@@ -184,7 +184,7 @@ draw_quad(struct st_context *st,
vb.stride = 8 * sizeof(float);
- u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]),
+ u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), 4,
&vb.buffer_offset, &vb.buffer,
(void **) &vertices);
if (!vb.buffer) {
diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index a125d1f149e..86e8a55e25e 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -457,7 +457,7 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
struct pipe_resource *buf = NULL;
unsigned offset;
- u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset,
+ u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), 4, &offset,
&buf, (void **) &verts);
if (!buf) {
return;
diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c
index 2634b09d777..b3e4b5bb70c 100644
--- a/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/src/mesa/state_tracker/st_cb_drawtex.c
@@ -150,7 +150,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLuint attr;
u_upload_alloc(st->uploader, 0,
- numAttribs * 4 * 4 * sizeof(GLfloat),
+ numAttribs * 4 * 4 * sizeof(GLfloat), 4,
&offset, &vbuffer, (void **) &vbuf);
if (!vbuffer) {
return;