mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 07:48:07 +02:00
Supporting batchbuffer changes for 1st hwpipe triangles...
This commit is contained in:
parent
13eaf04b56
commit
4e517f9b0a
2 changed files with 22 additions and 11 deletions
|
|
@ -72,9 +72,9 @@ intel_dump_batchbuffer(GLuint offset, GLuint * ptr, GLuint count)
|
|||
{
|
||||
int i;
|
||||
fprintf(stderr, "\n\n\nSTART BATCH (%d dwords):\n", count / 4);
|
||||
for (i = 0; i < count / 4; i += 4)
|
||||
fprintf(stderr, "0x%x:\t0x%08x 0x%08x 0x%08x 0x%08x\n",
|
||||
offset + i * 4, ptr[i], ptr[i + 1], ptr[i + 2], ptr[i + 3]);
|
||||
for (i = 0; i < count / 4; i += 1)
|
||||
fprintf(stderr, "\t0x%08x\n",
|
||||
ptr[i]);
|
||||
fprintf(stderr, "END BATCH\n\n\n");
|
||||
}
|
||||
|
||||
|
|
@ -84,6 +84,12 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
|
|||
|
||||
int i;
|
||||
|
||||
if (batch->map) {
|
||||
driBOUnmap(batch->buffer);
|
||||
batch->map = NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get a new, free batchbuffer.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -171,8 +171,7 @@ static unsigned *intel_i915_batch_start( struct i915_winsys *sws,
|
|||
if (intel_batchbuffer_space( intel->batch ) >= dwords * 4) {
|
||||
/* XXX: Hmm, the driver can't really do much with this pointer:
|
||||
*/
|
||||
//return intel->batch->ptr;
|
||||
return (unsigned *)~0;
|
||||
return intel->batch->ptr;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
|
|
@ -210,12 +209,6 @@ static void intel_i915_batch_reloc( struct i915_winsys *sws,
|
|||
delta );
|
||||
}
|
||||
|
||||
static void intel_i915_batch_flush( struct i915_winsys *sws )
|
||||
{
|
||||
struct intel_context *intel = intel_i915_winsys(sws)->intel;
|
||||
|
||||
intel_batchbuffer_flush( intel->batch );
|
||||
}
|
||||
|
||||
static void intel_i915_batch_wait_idle( struct i915_winsys *sws )
|
||||
{
|
||||
|
|
@ -229,6 +222,18 @@ static void intel_i915_batch_wait_idle( struct i915_winsys *sws )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
static void intel_i915_batch_flush( struct i915_winsys *sws )
|
||||
{
|
||||
struct intel_context *intel = intel_i915_winsys(sws)->intel;
|
||||
|
||||
_mesa_printf("%s: start\n");
|
||||
intel_batchbuffer_flush( intel->batch );
|
||||
intel_i915_batch_wait_idle( sws );
|
||||
_mesa_printf("%s: done\n");
|
||||
}
|
||||
|
||||
|
||||
struct pipe_context *
|
||||
intel_create_i915simple( struct intel_context *intel )
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue