diff options
author | Marek Olšák <[email protected]> | 2015-12-19 17:15:02 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-01-02 15:15:44 +0100 |
commit | e0f932846c91e6eca6495c86b72e87af64dfefb5 (patch) | |
tree | 36778f580024fa572d58017f1e0a4df914405e23 /src/gallium/state_trackers | |
parent | 020009f7ccdffa84c6e1649c4e915954f5fd7cc0 (diff) |
u_upload_mgr: pass alignment to u_upload_data manually
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/nine/device9.c | 8 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/device9.h | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/nine_state.c | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index f14ffea13e1..4e2a03b0eee 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -397,10 +397,9 @@ NineDevice9_ctor( struct NineDevice9 *This, if (!This->driver_caps.user_ibufs) This->index_uploader = u_upload_create(This->pipe, 128 * 1024, 4, PIPE_BIND_INDEX_BUFFER); if (!This->driver_caps.user_cbufs) { - unsigned alignment = GET_PCAP(CONSTANT_BUFFER_OFFSET_ALIGNMENT); - + This->constbuf_alignment = GET_PCAP(CONSTANT_BUFFER_OFFSET_ALIGNMENT); This->constbuf_uploader = u_upload_create(This->pipe, This->vs_const_size, - alignment, PIPE_BIND_CONSTANT_BUFFER); + This->constbuf_alignment, PIPE_BIND_CONSTANT_BUFFER); } This->driver_caps.window_space_position_support = GET_PCAP(TGSI_VS_WINDOW_SPACE_POSITION); @@ -2955,6 +2954,7 @@ NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This, u_upload_data(This->vertex_uploader, 0, (info.max_index + 1) * VertexStreamZeroStride, /* XXX */ + 4, vtxbuf.user_buffer, &vtxbuf.buffer_offset, &vtxbuf.buffer); @@ -3027,6 +3027,7 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This, base, (info.max_index - info.min_index + 1) * VertexStreamZeroStride, /* XXX */ + 4, (const uint8_t *)vbuf.user_buffer + base, &vbuf.buffer_offset, &vbuf.buffer); @@ -3039,6 +3040,7 @@ NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This, u_upload_data(This->index_uploader, 0, info.count * ibuf.index_size, + 4, ibuf.user_buffer, &ibuf.offset, &ibuf.buffer); diff --git a/src/gallium/state_trackers/nine/device9.h b/src/gallium/state_trackers/nine/device9.h index 98d9c4df06a..cbc1e61f5db 100644 --- a/src/gallium/state_trackers/nine/device9.h +++ b/src/gallium/state_trackers/nine/device9.h @@ -128,6 +128,7 @@ struct NineDevice9 struct u_upload_mgr *vertex_uploader; struct u_upload_mgr *index_uploader; struct u_upload_mgr *constbuf_uploader; + unsigned constbuf_alignment; struct nine_range_pool range_pool; diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index fe8933be69a..fe26086ef3d 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -1866,6 +1866,7 @@ nine_ff_update(struct NineDevice9 *device) u_upload_data(device->constbuf_uploader, 0, cb.buffer_size, + device->constbuf_alignment, cb.user_buffer, &cb.buffer_offset, &cb.buffer); @@ -1888,6 +1889,7 @@ nine_ff_update(struct NineDevice9 *device) u_upload_data(device->constbuf_uploader, 0, cb.buffer_size, + device->constbuf_alignment, cb.user_buffer, &cb.buffer_offset, &cb.buffer); diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 558d07a2bd0..aee31622088 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -260,6 +260,7 @@ prepare_vs_constants_userbuf(struct NineDevice9 *device) u_upload_data(device->constbuf_uploader, 0, cb.buffer_size, + device->constbuf_alignment, cb.user_buffer, &cb.buffer_offset, &cb.buffer); @@ -336,6 +337,7 @@ prepare_ps_constants_userbuf(struct NineDevice9 *device) u_upload_data(device->constbuf_uploader, 0, cb.buffer_size, + device->constbuf_alignment, cb.user_buffer, &cb.buffer_offset, &cb.buffer); |