iris: initial render state upload

This commit is contained in:
Kenneth Graunke
2017-12-27 02:54:26 -08:00
parent 26fb5a8ae2
commit d3d6ef37f6
5 changed files with 204 additions and 9 deletions

View File

@@ -716,3 +716,14 @@ iris_alloc_state(struct iris_batch *batch,
*out_offset = offset;
return batch->statebuf.map_next;
}
uint32_t
iris_emit_state(struct iris_batch *batch,
const void *data,
int size, int alignment)
{
uint32_t out_offset;
void *dest = iris_alloc_state(batch, size, alignment, &out_offset);
memcpy(dest, data, size);
return out_offset;
}