mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
compiler/blob: Add blob_skip_bytes
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
This commit is contained in:
parent
8e7ee7433e
commit
3a133223b3
2 changed files with 13 additions and 0 deletions
|
|
@ -291,6 +291,13 @@ blob_copy_bytes(struct blob_reader *blob, void *dest, size_t size)
|
|||
memcpy(dest, bytes, size);
|
||||
}
|
||||
|
||||
void
|
||||
blob_skip_bytes(struct blob_reader *blob, size_t size)
|
||||
{
|
||||
if (ensure_can_read (blob, size))
|
||||
blob->current += size;
|
||||
}
|
||||
|
||||
/* These next three read functions have identical form. If we add any beyond
|
||||
* these first three we should probably switch to generating these with a
|
||||
* preprocessor macro.
|
||||
|
|
|
|||
|
|
@ -294,6 +294,12 @@ blob_read_bytes(struct blob_reader *blob, size_t size);
|
|||
void
|
||||
blob_copy_bytes(struct blob_reader *blob, void *dest, size_t size);
|
||||
|
||||
/**
|
||||
* Skip \size bytes within the blob.
|
||||
*/
|
||||
void
|
||||
blob_skip_bytes(struct blob_reader *blob, size_t size);
|
||||
|
||||
/**
|
||||
* Read a uint32_t from the current location, (and update the current location
|
||||
* to just past this uint32_t).
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue