mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
radeonsi: Use util_cpu_to_le32() instead of bswap32() on big-endian systems
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
9f30685fae
commit
195ee10673
2 changed files with 2 additions and 2 deletions
|
|
@ -432,7 +432,7 @@ void si_upload_const_buffer(struct si_context *sctx, struct r600_resource **rbuf
|
|||
}
|
||||
|
||||
for (i = 0; i < size / 4; ++i) {
|
||||
tmpPtr[i] = util_bswap32(((uint32_t *)ptr)[i]);
|
||||
tmpPtr[i] = util_cpu_to_le32(((uint32_t *)ptr)[i]);
|
||||
}
|
||||
|
||||
u_upload_data(sctx->b.uploader, 0, size, tmpPtr, const_offset,
|
||||
|
|
|
|||
|
|
@ -2335,7 +2335,7 @@ int si_compile_llvm(struct si_context *sctx, struct si_pipe_shader *shader,
|
|||
ptr = (uint32_t*)sctx->b.ws->buffer_map(shader->bo->cs_buf, sctx->b.rings.gfx.cs, PIPE_TRANSFER_WRITE);
|
||||
if (0 /*SI_BIG_ENDIAN*/) {
|
||||
for (i = 0; i < binary.code_size / 4; ++i) {
|
||||
ptr[i] = util_bswap32(*(uint32_t*)(binary.code + i*4));
|
||||
ptr[i] = util_cpu_to_le32((*(uint32_t*)(binary.code + i*4)));
|
||||
}
|
||||
} else {
|
||||
memcpy(ptr, binary.code, binary.code_size);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue