Marek Olšák <mar...@gmail.com> writes: > diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c > b/src/mesa/drivers/dri/intel/intel_buffer_objects.c > index 996518b..f941c56 100644 > --- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c > +++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c > @@ -39,6 +39,10 @@ > #include "intel_mipmap_tree.h" > #include "intel_regions.h" > > +#ifndef I915 > +#include "brw_context.h" > +#endif > + > static GLboolean > intel_bufferobj_unmap(struct gl_context * ctx, struct gl_buffer_object *obj); > > @@ -160,6 +164,14 @@ intel_bufferobj_data(struct gl_context * ctx, > drm_intel_bo_subdata(intel_obj->buffer, 0, size, data); > } > > +#ifndef I915 > + /* BufferData may change a uniform buffer, need to update it */ > + { > + struct brw_context *brw = brw_context(ctx); > + brw->state.dirty.brw |= BRW_NEW_UNIFORM_BUFFER; > + } > +#endif > + > return true; > }
There are also cases where the BO get replaced in subdata, and in map_range with INVALIDATE_BUFFER. If those get fixed by moving this block into intel_bufferobj_alloc_buffer(), then this (and patch 2-6) are: Reviewed-by: Eric Anholt <e...@anholt.net> > diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c > b/src/mesa/state_tracker/st_cb_bufferobjects.c > index 8ff32c8..d166fe6 100644 > --- a/src/mesa/state_tracker/st_cb_bufferobjects.c > +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c > @@ -247,9 +247,11 @@ st_bufferobj_data(struct gl_context *ctx, > > if (data) > pipe_buffer_write(pipe, st_obj->buffer, 0, size, data); > - return GL_TRUE; > } > > + /* BufferData may change a uniform buffer, need to update it */ > + st->dirty.st |= ST_NEW_UNIFORM_BUFFER; > + > return GL_TRUE; > } Do you need to also flag in the case where you've PIPE_TRANSFER_DISCARD_BUFFER mapped the BO? I don't know how exactly this state gets used, just a possible issue.
pgpQVagRpbdtw.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev