static inline void __pvr_dump_buffer_advance(struct pvr_dump_buffer_ctx *ctx,
const uint64_t nr_bytes)
{
- ctx->ptr += nr_bytes;
+ ctx->ptr = (uint8_t *)ctx->ptr + nr_bytes;
ctx->remaining_size -= nr_bytes;
}
static inline void __pvr_dump_buffer_rewind(struct pvr_dump_buffer_ctx *ctx,
const uint32_t nr_bytes)
{
- ctx->ptr -= nr_bytes;
+ ctx->ptr = (uint8_t *)ctx->ptr - nr_bytes;
ctx->remaining_size += nr_bytes;
}
prim_db_elems + cmd->dbsc2.state.depthbias_index;
uint32_t *const addr =
- pvr_bo_suballoc_get_map_addr(cmd->dbsc2.ppp_cs_bo) +
+ (uint32_t *)pvr_bo_suballoc_get_map_addr(cmd->dbsc2.ppp_cs_bo) +
cmd->dbsc2.patch_offset;
assert(pvr_bo_suballoc_get_map_addr(cmd->dbsc2.ppp_cs_bo));
csb->next = csb->relocation_mark;
- csb->end += stream_link_space;
- assert(csb->next + stream_link_space <= csb->end);
+ csb->end = (uint8_t *)csb->end + stream_link_space;
+ assert((uint8_t *)csb->next + stream_link_space <= (uint8_t *)csb->end);
pvr_csb_emit_link_unmarked(csb, pvr_bo->vma->dev_addr, false);
}
/* Reserve space at the end, including the default guard padding, to make
* sure we don't run out of space when a stream link is required.
*/
- csb->end = csb->start + pvr_bo->bo->size - stream_reserved_space;
- csb->next = csb->start + current_state_update_size;
+ csb->end = (uint8_t *)csb->start + pvr_bo->bo->size - stream_reserved_space;
+ csb->next = (uint8_t *)csb->start + current_state_update_size;
list_addtail(&pvr_bo->link, &csb->pvr_bo_list);
mesa_logd_once("CS memory without relocation mark detected.");
#endif
- if (csb->next + required_space > csb->end) {
+ if ((uint8_t *)csb->next + required_space > (uint8_t *)csb->end) {
bool ret = pvr_csb_buffer_extend(csb);
if (!ret)
return NULL;
p = csb->next;
- csb->next += required_space;
+ csb->next = (uint8_t *)csb->next + required_space;
assert(csb->next <= csb->end);
return p;
/* Check if already mapped */
if (mem->bo->map) {
- *ppData = mem->bo->map + offset;
+ *ppData = (uint8_t *)mem->bo->map + offset;
return VK_SUCCESS;
}
if (result != VK_SUCCESS)
return result;
- *ppData = mem->bo->map + offset;
+ *ppData = (uint8_t *)mem->bo->map + offset;
return VK_SUCCESS;
}
if (!ret)
pvr_dump_println(&ctx->base,
"<error while decoding at 0x%tx>",
- ctx->ptr - ctx->initial_ptr);
+ (uint8_t *)ctx->ptr - (uint8_t *)ctx->initial_ptr);
pvr_dump_buffer_restart(ctx);
pvr_dump_mark_section(&ctx->base, "First buffer hexdump");