[Mesa-dev] [PATCH 2/3] radeonsi: Use SI_BIG_ENDIAN now that it exists

Michel Dänzer michel at daenzer.net
Wed Feb 19 18:41:48 PST 2014


On Mit, 2014-02-19 at 15:09 -0800, Tom Stellard wrote:
> ---
>  src/gallium/drivers/radeonsi/si_shader.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c
> index 54270cd..9fed751 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -2333,7 +2333,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*/) {
> +	if (SI_BIG_ENDIAN) {
>  		for (i = 0; i < binary.code_size / 4; ++i) {
>  			ptr[i] = util_bswap32(*(uint32_t*)(binary.code + i*4));
>  		}

I would prefer using util_cpu_to_le32() here as well.


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer



More information about the mesa-dev mailing list