mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-07-22 17:36:04 +00:00
null_state_gen: add const to intel_batch_state_copy data
The data is not modified by the function and is often declared const. Signed-off-by: Thomas Wood <thomas.wood@intel.com>
This commit is contained in:
parent
fdecc1b5af
commit
3546514791
@ -202,7 +202,7 @@ uint32_t intel_batch_state_alloc(struct intel_batchbuffer *batch, unsigned bytes
|
||||
}
|
||||
|
||||
uint32_t intel_batch_state_copy(struct intel_batchbuffer *batch,
|
||||
void *d, unsigned bytes,
|
||||
const void *d, unsigned bytes,
|
||||
unsigned align,
|
||||
const char *str)
|
||||
{
|
||||
@ -217,10 +217,10 @@ uint32_t intel_batch_state_copy(struct intel_batchbuffer *batch,
|
||||
|
||||
for (i = 0; i < dwords; i++) {
|
||||
char offsetinside[80];
|
||||
uint32_t *s;
|
||||
const uint32_t *s;
|
||||
sprintf(offsetinside, "%s: 0x%x", str, i * 4);
|
||||
|
||||
s = (uint32_t *)(uint8_t *)d + i;
|
||||
s = (const uint32_t *)(const uint8_t *)d + i;
|
||||
bb_area_emit(batch->state, *s, STATE, offsetinside);
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ struct intel_batchbuffer *intel_batchbuffer_create(void);
|
||||
#define OUT_STATE_OFFSET(offset) bb_area_emit(batch->state, offset, STATE_OFFSET, #offset)
|
||||
#define OUT_STATE_STRUCT(name, align) intel_batch_state_copy(batch, &name, sizeof(name), align, #name " " #align)
|
||||
|
||||
uint32_t intel_batch_state_copy(struct intel_batchbuffer *batch, void *d, unsigned bytes, unsigned align,
|
||||
uint32_t intel_batch_state_copy(struct intel_batchbuffer *batch, const void *d, unsigned bytes, unsigned align,
|
||||
const char *name);
|
||||
uint32_t intel_batch_state_alloc(struct intel_batchbuffer *batch, unsigned bytes, unsigned align,
|
||||
const char *name);
|
||||
|
Loading…
x
Reference in New Issue
Block a user