<div dir="ltr">Reviewed-by: Elie Tournier <<a href="mailto:tournier.elie@gmail.com">tournier.elie@gmail.com</a>><br><div class="gmail_extra"><br><div class="gmail_quote">On 24 February 2017 at 04:34, Timothy Arceri <span dir="ltr"><<a href="mailto:tarceri@itsqueeze.com" target="_blank">tarceri@itsqueeze.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
src/compiler/glsl/blob.h | 42 +++++++++++++++++++++---------<wbr>------------<br>
1 file changed, 21 insertions(+), 21 deletions(-)<br>
<br>
diff --git a/src/compiler/glsl/blob.h b/src/compiler/glsl/blob.h<br>
index 81b9917..21fa43d 100644<br>
--- a/src/compiler/glsl/blob.h<br>
+++ b/src/compiler/glsl/blob.h<br>
@@ -71,81 +71,81 @@ struct blob_reader {<br>
uint8_t *current;<br>
bool overrun;<br>
};<br>
<br>
/**<br>
* Create a new, empty blob, belonging to \mem_ctx.<br>
*<br>
* \return The new blob, (or NULL in case of allocation failure).<br>
*/<br>
struct blob *<br>
-blob_create (void *mem_ctx);<br>
+blob_create(void *mem_ctx);<br>
<br>
/**<br>
* Add some unstructured, fixed-size data to a blob.<br>
*<br>
* \return True unless allocation failed.<br>
*/<br>
bool<br>
-blob_write_bytes (struct blob *blob, const void *bytes, size_t to_write);<br>
+blob_write_bytes(struct blob *blob, const void *bytes, size_t to_write);<br>
<br>
/**<br>
* Reserve space in \blob for a number of bytes.<br>
*<br>
* Space will be allocated within the blob for these byes, but the bytes will<br>
* be left uninitialized. The caller is expected to use the return value to<br>
* write directly (and immediately) to these bytes.<br>
*<br>
* \note The return value is valid immediately upon return, but can be<br>
* invalidated by any other call to a blob function. So the caller should call<br>
* blob_reserve_byes immediately before writing through the returned pointer.<br>
*<br>
* This function is intended to be used when interfacing with an existing API<br>
* that is not aware of the blob API, (so that blob_write_bytes cannot be<br>
* called).<br>
*<br>
* \return A pointer to space allocated within \blob to which \to_write bytes<br>
* can be written, (or NULL in case of any allocation error).<br>
*/<br>
uint8_t *<br>
-blob_reserve_bytes (struct blob *blob, size_t to_write);<br>
+blob_reserve_bytes(struct blob *blob, size_t to_write);<br>
<br>
/**<br>
* Overwrite some data previously written to the blob.<br>
*<br>
* Writes data to an existing portion of the blob at an offset of \offset.<br>
* This data range must have previously been written to the blob by one of the<br>
* blob_write_* calls.<br>
*<br>
* For example usage, see blob_overwrite_uint32<br>
*<br>
* \return True unless the requested offset or offset+to_write lie outside<br>
* the current blob's size.<br>
*/<br>
bool<br>
-blob_overwrite_bytes (struct blob *blob,<br>
- size_t offset,<br>
- const void *bytes,<br>
- size_t to_write);<br>
+blob_overwrite_bytes(struct blob *blob,<br>
+ size_t offset,<br>
+ const void *bytes,<br>
+ size_t to_write);<br>
<br>
/**<br>
* Add a uint32_t to a blob.<br>
*<br>
* \note This function will only write to a uint32_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be added to the<br>
* blob if this write follows some unaligned write (such as<br>
* blob_write_string).<br>
*<br>
* \return True unless allocation failed.<br>
*/<br>
bool<br>
-blob_write_uint32 (struct blob *blob, uint32_t value);<br>
+blob_write_uint32(struct blob *blob, uint32_t value);<br>
<br>
/**<br>
* Overwrite a uint32_t previously written to the blob.<br>
*<br>
* Writes a uint32_t value to an existing portion of the blob at an offset of<br>
* \offset. This data range must have previously been written to the blob by<br>
* one of the blob_write_* calls.<br>
*<br>
*<br>
* The expected usage is something like the following pattern:<br>
@@ -154,138 +154,138 @@ blob_write_uint32 (struct blob *blob, uint32_t value);<br>
*<br>
* offset = blob->size;<br>
* blob_write_uint32 (blob, 0); // placeholder<br>
* ... various blob write calls, writing N items ...<br>
* blob_overwrite_uint32 (blob, offset, N);<br>
*<br>
* \return True unless the requested position or position+to_write lie outside<br>
* the current blob's size.<br>
*/<br>
bool<br>
-blob_overwrite_uint32 (struct blob *blob,<br>
- size_t offset,<br>
- uint32_t value);<br>
+blob_overwrite_uint32(struct blob *blob,<br>
+ size_t offset,<br>
+ uint32_t value);<br>
<br>
/**<br>
* Add a uint64_t to a blob.<br>
*<br>
* \note This function will only write to a uint64_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be added to the<br>
* blob if this write follows some unaligned write (such as<br>
* blob_write_string).<br>
*<br>
* \return True unless allocation failed.<br>
*/<br>
bool<br>
-blob_write_uint64 (struct blob *blob, uint64_t value);<br>
+blob_write_uint64(struct blob *blob, uint64_t value);<br>
<br>
/**<br>
* Add an intptr_t to a blob.<br>
*<br>
* \note This function will only write to an intptr_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be added to the<br>
* blob if this write follows some unaligned write (such as<br>
* blob_write_string).<br>
*<br>
* \return True unless allocation failed.<br>
*/<br>
bool<br>
-blob_write_intptr (struct blob *blob, intptr_t value);<br>
+blob_write_intptr(struct blob *blob, intptr_t value);<br>
<br>
/**<br>
* Add a NULL-terminated string to a blob, (including the NULL terminator).<br>
*<br>
* \return True unless allocation failed.<br>
*/<br>
bool<br>
-blob_write_string (struct blob *blob, const char *str);<br>
+blob_write_string(struct blob *blob, const char *str);<br>
<br>
/**<br>
* Start reading a blob, (initializing the contents of \blob for reading).<br>
*<br>
* After this call, the caller can use the various blob_read_* functions to<br>
* read elements from the data array.<br>
*<br>
* For all of the blob_read_* functions, if there is insufficient data<br>
* remaining, the functions will do nothing, (perhaps returning default values<br>
* such as 0). The caller can detect this by noting that the blob_reader's<br>
* current value is unchanged before and after the call.<br>
*/<br>
void<br>
-blob_reader_init (struct blob_reader *blob, uint8_t *data, size_t size);<br>
+blob_reader_init(struct blob_reader *blob, uint8_t *data, size_t size);<br>
<br>
/**<br>
* Read some unstructured, fixed-size data from the current location, (and<br>
* update the current location to just past this data).<br>
*<br>
* \note The memory returned belongs to the data underlying the blob reader. The<br>
* caller must copy the data in order to use it after the lifetime of the data<br>
* underlying the blob reader.<br>
*<br>
* \return The bytes read (see note above about memory lifetime).<br>
*/<br>
void *<br>
-blob_read_bytes (struct blob_reader *blob, size_t size);<br>
+blob_read_bytes(struct blob_reader *blob, size_t size);<br>
<br>
/**<br>
* Read some unstructured, fixed-size data from the current location, copying<br>
* it to \dest (and update the current location to just past this data)<br>
*/<br>
void<br>
-blob_copy_bytes (struct blob_reader *blob, uint8_t *dest, size_t size);<br>
+blob_copy_bytes(struct blob_reader *blob, uint8_t *dest, size_t size);<br>
<br>
/**<br>
* Read a uint32_t from the current location, (and update the current location<br>
* to just past this uint32_t).<br>
*<br>
* \note This function will only read from a uint32_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be skipped.<br>
*<br>
* \return The uint32_t read<br>
*/<br>
uint32_t<br>
-blob_read_uint32 (struct blob_reader *blob);<br>
+blob_read_uint32(struct blob_reader *blob);<br>
<br>
/**<br>
* Read a uint64_t from the current location, (and update the current location<br>
* to just past this uint64_t).<br>
*<br>
* \note This function will only read from a uint64_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be skipped.<br>
*<br>
* \return The uint64_t read<br>
*/<br>
uint64_t<br>
-blob_read_uint64 (struct blob_reader *blob);<br>
+blob_read_uint64(struct blob_reader *blob);<br>
<br>
/**<br>
* Read an intptr_t value from the current location, (and update the<br>
* current location to just past this intptr_t).<br>
*<br>
* \note This function will only read from an intptr_t-aligned offset from the<br>
* beginning of the blob's data, so some padding bytes may be skipped.<br>
*<br>
* \return The intptr_t read<br>
*/<br>
intptr_t<br>
-blob_read_intptr (struct blob_reader *blob);<br>
+blob_read_intptr(struct blob_reader *blob);<br>
<br>
/**<br>
* Read a NULL-terminated string from the current location, (and update the<br>
* current location to just past this string).<br>
*<br>
* \note The memory returned belongs to the data underlying the blob reader. The<br>
* caller must copy the string in order to use the string after the lifetime<br>
* of the data underlying the blob reader.<br>
*<br>
* \return The string read (see note above about memory lifetime). However, if<br>
* there is no NULL byte remaining within the blob, this function returns<br>
* NULL.<br>
*/<br>
char *<br>
-blob_read_string (struct blob_reader *blob);<br>
+blob_read_string(struct blob_reader *blob);<br>
<br>
#ifdef __cplusplus<br>
}<br>
#endif<br>
<br>
#endif /* BLOB_H */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.9.3<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>