Texture sampling from Y-tiled buffers seems to work, though (save above
problems).
-- Review buffer usage/cache domain handling in the winsys. Related: vbo cache
- coherency is bunk: openarena tends to have a bunch of flatshaded triangles
- popping up all over the screen.
-
- Need to validate buffers before usage. Currently do_exec on the batchbuffer
can fail with -ENOSPC.
*
* Side effects:
* Updates hw_offset, sw_offset, index and allocates a new buffer.
+ * Will set i915->vbo to null on buffer allocation.
*/
static void
i915_vbuf_render_new_buf(struct i915_vbuf_render *i915_render, size_t size)
struct i915_context *i915 = i915_render->i915;
struct i915_winsys *iws = i915->iws;
- if (i915_render->vbo)
+ if (i915_render->vbo) {
iws->buffer_destroy(iws, i915_render->vbo);
+ /*
+ * XXX If buffers where referenced then this should be done in
+ * update_vbo_state but since they arn't and malloc likes to reuse
+ * memory we need to set it to null
+ */
+ i915->vbo = NULL;
+ i915_render->vbo = NULL;
+ }
i915->vbo_flushed = 0;