aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-07-22 08:25:25 +0200
committermarha <marha@users.sourceforge.net>2011-07-22 08:25:25 +0200
commitc70e21be1fe5f9b47bce020ffd8d69c6012b21fc (patch)
tree2ae24d451df0e12093fd82c2cd466e05dfe1aaa0 /mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
parent556198b74eecf7e9f7105a792a33bf699cff6507 (diff)
parent91e91b72f07f4e61db17ee86c6933a7217f0e25c (diff)
downloadvcxsrv-c70e21be1fe5f9b47bce020ffd8d69c6012b21fc.tar.gz
vcxsrv-c70e21be1fe5f9b47bce020ffd8d69c6012b21fc.tar.bz2
vcxsrv-c70e21be1fe5f9b47bce020ffd8d69c6012b21fc.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c mesalib/src/glsl/ast_function.cpp mesalib/src/glsl/ast_to_hir.cpp mesalib/src/glsl/glsl_types.cpp mesalib/src/glsl/ir.cpp mesalib/src/glsl/ir.h mesalib/src/glsl/linker.cpp mesalib/src/glsl/s_expression.cpp mesalib/src/mesa/drivers/common/driverfuncs.c mesalib/src/mesa/main/dd.h mesalib/src/mesa/main/fbobject.c mesalib/src/mesa/main/teximage.c mesalib/src/mesa/state_tracker/st_cb_texture.c
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c b/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
index a2709f855..1b9375209 100644
--- a/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/mesalib/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -79,6 +79,8 @@ struct u_vbuf_mgr_priv {
void *saved_ve, *fallback_ve;
boolean ve_binding_lock;
+ unsigned saved_buffer_offset[PIPE_MAX_ATTRIBS];
+
boolean any_user_vbs;
boolean incompatible_vb_layout;
};
@@ -488,6 +490,7 @@ void u_vbuf_mgr_set_vertex_buffers(struct u_vbuf_mgr *mgrb,
pipe_resource_reference(&mgr->b.vertex_buffer[i].buffer, vb->buffer);
pipe_resource_reference(&mgr->b.real_vertex_buffer[i], NULL);
+ mgr->saved_buffer_offset[i] = vb->buffer_offset;
if (!vb->buffer) {
continue;
@@ -647,6 +650,13 @@ u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
void u_vbuf_mgr_draw_end(struct u_vbuf_mgr *mgrb)
{
struct u_vbuf_mgr_priv *mgr = (struct u_vbuf_mgr_priv*)mgrb;
+ unsigned i;
+
+ /* buffer offsets were modified in u_vbuf_upload_buffers */
+ if (mgr->any_user_vbs) {
+ for (i = 0; i < mgr->b.nr_vertex_buffers; i++)
+ mgr->b.vertex_buffer[i].buffer_offset = mgr->saved_buffer_offset[i];
+ }
if (mgr->fallback_ve) {
u_vbuf_translate_end(mgr);